Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit ecf495a

Browse files
committed
make alembic revision 00f2b412576b downgradable to 955122a76711
1 parent be205bb commit ecf495a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rdl/alembic/versions/00f2b412576b_normalize_schema.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,14 @@ def downgrade():
131131
sa.Column('rows_processed', sa.Integer(), nullable=True),
132132
sa.Column('model_checksum', sa.String(length=100), nullable=False),
133133
sa.Column('failure_reason', sa.String(length=1000), nullable=True),
134-
sa.ForeignKeyConstraint(['execution_id'], ['rdl.execution.id'], ),
135-
sa.PrimaryKeyConstraint('execution_id', 'model_name'),
134+
# sa.ForeignKeyConstraint(['execution_id'], ['rdl.execution.id'], ),
135+
# sa.PrimaryKeyConstraint('execution_id', 'model_name'),
136136
schema='rdl'
137137
)
138+
op.create_primary_key("pk_data_load_execution", "execution_model",
139+
["execution_id", "model_name"], schema='rdl')
140+
op.create_foreign_key("data_load_execution_execution_id_fkey", 'execution_model', 'execution', ['execution_id'],
141+
['id'], source_schema='rdl', referent_schema='rdl')
138142

139143
# move data from new revision tables to old revision tables
140144
op.execute(

0 commit comments

Comments
 (0)