-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
error while comparing json fields in schema against PostgreSQL DB with compare_server_default=True
option
#1119
Comments
hi - can this be expressed using the SQLAlchemy JSON datatype? I don't know what NestedMutableJson is, not sure if that's part of the problem (seems unlikely). |
also, does this fix?
would seem simple to achieve |
in some cases with SQLAlchemy JSON datatype session.commit() doesn't update json fields if it was changed I was expecting that this will be supported by SQLAlchemy by default with please look more into this
|
@zzzeek |
Describe the bug
Recently I've found that it's required to set implicitly
compare_type=True
andcompare_server_default=True
in alembic config to get expected comparing and changes autogeneration.With
compare_server_default=True
I started to receive this error:Expected behavior
I was expecting finally to verify my schema against databases for all stages and be sure all manual tweaks for all fields matches the schema.
To Reproduce
ALTER TABLE public.config ADD epochs json NOT NULL DEFAULT '[]'::json;
Error
Versions.
Additional context
Have a nice day!
The text was updated successfully, but these errors were encountered: