You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a connection without decoded_responses=True (and maybe with different charset) will create false positive migrations, because of distinct types, i.e. bytes and str for stored_hash and current_hash respectively.
I guess that a default encoding schema for bytes responses would suffice, or a user warning.
The text was updated successfully, but these errors were encountered:
m=Migrator()
# should migrateassertlen(m.migrations) ==0m.detect_migrations()
assertlen(m.migrations) >0# run, m.run()
# reset migrations because migrator does not m.migrations= []
# already migrated, should not have migrations after detectionm.detect_migrations()
assertlen(m.migrations) ==0# raises
(for true positive migration checks, you can easily verify that the above code does not raise, if you change to decode_responses=True, there will be no error. Remember of course to wipe out whatever was written into the db)
Disclaimer: I lack knowledge on redis internals, and on the design criteria of the object mapping library.
Issue:
The migrator when running through the
model_registry
performs a hash calculation for the current schemato then compare it to the one it gets from the db
a connection without
decoded_responses=True
(and maybe with different charset) will create false positive migrations, because of distinct types, i.e.bytes
andstr
forstored_hash
andcurrent_hash
respectively.I guess that a default encoding schema for
bytes
responses would suffice, or a user warning.The text was updated successfully, but these errors were encountered: