Skip to content

[tooling] Add automatic database migration tests#1376

Open
the-glu wants to merge 1 commit intointeruss:masterfrom
Orbitalize:tests_migrations
Open

[tooling] Add automatic database migration tests#1376
the-glu wants to merge 1 commit intointeruss:masterfrom
Orbitalize:tests_migrations

Conversation

@the-glu
Copy link
Contributor

@the-glu the-glu commented Feb 19, 2026

Right now, there are no automatic database migrations test.

There is indirect testing via CI, because we do apply then, but we don't verify that they can be down and that they do a correct cleanup, leading to human verifications to ensure everything is ok.

This PR add automatic migration tests that check:

  • That migrations can be applied
  • That those migrations created table
  • That migrations can be 'un-applied'
  • That those down migrations removed all tables
  • That we can re-apply migrations after that (just in case there are some leftovers)

This is not perfect (e.g. one can forgot to cover both datastore types), but should cover basic cases.

This also fix down migrations of yugabyte that where missing version set in two migration.

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.

1 participant

Comments