Do proper downgrades to reset the database
All checks were successful
continuous-integration/drone/pr Build is passing

Somehow the table for the alembic migrations was not dropped before, leading to an inconsistent state
This commit is contained in:
2025-09-19 18:09:57 +02:00
parent 9fe705d485
commit ab459b4d88
2 changed files with 9 additions and 1 deletions

View File

@@ -31,7 +31,8 @@ class ApiTest(unittest.TestCase):
def tearDown(self):
with app.app_context():
db.drop_all()
config = migrate.get_config()
command.downgrade(config, "base")
db.engine.dispose()
def login(self, username, password):

View File

@@ -22,3 +22,10 @@ def upgrade():
existing_type=sa.VARCHAR(length=25),
type_=sa.String(length=50),
existing_nullable=False)
def downgrade():
with op.batch_alter_table("skill") as batch_op:
batch_op.alter_column('name',
existing_type=sa.String(length=50),
type_=sa.VARCHAR(length=25),
existing_nullable=False)