Add support for populating test data during migration testing

This change ensures that the tables in the database during migration have at least one row of "real" data, which should help catch issues in the future where we forget to set column defaults and other such schema oversights that can only be truly tested with non-empty tables

Fixes https://jira.coreos.com/browse/QUAY-913
This commit is contained in:
Joseph Schorr 2018-05-07 16:45:57 +03:00
parent c92c0ca5e1
commit f6ff0d6ca0
41 changed files with 653 additions and 86 deletions

View file

@ -14,9 +14,9 @@ from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
def upgrade(tables):
def upgrade(tables, tester):
${upgrades if upgrades else "pass"}
def downgrade(tables):
def downgrade(tables, tester):
${downgrades if downgrades else "pass"}