3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
7 class Migration(SchemaMigration):
9 def forwards(self, orm):
11 # Deleting field 'Book._short_html_en'
12 db.delete_column('catalogue_book', '_short_html_en')
14 # Deleting field 'Book._short_html_es'
15 db.delete_column('catalogue_book', '_short_html_es')
17 # Deleting field 'Book._theme_counter'
18 db.delete_column('catalogue_book', '_theme_counter')
20 # Deleting field 'Book._short_html_de'
21 db.delete_column('catalogue_book', '_short_html_de')
23 # Deleting field 'Book._short_html_fr'
24 db.delete_column('catalogue_book', '_short_html_fr')
26 # Deleting field 'Book._short_html_uk'
27 db.delete_column('catalogue_book', '_short_html_uk')
29 # Deleting field 'Book._short_html_pl'
30 db.delete_column('catalogue_book', '_short_html_pl')
32 # Deleting field 'Book._short_html_lt'
33 db.delete_column('catalogue_book', '_short_html_lt')
35 # Deleting field 'Book._short_html_ru'
36 db.delete_column('catalogue_book', '_short_html_ru')
38 # Deleting field 'Book._short_html'
39 db.delete_column('catalogue_book', '_short_html')
41 # Deleting field 'Book._tag_counter'
42 db.delete_column('catalogue_book', '_tag_counter')
44 # Deleting field 'Fragment._short_html_de'
45 db.delete_column('catalogue_fragment', '_short_html_de')
47 # Deleting field 'Fragment._short_html_en'
48 db.delete_column('catalogue_fragment', '_short_html_en')
50 # Deleting field 'Fragment._short_html_fr'
51 db.delete_column('catalogue_fragment', '_short_html_fr')
53 # Deleting field 'Fragment._short_html_es'
54 db.delete_column('catalogue_fragment', '_short_html_es')
56 # Deleting field 'Fragment._short_html_uk'
57 db.delete_column('catalogue_fragment', '_short_html_uk')
59 # Deleting field 'Fragment._short_html_pl'
60 db.delete_column('catalogue_fragment', '_short_html_pl')
62 # Deleting field 'Fragment._short_html_lt'
63 db.delete_column('catalogue_fragment', '_short_html_lt')
65 # Deleting field 'Fragment._short_html_ru'
66 db.delete_column('catalogue_fragment', '_short_html_ru')
68 # Deleting field 'Fragment._short_html'
69 db.delete_column('catalogue_fragment', '_short_html')
72 def backwards(self, orm):
74 # Adding field 'Book._short_html_en'
75 db.add_column('catalogue_book', '_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
77 # Adding field 'Book._short_html_es'
78 db.add_column('catalogue_book', '_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
80 # Adding field 'Book._theme_counter'
81 db.add_column('catalogue_book', '_theme_counter', self.gf('catalogue.fields.JSONField')(null=True), keep_default=False)
83 # Adding field 'Book._short_html_de'
84 db.add_column('catalogue_book', '_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
86 # Adding field 'Book._short_html_fr'
87 db.add_column('catalogue_book', '_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
89 # Adding field 'Book._short_html_uk'
90 db.add_column('catalogue_book', '_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
92 # Adding field 'Book._short_html_pl'
93 db.add_column('catalogue_book', '_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
95 # Adding field 'Book._short_html_lt'
96 db.add_column('catalogue_book', '_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
98 # Adding field 'Book._short_html_ru'
99 db.add_column('catalogue_book', '_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
101 # Adding field 'Book._short_html'
102 db.add_column('catalogue_book', '_short_html', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False)
104 # Adding field 'Book._tag_counter'
105 db.add_column('catalogue_book', '_tag_counter', self.gf('catalogue.fields.JSONField')(null=True), keep_default=False)
107 # Adding field 'Fragment._short_html_de'
108 db.add_column('catalogue_fragment', '_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
110 # Adding field 'Fragment._short_html_en'
111 db.add_column('catalogue_fragment', '_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
113 # Adding field 'Fragment._short_html_fr'
114 db.add_column('catalogue_fragment', '_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
116 # Adding field 'Fragment._short_html_es'
117 db.add_column('catalogue_fragment', '_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
119 # Adding field 'Fragment._short_html_uk'
120 db.add_column('catalogue_fragment', '_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
122 # Adding field 'Fragment._short_html_pl'
123 db.add_column('catalogue_fragment', '_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
125 # Adding field 'Fragment._short_html_lt'
126 db.add_column('catalogue_fragment', '_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
128 # Adding field 'Fragment._short_html_ru'
129 db.add_column('catalogue_fragment', '_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
131 # Adding field 'Fragment._short_html'
132 db.add_column('catalogue_fragment', '_short_html', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False)
137 'Meta': {'object_name': 'Group'},
138 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
139 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
140 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
143 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
144 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
145 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
146 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
147 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
150 'Meta': {'object_name': 'User'},
151 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
152 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
153 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
154 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
155 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
156 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
157 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
158 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
159 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
160 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
161 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
162 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
163 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
166 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
167 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
168 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
169 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
170 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
171 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
172 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
173 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
174 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
175 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
176 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
177 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
178 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
179 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
180 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
181 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
182 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
183 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
185 'catalogue.bookmedia': {
186 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
187 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
188 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
189 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
190 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
191 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
192 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
193 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
194 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
196 'catalogue.filerecord': {
197 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
198 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
199 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
200 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
201 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
202 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
204 'catalogue.fragment': {
205 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
206 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
207 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
208 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
209 'short_text': ('django.db.models.fields.TextField', [], {}),
210 'text': ('django.db.models.fields.TextField', [], {})
213 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
214 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
215 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
216 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
217 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
218 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
219 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
220 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
221 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
222 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
223 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
224 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
225 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
226 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
228 'catalogue.tagrelation': {
229 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
230 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
231 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
232 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
233 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
235 'contenttypes.contenttype': {
236 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
237 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
238 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
239 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
240 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
244 complete_apps = ['catalogue']