Update previous migration, updating the uniqueness parameters. To re-run the previous migration, first do evennia migrate --fake 0006, then run evennia migrate again.
This commit is contained in:
parent
05b2d74cee
commit
b6a4997a97
2 changed files with 13 additions and 3 deletions
|
|
@ -70,5 +70,15 @@ class Migration(migrations.Migration):
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunPython(update_tags_with_dbmodel)
|
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='tag',
|
||||||
|
unique_together=set([('db_key', 'db_category', 'db_tagtype', 'db_model')]),
|
||||||
|
),
|
||||||
|
migrations.AlterIndexTogether(
|
||||||
|
name='tag',
|
||||||
|
index_together=set([('db_key', 'db_category', 'db_tagtype', 'db_model')]),
|
||||||
|
),
|
||||||
|
|
||||||
|
migrations.RunPython(update_tags_with_dbmodel)
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ class Tag(models.Model):
|
||||||
class Meta(object):
|
class Meta(object):
|
||||||
"Define Django meta options"
|
"Define Django meta options"
|
||||||
verbose_name = "Tag"
|
verbose_name = "Tag"
|
||||||
unique_together = (('db_key', 'db_category', 'db_tagtype'),)
|
unique_together = (('db_key', 'db_category', 'db_tagtype', 'db_model'),)
|
||||||
index_together = (('db_key', 'db_category', 'db_tagtype'),)
|
index_together = (('db_key', 'db_category', 'db_tagtype', 'db_model'),)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return u"<Tag: %s%s>" % (self.db_key, "(category:%s)" % self.db_category if self.db_category else "")
|
return u"<Tag: %s%s>" % (self.db_key, "(category:%s)" % self.db_category if self.db_category else "")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue