Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

correcting migration

  • Loading branch information...
commit dc04c28a72a8841b84f67e65e0cd1cdb4c8489c6 1 parent e962636
Jonathan Moss authored December 07, 2012
22  stores/migrations/0002_auto__add_storestock.py
@@ -11,8 +11,8 @@ def forwards(self, orm):
11 11
         # Adding model 'StoreStock'
12 12
         db.create_table('stores_storestock', (
13 13
             ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14  
-            (u'Store', self.gf('django.db.models.fields.related.ForeignKey')(related_name='stock', to=orm['stores.Store'])),
15  
-            ('product', self.gf('django.db.models.fields.related.OneToOneField')(related_name='store_stock', unique=True, to=orm['catalogue.Product'])),
  14
+            ('store', self.gf('django.db.models.fields.related.ForeignKey')(related_name='stock', to=orm['stores.Store'])),
  15
+            ('product', self.gf('django.db.models.fields.related.ForeignKey')(related_name='store_stock', to=orm['catalogue.Product'])),
16 16
             ('num_in_stock', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, null=True, blank=True)),
17 17
             ('num_allocated', self.gf('django.db.models.fields.IntegerField')(default=0, null=True, blank=True)),
18 18
             ('location', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
@@ -21,12 +21,10 @@ def forwards(self, orm):
21 21
         ))
22 22
         db.send_create_signal('stores', ['StoreStock'])
23 23
 
24  
-
25 24
     def backwards(self, orm):
26 25
         # Deleting model 'StoreStock'
27 26
         db.delete_table('stores_storestock')
28 27
 
29  
-
30 28
     models = {
31 29
         'address.country': {
32 30
             'Meta': {'ordering': "('-is_highlighted', 'name')", 'object_name': 'Country'},
@@ -151,21 +149,21 @@ def backwards(self, orm):
151 149
         },
152 150
         'stores.openingperiod': {
153 151
             'Meta': {'ordering': "['weekday']", 'object_name': 'OpeningPeriod'},
154  
-            u'Store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'opening_periods'", 'to': "orm['stores.Store']"}),
155 152
             'end': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
156 153
             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
157 154
             'start': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
  155
+            'store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'opening_periods'", 'to': "orm['stores.Store']"}),
158 156
             'weekday': ('django.db.models.fields.PositiveIntegerField', [], {})
159 157
         },
160 158
         'stores.store': {
161  
-            u'Group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'stores'", 'null': 'True', 'to': "orm['stores.StoreGroup']"}),
162 159
             'Meta': {'object_name': 'Store'},
163 160
             'description': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}),
  161
+            'group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'stores'", 'null': 'True', 'to': "orm['stores.StoreGroup']"}),
164 162
             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
165 163
             'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
166 164
             'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
167 165
             'is_pickup_store': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
168  
-            'location': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
  166
+            'location': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '(32140,)'}),
169 167
             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
170 168
             'reference': ('django.db.models.fields.CharField', [], {'max_length': '32', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
171 169
             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True'})
@@ -188,11 +186,11 @@ def backwards(self, orm):
188 186
         },
189 187
         'stores.storecontact': {
190 188
             'Meta': {'object_name': 'StoreContact'},
191  
-            u'Store': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'contact_details'", 'unique': 'True', 'to': "orm['stores.Store']"}),
192 189
             'email': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
193 190
             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
194 191
             'manager_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
195  
-            'phone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
  192
+            'phone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
  193
+            'store': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'contact_details'", 'unique': 'True', 'to': "orm['stores.Store']"})
196 194
         },
197 195
         'stores.storegroup': {
198 196
             'Meta': {'object_name': 'StoreGroup'},
@@ -202,15 +200,15 @@ def backwards(self, orm):
202 200
         },
203 201
         'stores.storestock': {
204 202
             'Meta': {'object_name': 'StoreStock'},
205  
-            u'Store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stock'", 'to': "orm['stores.Store']"}),
206 203
             'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
207 204
             'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
208 205
             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
209 206
             'location': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
210 207
             'num_allocated': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
211 208
             'num_in_stock': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
212  
-            'product': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'store_stock'", 'unique': 'True', 'to': "orm['catalogue.Product']"})
  209
+            'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'store_stock'", 'to': "orm['catalogue.Product']"}),
  210
+            'store': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stock'", 'to': "orm['stores.Store']"})
213 211
         }
214 212
     }
215 213
 
216  
-    complete_apps = ['stores']
  214
+    complete_apps = ['stores']

0 notes on commit dc04c28

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