Skip to content

[RFC] Add basic migration tests for postgresql

vlorentz requested to merge generated-differential-D5014-source into master

This adds two test files:

  • test_postgresql_migrated.py applies an old schema definition, runs the migrations, then runs all the usual tests
  • test_postgresql_migration.py applies an old schema definition, inserts data, runs the migrations, and checks the data is still available

test_postgresql_migration.py will probably break in some releases as it uses the old SQL with the new Python to insert, but it should be good enough, and we can disable it in some releases when needed.

What do you think?

Test Plan

tests fail because they don't work in tox (I'll look into later if we want to pursue this way of testing migrations)


Migrated from D5014 (view on Phabricator)

Merge request reports