info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# db:check-migrations job
This job runs on the test stage of a merge request pipeline. It checks:
1. A schema dump comparison between the author's working branch and the target branch,
after executing a rollback of your new migrations. This check validates that the
schema properly resets to what it was before executing this new migration.
1. A schema dump comparison between the author's working branch and the `db/structure.sql`
file that the author committed. This check validates that it contains all the expected changes
in the migration.
1. A Git diff between the `db/schema_migrations` that the author committed and the
one that the script generated after running migrations. This check validates that everything
was properly committed.
## Troubleshooting
### False positives
This job is allowed to fail, because it can throw some false positives.
For example, when we drop a column and then roll back, this column is always
re-added at the end of the list of columns. If the column was previously in
the middle of the list, the rollback can't return the schema back exactly to
its previous state. The job fails, but it's an acceptable situation.