Chore!: Remove old migration scripts up to and including v0060#5309
Merged
izeigerman merged 1 commit intomainfrom Sep 8, 2025
Merged
Chore!: Remove old migration scripts up to and including v0060#5309izeigerman merged 1 commit intomainfrom
izeigerman merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes old migration scripts up to and including v0060 to reduce DDL statements during state initialization and technical debt. The key changes include:
- Removal of 61 migration scripts (v0001-v0060)
- Updated migration system to use v0060 as the minimum supported schema version
- Modified tooling and tests to account for the removal of old migrations
Reviewed Changes
Copilot reviewed 75 out of 75 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tooling/validating_migration_numbers.sh | Added condition to skip migration numbers less than or equal to 0 |
| tests/fixtures/migrations/versions.json | Added new test fixture file with schema version 60 |
| tests/fixtures/migrations/snapshots.json | Updated test fixture with migrated snapshot data |
| tests/fixtures/migrations/intervals.json | Added new test fixture for intervals data |
| tests/fixtures/migrations/environments.json | Updated environment fixture with migrated data |
| tests/core/test_integration.py | Removed references to obsolete _plan_dags table |
| tests/core/state_sync/test_state_sync.py | Updated migration tests and added test for old state version error |
| tests/core/state_sync/test_export_import.py | Removed default_catalog parameter from migrate calls |
| sqlmesh/utils/errors.py | Added new StateMigrationError exception |
| sqlmesh/migrations/v0096_remove_plan_dags_table.py | Added new migration to remove obsolete plan_dags table |
| sqlmesh/migrations/v0061_mysql_fix_blob_text_type.py | Removed references to plan_dags table |
| sqlmesh/migrations/v0060_move_audits_to_model.py | Removed entire migration file |
| sqlmesh/migrations/v0059_add_physical_version.py | Removed entire migration file |
| 57 other migration files | Removed migration files v0001-v0058 |
| sqlmesh/migrations/v0000_baseline.py | Transformed from backup/restore script to baseline initialization script |
| sqlmesh/core/state_sync/db/migrator.py | Updated migration system to support minimum schema version and handle old state errors |
| sqlmesh/core/state_sync/db/facade.py | Removed plan_dags table references |
| sqlmesh/core/state_sync/base.py | Added minimum schema version constants and updated migration indexing |
| sqlmesh/core/context.py | Removed default_catalog parameter from migrate calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
bf42538 to
e35bd4f
Compare
tobymao
approved these changes
Sep 7, 2025
e35bd4f to
b6e2faa
Compare
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.
This reduces the number of DDL statements during state initialization and also helps reduce our technical debt.