feat: migrate globalItems — drop brand text, add manufacturerId FK

This commit is contained in:
2026-04-18 16:19:31 +02:00
parent f868bbdecf
commit 8ff680ef92
4 changed files with 1712 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
ALTER TABLE "global_items" ADD COLUMN "manufacturer_id" integer NOT NULL REFERENCES "manufacturers"("id");--> statement-breakpoint
ALTER TABLE "global_items" DROP CONSTRAINT "global_items_brand_model_unique";--> statement-breakpoint
ALTER TABLE "global_items" DROP COLUMN "brand";--> statement-breakpoint
ALTER TABLE "global_items" ADD CONSTRAINT "global_items_manufacturer_id_model_unique" UNIQUE("manufacturer_id","model");

File diff suppressed because it is too large Load Diff

View File

@@ -57,6 +57,13 @@
"when": 1776516850497,
"tag": "0007_steady_sasquatch",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1776521936465,
"tag": "0008_productive_tyrannus",
"breakpoints": true
}
]
}