It's very funny but couple of dayes ago I start to write some schema wvolution framework for django. I've read articles in django-code wiki about schema evolution and make some major decisions. I realized that the better way(for me) not to analize application model definition but to analize django-made DDL code. So I hame 2 DDL files with old schema definition and new. Old file stored in some "compiled" format in specific db (using Pickle module).When user changed his model definition he run schema_evolution.py <app_name> (from the djang- project root derectory). This script (its more than one file, it whole multi-file module:) ) gets from django CREATE TABLE statement and then starts to compare this one with stored earlier. Script parse (using pyparsing module) two files then try to find changes. It asks user for renamed tables/fields and then produced output python script that contains ALTER TABLE statements (that executed by cursor.execute() ). I plane to release my code under code.google project hosting. May be it can help somebody(and me of course) to spend less time with schema evolution/migration tasks. Thanks. Sorry for my English:)
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---