migrations off for dry runs
parent
7affe92c8d
commit
61b81219cb
|
@ -22,6 +22,7 @@ class Migration(SchemaMigration):
|
|||
db.create_unique('core_identifier', ['type', 'value'])
|
||||
|
||||
# migrating data
|
||||
if not db.dry_run:
|
||||
for work in orm.Work.objects.all():
|
||||
if work.librarything_id:
|
||||
identifier = orm.Identifier.objects.create(type='ltwk',value=work.librarything_id, work=work)
|
||||
|
|
|
@ -54,6 +54,8 @@ class Migration(SchemaMigration):
|
|||
db.add_column('core_edition', 'librarything_id', self.gf('django.db.models.fields.CharField')(max_length=50, null=True), keep_default=False)
|
||||
|
||||
# migrating data
|
||||
if not db.dry_run:
|
||||
|
||||
for identifier in orm.Identifier.objects.all():
|
||||
if identifier.type=='ltwk':
|
||||
identifier.work.librarything_id = identifier.value
|
||||
|
|
Loading…
Reference in New Issue