Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Commit cf6001b

Browse files
committed
fix(migration): use TEXT type for configuration category junction FKs
The referenced tables (model_configuration, model_configuration_setup, model_category) use TEXT primary keys, not UUID. Fixes migration failure due to incompatible FK column types.
1 parent bea575a commit cf6001b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • migrations/1771200004000_modelcatalog_configuration_category

migrations/1771200004000_modelcatalog_configuration_category/up.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
CREATE TABLE modelcatalog_modelconfiguration_category (
2-
model_configuration_id UUID NOT NULL REFERENCES modelcatalog_model_configuration(id) ON DELETE CASCADE,
3-
category_id UUID NOT NULL REFERENCES modelcatalog_model_category(id) ON DELETE CASCADE,
2+
model_configuration_id TEXT NOT NULL REFERENCES modelcatalog_model_configuration(id) ON DELETE CASCADE,
3+
category_id TEXT NOT NULL REFERENCES modelcatalog_model_category(id) ON DELETE CASCADE,
44
PRIMARY KEY (model_configuration_id, category_id)
55
);
66
CREATE INDEX idx_modelcatalog_modelconfiguration_category_mc_id ON modelcatalog_modelconfiguration_category(model_configuration_id);
77
CREATE INDEX idx_modelcatalog_modelconfiguration_category_cat_id ON modelcatalog_modelconfiguration_category(category_id);
88

99
CREATE TABLE modelcatalog_modelconfigurationsetup_category (
10-
model_configuration_setup_id UUID NOT NULL REFERENCES modelcatalog_model_configuration_setup(id) ON DELETE CASCADE,
11-
category_id UUID NOT NULL REFERENCES modelcatalog_model_category(id) ON DELETE CASCADE,
10+
model_configuration_setup_id TEXT NOT NULL REFERENCES modelcatalog_model_configuration_setup(id) ON DELETE CASCADE,
11+
category_id TEXT NOT NULL REFERENCES modelcatalog_model_category(id) ON DELETE CASCADE,
1212
PRIMARY KEY (model_configuration_setup_id, category_id)
1313
);
1414
CREATE INDEX idx_modelcatalog_modelconfigurationsetup_category_mcs_id ON modelcatalog_modelconfigurationsetup_category(model_configuration_setup_id);

0 commit comments

Comments
 (0)