[sqlalchemy] Re: Schema and database migration: how to diff?
On Friday 06 June 2008 02:06:23 Yannick Gingras wrote: [EMAIL PROTECTED] writes: see dbcook.misc.metadata.diff.py as an attempt to do this over 2 metadata's. svn co https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/mi sc/metadata It works pretty well. How about a small cleanup to make it truly general an a promotion to a package of its own? With the `changeset` parts of sqlalchemy_migration, we could generate most of the upgrade script from the computed diff. Unless you already do that and I missed that part somehow. no, this is all i have - didnt have time/urge to go further then. whatever u want to do/can do - do it. i'm digging into different cave / inventing another hotwater right now. if u want to discuss the changes, send them over. repository-wise, it can stay there - if u want write access - or it can go elsewhere... hmm. there seems to be a host of SA-based SA-enhancing things that are around... mine are bitemporal, aggregation, metadata-related stuff, some multilang-support... polymorphism-simulation a-la C/Corba-union-like ... most of these are not just recipes. maybe it is time to put them in some page of their own... have fun svilen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Schema and database migration: how to diff?
[EMAIL PROTECTED] writes: see dbcook.misc.metadata.diff.py as an attempt to do this over 2 metadata's. svn co https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/misc/metadata It works pretty well. How about a small cleanup to make it truly general an a promotion to a package of its own? With the `changeset` parts of sqlalchemy_migration, we could generate most of the upgrade script from the computed diff. Unless you already do that and I missed that part somehow. -- Yannick Gingras --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Schema and database migration: how to diff?
see dbcook.misc.metadata.diff.py as an attempt to do this over 2 metadata's. svn co https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/misc/metadata '''attempt of tree-comparison over metadata. recognised primitives are insert, delete, change of detail. cannot recognise rename/move. links/dependencies are not looked at. ''' dbcook is not needed, except to run the example/test. but in any case, this would not replace u the human-made decisions, version2version. ciao svilen On Tuesday 03 June 2008 00:39:22 Yannick Gingras wrote: Greetings alchemists, I'm trying to setup the migration strategy for our project and I'm looking for some kind of schema differ. I took a look at sqlalchemy_migrate: the changeset module provides interesting functionalities to add columns, alter tables, and create constraints on an existing database but the versioning parts seems clumsy and fragile: I have to perform all the schema upgrade by hand and I have to keep track of the upgrade with some kind of crude revision control system. There is that and the fact that the doc is out of date which convince me that I have to find some other solution. All our table definitions are written in Python with the Alchemy ORM facility; nothing is inferred through autoload. I guess we could get a rough idea of the changes by walking the list of table with and comparing the column names in both version. The diff for a new column would be easy enough to compute and we could trigger and error if the column is changed so a human could write the appropriate alter statement. I'm sure I'm not the first to look for a solution to schema upgrade. Is there a package out there to compute the differences between two versions of a schema? If not, what gotchas should I know about before I try my hand at such a framework? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---