Skip to content

Chore!: Remove old migration scripts up to and including v0060#5309

Merged
izeigerman merged 1 commit intomainfrom
chore-prune-migrations
Sep 8, 2025
Merged

Chore!: Remove old migration scripts up to and including v0060#5309
izeigerman merged 1 commit intomainfrom
chore-prune-migrations

Conversation

@izeigerman
Copy link
Collaborator

This reduces the number of DDL statements during state initialization and also helps reduce our technical debt.

@izeigerman izeigerman requested review from a team and Copilot September 6, 2025 23:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@izeigerman izeigerman force-pushed the chore-prune-migrations branch from bf42538 to e35bd4f Compare September 6, 2025 23:58
@izeigerman izeigerman force-pushed the chore-prune-migrations branch from e35bd4f to b6e2faa Compare September 8, 2025 14:40
@izeigerman izeigerman merged commit b8bc224 into main Sep 8, 2025
36 of 38 checks passed
@izeigerman izeigerman deleted the chore-prune-migrations branch September 8, 2025 16:40
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.

3 participants