Draft
Conversation
Inspector.from_engine is deprecated since 1.4.
URL() is deprecated since SQLAlchemy 1.4.
API changed in SQLAlchemy 1.4.
For unknown reasons, SQLAlchemy 1.4 doesn’t trigger the conflict when "None" is set as dualboot value. Explicitely removing the column gives the expected behavior back.
Thanks to SQLAlchemy 1.4, Alembic now knows how to handle identities (see sqlalchemy/alembic#730). For unknown reasons, identities are now detected as server default values for the Event table, and are put in database migrations. Explicitely setting the default value fixes the new alembic migrations, at least for tests.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #146.
Before merging this pull request, we have to solve 3 problems:
sqlalchemy-stubs(see support for sqlalchemy version 1.4 and 2.0 dropbox/sqlalchemy-stubs#184).INSERT … ON CONFLICT …whenNoneis set for a column with a default value set on the server (see a703487). It could be a bug in SQLAlchemy or a normal behavior. Removing the key from the request fixes the problem, but changes may also be needed somewhere else (where this corner case may not be tested).model.py). As Alembic misses identities in the model but has them in the created table, it adds the identity in future migrations. That’s at least right formigration_event(which is created during tests and thus needs a fix to make them pass), but probably right for other tables too. Explicitly using identities everywhere should fix the problem, if we ever really need to fix it.