Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def downgrade():
# columns were always non-nullable for mysql, sqlite and postgres, so leave them alone

if conn.dialect.name == "mssql":
bop.drop_constraint("pk_xcom", "primary")
bop.drop_constraint("pk_xcom", type_="primary")
# execution_date and key wasn't nullable in the other databases
bop.alter_column("key", type_=StringID(length=512), nullable=True)
bop.alter_column("execution_date", type_=TIMESTAMP, nullable=True)
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ def downgrade():
if dialect_name == "mssql":

with op.batch_alter_table("dag_run", schema=None) as batch_op:
batch_op.drop_constraint("dag_run_dag_id_execution_date_key", "unique")
batch_op.drop_constraint("dag_run_dag_id_run_id_key", "unique")
batch_op.drop_constraint("dag_run_dag_id_execution_date_key", type_="unique")
batch_op.drop_constraint("dag_run_dag_id_run_id_key", type_="unique")
batch_op.drop_index("dag_id_state")
batch_op.drop_index("idx_dag_run_running_dags")
batch_op.drop_index("idx_dag_run_queued_dags")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def upgrade():
"""
# We need to first remove constraints on task_reschedule since they depend on task_instance.
with op.batch_alter_table("task_reschedule") as batch_op:
batch_op.drop_constraint("task_reschedule_ti_fkey", "foreignkey")
batch_op.drop_constraint("task_reschedule_ti_fkey", type_="foreignkey")
batch_op.drop_index("idx_task_reschedule_dag_task_run")

# Change task_instance's primary key.
Expand Down Expand Up @@ -100,7 +100,7 @@ def downgrade():
op.drop_table("task_map")

with op.batch_alter_table("task_reschedule") as batch_op:
batch_op.drop_constraint("task_reschedule_ti_fkey", "foreignkey")
batch_op.drop_constraint("task_reschedule_ti_fkey", type_="foreignkey")
batch_op.drop_index("idx_task_reschedule_dag_task_run")
batch_op.drop_column("map_index", mssql_drop_default=True)

Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/img/airflow_erd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d3e1272db6e730812ad1c6c317e8de0147aee7b4c02cc33cb096645a408eedd5
4995c94849a5848e551e85ffeb99d3dda9f652f3c2d7b3cf3aa16c02911690d3
4 changes: 2 additions & 2 deletions docs/apache-airflow/img/airflow_erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.