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 'Category'
12 db.create_table('migdal_category', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('slug_pl', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
15 ('slug_en', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
16 ('title_pl', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64, db_index=True)),
17 ('title_en', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64, db_index=True)),
19 db.send_create_signal('migdal', ['Category'])
21 # Adding model 'Entry'
22 db.create_table('migdal_entry', (
23 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
24 ('type', self.gf('django.db.models.fields.CharField')(max_length=16, db_index=True)),
25 ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
26 ('author', self.gf('django.db.models.fields.CharField')(max_length=128)),
27 ('author_email', self.gf('django.db.models.fields.EmailField')(max_length=128, null=True, blank=True)),
28 ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True)),
29 ('promo', self.gf('django.db.models.fields.BooleanField')(default=False)),
30 ('slug_pl', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
31 ('title_pl', self.gf('django.db.models.fields.CharField')(max_length=255)),
32 ('lead_pl', self.gf('markupfield.fields.MarkupField')(rendered_field=True)),
33 ('lead_pl_markup_type', self.gf('django.db.models.fields.CharField')(default='textile_pl', max_length=30)),
34 ('_lead_pl_rendered', self.gf('django.db.models.fields.TextField')()),
35 ('slug_en', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True, null=True, blank=True)),
36 ('title_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
37 ('lead_en', self.gf('markupfield.fields.MarkupField')(null=True, rendered_field=True, blank=True)),
38 ('needed_en', self.gf('django.db.models.fields.CharField')(default='n', max_length=1, db_index=True)),
39 ('lead_en_markup_type', self.gf('django.db.models.fields.CharField')(default='textile_pl', max_length=30, blank=True)),
40 ('_lead_en_rendered', self.gf('django.db.models.fields.TextField')()),
41 ('body_pl', self.gf('markupfield.fields.MarkupField')(null=True, rendered_field=True, blank=True)),
42 ('body_en', self.gf('markupfield.fields.MarkupField')(null=True, rendered_field=True, blank=True)),
43 ('body_pl_markup_type', self.gf('django.db.models.fields.CharField')(default='textile_pl', max_length=30, blank=True)),
44 ('body_en_markup_type', self.gf('django.db.models.fields.CharField')(default='textile_pl', max_length=30, blank=True)),
45 ('published_pl', self.gf('django.db.models.fields.BooleanField')(default=False)),
46 ('published_en', self.gf('django.db.models.fields.BooleanField')(default=False)),
47 ('_body_pl_rendered', self.gf('django.db.models.fields.TextField')()),
48 ('_body_en_rendered', self.gf('django.db.models.fields.TextField')()),
50 db.send_create_signal('migdal', ['Entry'])
52 # Adding M2M table for field categories on 'Entry'
53 db.create_table('migdal_entry_categories', (
54 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
55 ('entry', models.ForeignKey(orm['migdal.entry'], null=False)),
56 ('category', models.ForeignKey(orm['migdal.category'], null=False))
58 db.create_unique('migdal_entry_categories', ['entry_id', 'category_id'])
60 # Adding model 'Attachment'
61 db.create_table('migdal_attachment', (
62 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
63 ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
64 ('entry', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['migdal.Entry'])),
66 db.send_create_signal('migdal', ['Attachment'])
69 def backwards(self, orm):
70 # Deleting model 'Category'
71 db.delete_table('migdal_category')
73 # Deleting model 'Entry'
74 db.delete_table('migdal_entry')
76 # Removing M2M table for field categories on 'Entry'
77 db.delete_table('migdal_entry_categories')
79 # Deleting model 'Attachment'
80 db.delete_table('migdal_attachment')
84 'migdal.attachment': {
85 'Meta': {'object_name': 'Attachment'},
86 'entry': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['migdal.Entry']"}),
87 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
88 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
91 'Meta': {'object_name': 'Category'},
92 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'slug_en': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
94 'slug_pl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
95 'title_en': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}),
96 'title_pl': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'})
99 'Meta': {'ordering': "['-date']", 'object_name': 'Entry'},
100 '_body_en_rendered': ('django.db.models.fields.TextField', [], {}),
101 '_body_pl_rendered': ('django.db.models.fields.TextField', [], {}),
102 '_lead_en_rendered': ('django.db.models.fields.TextField', [], {}),
103 '_lead_pl_rendered': ('django.db.models.fields.TextField', [], {}),
104 'author': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
105 'author_email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
106 'body_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
107 'body_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
108 'body_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
109 'body_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
110 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['migdal.Category']", 'null': 'True', 'blank': 'True'}),
111 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
112 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
114 'lead_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}),
115 'lead_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}),
116 'lead_pl': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True'}),
117 'lead_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30'}),
118 'needed_en': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1', 'db_index': 'True'}),
119 'promo': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
120 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
121 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
122 'slug_en': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
123 'slug_pl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
124 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
125 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
126 'type': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
130 complete_apps = ['migdal']