fix(09-01): resolve migration issues for configuration table merge#11
Merged
fix(09-01): resolve migration issues for configuration table merge#11
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
idx_mc_config_*->idx_mc_configuration_*)executionandthread_modeltables that reference old tables before dropping them, preventing constraint violation errors during migrationContext
These fixes address issues discovered when running the Phase 9 migrations (configuration table merge and junction consolidation). The FK constraints from
executionandthread_modelwill be re-added pointing to the newmodelcatalog_configurationtable in migration 12000.Test plan
hasura migrate applyand verify both migrations complete without errorsmodelcatalog_configurationtable has correct indexesexecutionandthread_modeltables no longer have FK constraints to dropped tables