Removed 'populate_default' arguments as they are not supported in older versions of migrate.

bzr-revno: 1809
Fixes: https://launchpad.net/bugs/896977
This commit is contained in:
Raoul Snyman 2011-11-30 22:32:04 +02:00
commit 3f50ea1b1a
1 changed files with 5 additions and 4 deletions

View File

@ -68,9 +68,9 @@ def upgrade_1(session, metadata, tables):
"""
Table(u'media_files_songs', metadata, autoload=True).drop(checkfirst=True)
Column(u'song_id', types.Integer(), default=None)\
.create(table=tables[u'media_files'], populate_default=True)
.create(table=tables[u'media_files'])
Column(u'weight', types.Integer(), default=0)\
.create(table=tables[u'media_files'], populate_default=True)
.create(table=tables[u'media_files'])
if metadata.bind.url.get_dialect().name != 'sqlite':
# SQLite doesn't support ALTER TABLE ADD CONSTRAINT
ForeignKeyConstraint([u'song_id'], [u'songs.id'],
@ -83,6 +83,7 @@ def upgrade_2(session, metadata, tables):
This upgrade adds a create_date and last_modified date to the songs table
"""
Column(u'create_date', types.DateTime(), default=func.now())\
.create(table=tables[u'songs'], populate_default=True)
.create(table=tables[u'songs'])
Column(u'last_modified', types.DateTime(), default=func.now())\
.create(table=tables[u'songs'], populate_default=True)
.create(table=tables[u'songs'])