1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding model 'Offer'
12 db.create_table('shop_offer', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('entry', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['migdal.Entry'], unique=True)),
15 ('price', self.gf('django.db.models.fields.DecimalField')(max_digits=6, decimal_places=2)),
16 ('cost_const', self.gf('django.db.models.fields.DecimalField')(max_digits=6, decimal_places=2)),
17 ('cost_per_item', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=6, decimal_places=2)),
19 db.send_create_signal('shop', ['Offer'])
21 # Adding model 'Order'
22 db.create_table('shop_order', (
23 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
24 ('offer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.Offer'])),
25 ('items', self.gf('django.db.models.fields.IntegerField')(default=1)),
26 ('name', self.gf('django.db.models.fields.CharField')(max_length=127, blank=True)),
27 ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, db_index=True)),
28 ('address', self.gf('django.db.models.fields.TextField')(db_index=True)),
29 ('payed_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)),
30 ('language_code', self.gf('django.db.models.fields.CharField')(max_length=2, null=True, blank=True)),
32 db.send_create_signal('shop', ['Order'])
35 def backwards(self, orm):
36 # Deleting model 'Offer'
37 db.delete_table('shop_offer')
39 # Deleting model 'Order'
40 db.delete_table('shop_order')
45 'Meta': {'object_name': 'Category'},
46 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'slug_en': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
48 'slug_pl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
49 'taxonomy': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
50 'title_en': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}),
51 'title_pl': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'})
54 'Meta': {'ordering': "['-date']", 'object_name': 'Entry'},
55 '_body_en_rendered': ('django.db.models.fields.TextField', [], {}),
56 '_body_pl_rendered': ('django.db.models.fields.TextField', [], {}),
57 '_lead_en_rendered': ('django.db.models.fields.TextField', [], {}),
58 '_lead_pl_rendered': ('django.db.models.fields.TextField', [], {}),
59 'author': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
60 'author_email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
61 'body_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
62 'body_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
63 'body_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
64 'body_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
65 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['migdal.Category']", 'null': 'True', 'blank': 'True'}),
66 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
67 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
68 'first_published_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
71 'in_stream': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
72 'lead_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
73 'lead_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
74 'lead_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
75 'lead_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
76 'needed_en': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1', 'db_index': 'True'}),
77 'promo': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
78 'published_at_en': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
79 'published_at_pl': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
80 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
81 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
82 'slug_en': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
83 'slug_pl': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
84 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
85 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
86 'type': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
89 'Meta': {'ordering': "['entry']", 'object_name': 'Offer'},
90 'cost_const': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}),
91 'cost_per_item': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '6', 'decimal_places': '2'}),
92 'entry': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['migdal.Entry']", 'unique': 'True'}),
93 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
94 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'})
97 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Order'},
98 'address': ('django.db.models.fields.TextField', [], {'db_index': 'True'}),
99 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'db_index': 'True'}),
100 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101 'items': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
102 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
103 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}),
104 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shop.Offer']"}),
105 'payed_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
109 complete_apps = ['shop']