diff --git a/scripts/sql/functions/delete-workspace.sql b/scripts/sql/functions/delete-workspace.sql index f6e5db6f..ce6ea848 100644 --- a/scripts/sql/functions/delete-workspace.sql +++ b/scripts/sql/functions/delete-workspace.sql @@ -327,6 +327,10 @@ 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'; + RAISE NOTICE E'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;