In Rails 8 the behavior of the rails db:migrate
command has changed for fresh databases (see
PR #52830
Show archive.org snapshot
).
- Before Rails 8: The command runs all migrations in the folder
db/migrate/*
- After Rails 8: The command loads the schema file (
db/schema.rb
ordb/schema.sql
) if existing and runs all pending migrations in the folderdb/migrate/*
afterwards
This speeds up the command. But e.g. migrations with data manipulations are missing.
The only way to run all pending migrations seems to be to delete the schema file. It should be rewritten once the rake task completes.
Posted by Emanuel to makandra dev (2025-10-01 13:26)