fix public_id migration for new installs

This commit is contained in:
j 2014-09-30 13:01:29 +00:00
parent e8de7a71a1
commit 80fdfb5e38

View file

@ -13,9 +13,10 @@ class Migration(SchemaMigration):
db.rename_column('item_item', 'itemId', 'public_id')
# Rename field 'ItemSort.itemId' to 'ItemSort.public_id'
itemsort = orm['item.ItemSort']
if 'itemId' in [f.name for f in itemsort._meta.fields]:
db.rename_column('item_itemsort', 'itemId', 'public_id')
def backwards(self, orm):
# Rename field 'Item.public_id' to 'Item.itemId'