Migrations

2 views
Skip to first unread message

Mike H

unread,
May 2, 2008, 6:32:11 PM5/2/08
to blogmak...@googlegroups.com
Hi all,

I saw the discussion about database migrations and thought i'd let you
know that I have a version of dbmigration now running with the trunk
version of django. It also supports versions of migrations for
different engines.

If you want to supply migrations for postgres by default, what you
have is great and will work. If you want to supply an sqlite3 specific
version of the initial migration, create sqlite3/sql inside the
migrations directory and put the engine specific version in there.

It completely overrides the syncdb from django to make sure all
post_syncdb signals are handled correctly. There is a known bug, if
you use the django generated sql for sqlite3, please remove the quotes
around the column and table names, as I need to improve the query
splitting sql to handle them.

You can download the new version at http://www.aswmc.com/dbmigration-0-97.tar.bz2
and does not require any patching of django, just have the app
installed above any of the apps that use it, as normal.

Please let me know if you have any problems, although I am using this
package across quite a few projects without any issues so it should be
smooth for you. There are no changes to the models, so no schema
updates for existing installations are required.

Cheers,

Mike H

Mike H

unread,
May 2, 2008, 6:38:12 PM5/2/08
to blogmak...@googlegroups.com

Sorry, noticed an error there, the path to the engine specific sql
would be migrations/sql/ENGINE_NAME/MIGRATION_NAME.sql

Cheers,

Mike

Kent Johnson

unread,
May 2, 2008, 9:50:34 PM5/2/08
to blogmak...@googlegroups.com
Hi Mike,

This sounds good but we are still on Django 0.96 so I guess we will
have to wait.

Kent

Mike H

unread,
May 3, 2008, 5:54:30 AM5/3/08
to blogmak...@googlegroups.com

If it helps, the migrations/sql/ENGINE_NAME/MIGRATION_NAME.sql also
works in the 0.96 compatible dbmigration.

Cheers,

Mike

Reply all
Reply to author
Forward
0 new messages