Rig up south to be happy with two of our models that FK to one another circularly.
This commit is contained in:
parent
bb7e5dd9f5
commit
d2d86871e9
3 changed files with 20 additions and 7 deletions
|
|
@ -6,6 +6,11 @@ from django.db import models
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
|
#depends_on = (
|
||||||
|
# ("players", "0001_initial"),
|
||||||
|
# ("comms", "0001_initial"),
|
||||||
|
#)
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding model 'Msg'
|
# Adding model 'Msg'
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,8 @@ class Migration(SchemaMigration):
|
||||||
('db_date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
('db_date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
||||||
('db_permissions', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
|
('db_permissions', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
|
||||||
('db_lock_storage', self.gf('django.db.models.fields.TextField')(blank=True)),
|
('db_lock_storage', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||||
('db_player', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['players.PlayerDB'], null=True, blank=True)),
|
# Moved to player migration
|
||||||
|
#('db_player', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['players.PlayerDB'], null=True, blank=True)),
|
||||||
('db_location', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='locations_set', null=True, to=orm['objects.ObjectDB'])),
|
('db_location', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='locations_set', null=True, to=orm['objects.ObjectDB'])),
|
||||||
('db_home', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='homes_set', null=True, to=orm['objects.ObjectDB'])),
|
('db_home', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='homes_set', null=True, to=orm['objects.ObjectDB'])),
|
||||||
('db_cmdset_storage', self.gf('django.db.models.fields.TextField')(null=True)),
|
('db_cmdset_storage', self.gf('django.db.models.fields.TextField')(null=True)),
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ from django.db import models
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
|
depends_on = (
|
||||||
|
("objects", "0001_initial"),
|
||||||
|
)
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding model 'PlayerAttribute'
|
# Adding model 'PlayerAttribute'
|
||||||
|
|
@ -33,6 +37,9 @@ class Migration(SchemaMigration):
|
||||||
))
|
))
|
||||||
db.send_create_signal('players', ['PlayerDB'])
|
db.send_create_signal('players', ['PlayerDB'])
|
||||||
|
|
||||||
|
# Hack to get around circular table creation.
|
||||||
|
db.add_column('objects_objectdb', 'db_player', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['players.PlayerDB'], null=True, blank=True))
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue