Skip to content

chore(migrations): remove pre-2026 migrations and rely on schema.rb - #2777

Merged
olleolleolle merged 1 commit into
masterfrom
feature/squash-pre-2026-migrations
Aug 3, 2026
Merged

chore(migrations): remove pre-2026 migrations and rely on schema.rb#2777
olleolleolle merged 1 commit into
masterfrom
feature/squash-pre-2026-migrations

Conversation

@mroderick

@mroderick mroderick commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What

Removes all 163 pre-2026 migrations and relies on db/schema.rb + db:prepare for fresh databases. The 13 in-window 2026 migrations remain as the only files in db/migrate/.

Why

Following the practice discussed in #2774: once migration files have been applied to all environments, db/schema.rb is the source of truth and the historical files can be removed. This keeps only the migrations in the strong_migrations window (2026 onwards).

Changes

  • Deleted 163 pre-2026 migration files.
  • Heroku release step changed from bundle exec rake db:migrate to bundle exec rake db:prepare so a fresh dyno loads from db/schema.rb and an existing dyno runs pending migrations.
  • Updated dev setup instructions in AGENTS.md, README.md, and docs/development-setup.md to use db:prepare.
  • Added a note in AGENTS.md explaining the migration cleanup.

Verification

  • bundle exec rake db:create db:prepare from a scratch test database reproduces the committed db/schema.rb exactly.
  • db:migrate:status on the scratch DB shows the 13 kept 2026 migrations all up.
  • Full test suite: bundle exec parallel_rspec spec/ -n 3 — 1172 examples, 0 failures.

Dependencies

@mroderick
mroderick force-pushed the feature/squash-pre-2026-migrations branch from a0fc104 to 9072478 Compare August 3, 2026 16:26
@mroderick mroderick changed the title feat(migrations): squash pre-2026 migrations into a guarded baseline chore(migrations): remove pre-2026 migrations and rely on schema.rb Aug 3, 2026
@mroderick
mroderick force-pushed the feature/squash-pre-2026-migrations branch from 904093c to fd7e972 Compare August 3, 2026 16:48
@mroderick
mroderick marked this pull request as ready for review August 3, 2026 16:53
@mroderick
mroderick requested a review from olleolleolle August 3, 2026 16:53

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Grand!

@olleolleolle
olleolleolle merged commit c8d2279 into master Aug 3, 2026
10 checks passed
@olleolleolle
olleolleolle deleted the feature/squash-pre-2026-migrations branch August 3, 2026 20:15
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.

2 participants