Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: alembic migration failing when primary key does not exist #1963

Merged

Conversation

fregataa
Copy link
Contributor

@fregataa fregataa commented Mar 24, 2024

follow up #1935 and #1818

  • When dropping primary keys, check if the table has any primary key
  • Add some missing Table arguments in 589c764a18f1 alembic downgrade.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version

@fregataa fregataa added this to the 23.09 milestone Mar 24, 2024
@fregataa fregataa self-assigned this Mar 24, 2024
@github-actions github-actions bot added comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated labels Mar 24, 2024
@github-actions github-actions bot added the size:L 100~500 LoC label Mar 24, 2024
@github-actions github-actions bot added size:M 30~100 LoC and removed size:L 100~500 LoC labels Mar 27, 2024
@github-actions github-actions bot added size:S 10~30 LoC and removed size:M 30~100 LoC labels Mar 27, 2024
@kyujin-cho kyujin-cho changed the title fix: early check when drop pk and add missing args in table fix: alembic migration failing when primary key does not exist Mar 27, 2024
@kyujin-cho kyujin-cho added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit 1c34a01 Mar 27, 2024
27 checks passed
@kyujin-cho kyujin-cho deleted the fix/migration-check-pk-and-handle-589c764a18f1-downgrade branch March 27, 2024 00:56
kyujin-cho added a commit that referenced this pull request Mar 27, 2024
Co-authored-by: Kyujin Cho <kyujin.cho@lablup.com>
Backported-from: main
Backported-to: 23.09
fregataa added a commit that referenced this pull request Mar 28, 2024
Co-authored-by: Kyujin Cho <kyujin.cho@lablup.com>
kyujin-cho added a commit that referenced this pull request Mar 31, 2024
Co-authored-by: Kyujin Cho <kyujin.cho@lablup.com>
Backported-from: main
Backported-to: 23.09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:S 10~30 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants