Make db:check-schema run only if migrations have been added
This CI step is designed to make sure new migrations generate the proper
changes in db/structure.sql
, but it cannot detect unintended changes
in db/structure.sql
for already-introduced migrations. For it to do
that, it would need to rewind the database before the migration were
introduced, apply the migration, and then compare the resulting
db/structure.sql
.
To reduce false positives, we check if any migrations were added and
only then do we allow scripts/regenerate-schema
to run.
Closes #216519 (closed)
Edited by Stan Hu