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

Downgrade migration version may drop all foreign keys on some table. #380

Open
Mini256 opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@Mini256
Copy link
Member

Mini256 commented Nov 15, 2024

The default create_foreign_key / drop_constraint method doesn't gernated constraint name by alembic, it may result in alembic drop all the foreign keys on table when downgrade migration version, eventually leading to unexpected performance rollback.

https://github.com/pingcap/tidb.ai/blob/b27a3066e8de1562cab821e5fca5963328afea5a/backend/app/alembic/versions/04d4f05116ed_.py#L90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant