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

change rules for SQLIte batch alter_column for special cases #883

Closed
zzzeek opened this issue Aug 7, 2021 Discussed in #882 · 1 comment
Closed

change rules for SQLIte batch alter_column for special cases #883

zzzeek opened this issue Aug 7, 2021 Discussed in #882 · 1 comment
Labels
batch migrations bug Something isn't working sqlite

Comments

@zzzeek
Copy link
Member

zzzeek commented Aug 7, 2021

Discussed in #882

According to this SQLite's official document, "add column" with a primary key or unique key constraint, or having some kinds of server default needs the recreate style:

https://www.sqlite.org/lang_altertable.html#alter_table_add_column

code here we are changing is in sqlite.py

@zzzeek zzzeek added bug Something isn't working batch migrations sqlite labels Aug 7, 2021
@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the master branch:

qualify sqlite batch add column for dynamic defaults https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/2995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
batch migrations bug Something isn't working sqlite
Projects
None yet
Development

No branches or pull requests

2 participants