chore(db): add migration dropping position from asset_usages unique key

Generated migration for the narrowed
asset_usages_asset_target_slot_unique constraint (asset_id, target_type,
target_id, slot_type, slot_key). Run the duplicate cleanup before
applying — existing rows that differ only by position will otherwise
violate the new constraint.
This commit is contained in:
Rotimi Best
2026-06-28 23:08:17 +01:00
parent 07491ae609
commit eb4cd22ac5
3 changed files with 11311 additions and 1 deletions
@@ -0,0 +1,2 @@
ALTER TABLE "asset_usages" DROP CONSTRAINT "asset_usages_asset_target_slot_unique";--> statement-breakpoint
ALTER TABLE "asset_usages" ADD CONSTRAINT "asset_usages_asset_target_slot_unique" UNIQUE("asset_id","target_type","target_id","slot_type","slot_key");
File diff suppressed because it is too large Load Diff
@@ -8,6 +8,13 @@
"when": 1781617442553,
"tag": "0000_shocking_carmella_unuscione",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1782684436805,
"tag": "0001_slow_lila_cheney",
"breakpoints": true
}
]
}
}