mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(migrations): renumber model_id uniqueness migration to 0013
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
-- 0012_model_id_unique_per_provider
|
||||
-- 0013_model_id_unique_per_provider
|
||||
-- Revert model_id uniqueness back to global uniqueness.
|
||||
|
||||
DO $$
|
||||
@@ -9,7 +9,7 @@ BEGIN
|
||||
GROUP BY model_id
|
||||
HAVING COUNT(*) > 1
|
||||
) THEN
|
||||
RAISE EXCEPTION 'cannot rollback 0012_model_id_unique_per_provider: duplicate model_id values exist across providers';
|
||||
RAISE EXCEPTION 'cannot rollback 0013_model_id_unique_per_provider: duplicate model_id values exist across providers';
|
||||
END IF;
|
||||
|
||||
IF EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'models_provider_model_id_unique') THEN
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-- 0012_model_id_unique_per_provider
|
||||
-- 0013_model_id_unique_per_provider
|
||||
-- Change model_id uniqueness from global to per provider.
|
||||
|
||||
DO $$
|
||||
Reference in New Issue
Block a user