So, I'm looking for suggestions on how I can either
automatically generate DDL changesets -- not failsafe, but ones I can
then scan for completeness and use as a platform -- or aid me in
verifying that I have indeed identified all the changes made between
two schemas. If people are doing things as simple as a pg_dump of
the DDL and then running it through diff, that's great
As a devotee of the "thou shalt never run an upgrade script on thy live server that thou hast not first run on thy test server" school, I keep my upgrade scripts in a special svn directory and have a simple program that tracks which have already been run against the live one and applies ones that have not in the right order. It's not really production code but I'd be happy to share it.
Which could be an excellent motivation for trying to improve things, depending on how much you like challenges. :)
This is why I am asking this in respect to SqlAlchemy. SA supports
building a representation of the database in code, what's needed,
first, is a way to save/load that representation -- this may be
useful for other purposes -- and then second generate a delta between
two.
Well, save/load is simple with pickle. (Simpleminded) delta isn't very hard either. IMO anything along these lines belongs in a separate project, though.
--
Jonathan Ellis
http://spyced.blogspot.com