Skip to content

Delete dag_version table when downgrading the DB from the versioned Airflow#44397

Merged
ephraimbuddy merged 1 commit intoapache:mainfrom
astronomer:delete-serdag-code2
Nov 27, 2024
Merged

Delete dag_version table when downgrading the DB from the versioned Airflow#44397
ephraimbuddy merged 1 commit intoapache:mainfrom
astronomer:delete-serdag-code2

Conversation

@ephraimbuddy
Copy link
Copy Markdown
Contributor

In dagcode, fileloc_hash column was a primary key on the version before dag versioning. If dagcode is not deleted before downgrading, the fileloc_hash column, created when downgrading, would be a null column that can't be used for a primary key. A similar thing applies to serialized dag, which would have duplicates, and the primary key can't be determined. The solution is to delete the dag_version table data, which will delete the serdag and dagcode table data

… Airflow

In dagcode, fileloc_hash column was a primary key on the version before dag
versioning. If dagcode is not deleted before downgrading, the fileloc_hash column,
created when downgrading, would be a null column that can't be used for a primary key.
A similar thing applies to serialized dag, which would have duplicates, and the
primary key can't be determined. The solution is to delete the dag_version table data,
which will delete the serdag and dagcode table data
@ephraimbuddy ephraimbuddy merged commit 9fedfd5 into apache:main Nov 27, 2024
@ephraimbuddy ephraimbuddy deleted the delete-serdag-code2 branch November 27, 2024 06:47
ArshiaZr pushed a commit to ArshiaZr/airflow that referenced this pull request Nov 27, 2024
… Airflow (apache#44397)

In dagcode, fileloc_hash column was a primary key on the version before dag
versioning. If dagcode is not deleted before downgrading, the fileloc_hash column,
created when downgrading, would be a null column that can't be used for a primary key.
A similar thing applies to serialized dag, which would have duplicates, and the
primary key can't be determined. The solution is to delete the dag_version table data,
which will delete the serdag and dagcode table data
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
… Airflow (apache#44397)

In dagcode, fileloc_hash column was a primary key on the version before dag
versioning. If dagcode is not deleted before downgrading, the fileloc_hash column,
created when downgrading, would be a null column that can't be used for a primary key.
A similar thing applies to serialized dag, which would have duplicates, and the
primary key can't be determined. The solution is to delete the dag_version table data,
which will delete the serdag and dagcode table data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants