Skip to content

Commit

Permalink
fix: raise notice to delete dependent fields after workspace reset
Browse files Browse the repository at this point in the history
  • Loading branch information
JustARatherRidiculouslyLongUsername committed Dec 10, 2024
1 parent e1f7f3c commit 0ca5d72
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/sql/functions/delete-workspace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,17 @@ BEGIN
RAISE NOTICE E'\n\n\n\n\n\n\n\n\nSwitch to prod db and run the below query to update the subscription';
RAISE NOTICE E'begin; update platform_schema.admin_subscriptions set is_enabled = false where org_id = ''%'';\n\n\n\n\n\n\n\n\n\n\n', _org_id;

RAISE NOTICE E'\n\n\n\n\n\n\n\n\nSwitch to prod db and run the below queries to delete dependent fields
rollback;
begin;
delete from platform_schema.dependent_expense_field_mappings where expense_field_id in (select id from platform_schema.expense_fields where org_id =''%'' and type=''DEPENDENT_SELECT'');
delete from platform_schema.expense_fields where org_id = ''%'' and type = ''DEPENDENT_SELECT'';\n\n\n\n\n\n\n\n\n\n\n', _org_id, _org_id;


RETURN;
END
$$ LANGUAGE plpgsql;

0 comments on commit 0ca5d72

Please sign in to comment.