~comcloudway/builds.sr.ht

70c63ae4d542e165a06a551dd8607c8421a061bb — Conrad Hoffmann 1 year, 10 months ago 0676ee9
alembic: fix broken downgrade
1 files changed, 1 insertions(+), 1 deletions(-)

M buildsrht/alembic/versions/7e863c9389ef_configure_cascades_on_relationships.py
M buildsrht/alembic/versions/7e863c9389ef_configure_cascades_on_relationships.py => buildsrht/alembic/versions/7e863c9389ef_configure_cascades_on_relationships.py +1 -1
@@ 37,7 37,7 @@ def upgrade():


def downgrade():
    for (table, relation, col, do) in tables:
    for (table, relation, col, do) in cascades:
        op.execute(f"""
        ALTER TABLE {table} DROP CONSTRAINT IF EXISTS {table}_{col}_fkey;
        ALTER TABLE {table} ADD CONSTRAINT {table}_{col}_fkey FOREIGN KEY ({col}) REFERENCES "{relation}"(id);