Michael Bayer wrote:
How can it be changed so that the column reflected from the DB and the column
calculated from the model end up being the same?
if schemas are being diffed, types can be compared "generically" using "type
affinity". This is described at:
http://www.sqlalchemy.org/trac/wiki/06Migration#ReflectionReturnsDialect-SpecificTypes
You could also take a reflected table and force all of its types down to the "generic"
ones using a hack like column.type.__class__ = column.type._type_affinity to change the class of
each type down to its "basic" version. But if a diff is all that's needed they should
be using that.
Cool, I shall have a look into that, thanks!
(FYI alembic will have no schema diff feature its not something I buy into much)
Unfortunately, I'm in an environment where people are accident prone /
lazy. Numbers in a version table do not imply the schema actually
matches the model ;-)
Schema diffing is the only way I can see to "be safe".
How's Alembic progressing? Some of the stuff in Migrate (like the monkey
patching of new bases classes into things like Table and Column) makes
my skin crawl, but I didn't see any checkins to Alembic in the last few
months...
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.