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
autogen: bogus drop index/create constraint in SQL Server 2008R2 #185
Comments
Michael Bayer (@zzzeek) wrote: its unusual I've not observed this as I use SQL server quite a bit but this would indicate the reflection process is getting indexes and unique constraints mixed up. we have the same issue with PG and MySQL, in different ways, and the logic goes through huge hoops to try to be conservative on that so I'm puzzled what new combination SQL Server is reporting. |
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Marek Baczyński (@imbaczek) wrote: what kind of information would help you and how to get it? |
Michael Bayer (@zzzeek) wrote: I probably need to fire up my SQL server here and just run what you have |
Michael Bayer (@zzzeek) wrote: OK this is pretty simple. mssql dialect isn't doing unique constraints yet.
neither is oracle. but mssql is doing that "we report unique constraints as indexes" thing. So let's try to be smoother about that... perhaps if we detect an index/uq switch but we know unique index reflection isn't working, that's the sign. |
Michael Bayer (@zzzeek) wrote: The feature that keeps on giving, index/unique constraint autogenerate → 4bb4d50 |
Changes by Michael Bayer (@zzzeek):
|
Marek Baczyński (@imbaczek) wrote: fix confirmed, thanks! |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Marek Baczyński (@imbaczek)
DB: SQL Server 2008R2
SQLAlchemy==0.9.3
alembic==0.6.4dev
issuing
metadata.create_all()
and right after that (without modifying the model)alembic revision -m "..." --autogenerate
results in a surprising migration:expected result would be a noop migration.
The text was updated successfully, but these errors were encountered: