Commit f68dc220 authored by pbair's avatar pbair Committed by Albert Salim

Run migrations in reverse order in CI check

In the CI job that validates migration schema changes, the current
behavior did not account for multiple migrations in one MR, and so ran
the migrations based on the output of `git diff`.

This change fixes that, so all migrations in `post_migrate` will run
first in reverse timestamp order, and then migrations in `migrate` will
run in reverse timestamp order.
parent 00526c7b
......@@ -27,7 +27,7 @@ class MigrationSchemaValidator
private
def validate_schema_on_rollback!
committed_migrations.each do |filename|
committed_migrations.reverse_each do |filename|
version = find_migration_version(filename)
run("bin/rails db:migrate:down VERSION=#{version}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment