Skip to content

fix(09-01): resolve migration issues for configuration table merge#11

Merged
mosoriob merged 4 commits intomasterfrom
feat/phrase-9
Apr 5, 2026
Merged

fix(09-01): resolve migration issues for configuration table merge#11
mosoriob merged 4 commits intomasterfrom
feat/phrase-9

Conversation

@mosoriob
Copy link
Copy Markdown
Collaborator

@mosoriob mosoriob commented Apr 5, 2026

Summary

  • Rename indexes in configuration table migration to avoid name collisions with existing indexes on old tables (idx_mc_config_* -> idx_mc_configuration_*)
  • Drop FK constraints from execution and thread_model tables that reference old tables before dropping them, preventing constraint violation errors during migration

Context

These fixes address issues discovered when running the Phase 9 migrations (configuration table merge and junction consolidation). The FK constraints from execution and thread_model will be re-added pointing to the new modelcatalog_configuration table in migration 12000.

Test plan

  • Run hasura migrate apply and verify both migrations complete without errors
  • Verify modelcatalog_configuration table has correct indexes
  • Verify execution and thread_model tables no longer have FK constraints to dropped tables

mosoriob added 4 commits April 5, 2026 15:19
…le merge and junction consolidation

- Migration 10000: create unified modelcatalog_configuration table from model_configuration + model_configuration_setup
- Migration 11000: merge overlapping junctions, rename setup-only junctions, drop old entity tables
- Migration 12000: backfill thread_model/execution FKs, drop public.model and dependents
…on and untrack dropped tables

- Add modelcatalog_configuration entry with all relationships (parent_configuration, child_configurations, inputs, outputs, parameters, authors, categories, causal_diagrams, time_intervals, regions, calibrated_variables, calibration_targets)
- Remove modelcatalog_model_configuration and modelcatalog_model_configuration_setup entries
- Add entries for modelcatalog_configuration_category, modelcatalog_configuration_calibrated_variable, modelcatalog_configuration_calibration_target
- Remove entries for modelcatalog_setup_input, modelcatalog_setup_output, modelcatalog_setup_parameter, modelcatalog_setup_author
- Remove modelcatalog_modelconfiguration_category and modelcatalog_modelconfigurationsetup_category entries
- Update thread_model and execution entries to remove modelcatalog_setup_id references
- Update modelcatalog_person, modelcatalog_model_category, modelcatalog_variable_presentation to reference new table names
…aints

Rename configuration table indexes to avoid collision with existing
indexes on old tables. Drop FK constraints from execution and
thread_model that reference old tables before dropping them.
…adata

- Remove model, model_input, model_output, model_parameter table entries
- Remove model_inputs and model_outputs array relationships from model_io
- Update configurations relationship in modelcatalog_software_version to reference modelcatalog_configuration instead of modelcatalog_model_configuration
@mosoriob mosoriob merged commit 9986ea7 into master Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant