Skip to content
Browse files

correcting migration

  • Loading branch information...
1 parent e962636 commit dc04c28a72a8841b84f67e65e0cd1cdb4c8489c6 Moose committed Dec 7, 2012
Showing with 10 additions and 12 deletions.
  1. +10 −12 stores/migrations/0002_auto__add_storestock.py
View
22 stores/migrations/0002_auto__add_storestock.py
@@ -11,8 +11,8 @@ def forwards(self, orm):
# Adding model 'StoreStock'
db.create_table('stores_storestock', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- (u'Store', self.gf('django.db.models.fields.related.ForeignKey')(related_name='stock', to=orm['stores.Store'])),
- ('product', self.gf('django.db.models.fields.related.OneToOneField')(related_name='store_stock', unique=True, to=orm['catalogue.Product'])),
+ ('store', self.gf('django.db.models.fields.related.ForeignKey')(related_name='stock', to=orm['stores.Store'])),
+ ('product', self.gf('django.db.models.fields.related.ForeignKey')(related_name='store_stock', to=orm['catalogue.Product'])),
('num_in_stock', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, null=True, blank=True)),
('num_allocated', self.gf('django.db.models.fields.IntegerField')(default=0, null=True, blank=True)),
('location', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
@@ -21,12 +21,10 @@ def forwards(self, orm):
))
db.send_create_signal('stores', ['StoreStock'])
-
def backwards(self, orm):
# Deleting model 'StoreStock'
db.delete_table('stores_storestock')
-
models = {
'address.country': {
'Meta': {'ordering': "('-is_highlighted', 'name')", 'object_name': 'Country'},
@@ -151,21 +149,21 @@ def backwards(self, orm):
},
'stores.openingperiod': {
'Meta': {'ordering': "['weekday']", 'object_name': 'OpeningPeriod'},
- u'Store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'opening_periods'", 'to': "orm['stores.Store']"}),
'end': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'start': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'opening_periods'", 'to': "orm['stores.Store']"}),
'weekday': ('django.db.models.fields.PositiveIntegerField', [], {})
},
'stores.store': {
- u'Group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'stores'", 'null': 'True', 'to': "orm['stores.StoreGroup']"}),
'Meta': {'object_name': 'Store'},
'description': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}),
+ 'group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'stores'", 'null': 'True', 'to': "orm['stores.StoreGroup']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_pickup_store': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'location': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
+ 'location': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '(32140,)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'reference': ('django.db.models.fields.CharField', [], {'max_length': '32', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True'})
@@ -188,11 +186,11 @@ def backwards(self, orm):
},
'stores.storecontact': {
'Meta': {'object_name': 'StoreContact'},
- u'Store': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'contact_details'", 'unique': 'True', 'to': "orm['stores.Store']"}),
'email': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'manager_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
- 'phone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
+ 'store': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'contact_details'", 'unique': 'True', 'to': "orm['stores.Store']"})
},
'stores.storegroup': {
'Meta': {'object_name': 'StoreGroup'},
@@ -202,15 +200,15 @@ def backwards(self, orm):
},
'stores.storestock': {
'Meta': {'object_name': 'StoreStock'},
- u'Store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stock'", 'to': "orm['stores.Store']"}),
'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'num_allocated': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
'num_in_stock': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
- 'product': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'store_stock'", 'unique': 'True', 'to': "orm['catalogue.Product']"})
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'store_stock'", 'to': "orm['catalogue.Product']"}),
+ 'store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stock'", 'to': "orm['stores.Store']"})
}
}
- complete_apps = ['stores']
+ complete_apps = ['stores']

0 comments on commit dc04c28

Please sign in to comment.
Something went wrong with that request. Please try again.