diff options
Diffstat (limited to 'db/migrations/0262_remove_project_id_from_combo_box_settings.sql')
| -rw-r--r-- | db/migrations/0262_remove_project_id_from_combo_box_settings.sql | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/db/migrations/0262_remove_project_id_from_combo_box_settings.sql b/db/migrations/0262_remove_project_id_from_combo_box_settings.sql deleted file mode 100644 index 804b471a..00000000 --- a/db/migrations/0262_remove_project_id_from_combo_box_settings.sql +++ /dev/null @@ -1,14 +0,0 @@ --- Remove projectId column and related constraints from combo_box_settings table --- Since codeGroupId already references codeGroups which has projectId, this is redundant - --- First, drop the unique constraint that includes projectId -DROP INDEX IF EXISTS "unique_project_code_group_code"; - --- Then drop the foreign key constraint for projectId -ALTER TABLE "combo_box_settings" DROP CONSTRAINT IF EXISTS "combo_box_settings_project_id_projects_id_fk"; - --- Finally, drop the projectId column -ALTER TABLE "combo_box_settings" DROP COLUMN IF EXISTS "project_id"; - --- Add a new unique constraint without projectId (since codeGroupId + code should be unique within a code group) -ALTER TABLE "combo_box_settings" ADD CONSTRAINT "unique_code_group_code" UNIQUE ("code_group_id", "code");
\ No newline at end of file |
