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 field 'Cite.image_shift'
12 db.add_column('social_cite', 'image_shift',
13 self.gf('django.db.models.fields.IntegerField')(null=True, blank=True),
16 # Adding index on 'Cite', fields ['sticky']
17 db.create_index('social_cite', ['sticky'])
20 # Changing field 'Cite.book'
21 db.alter_column('social_cite', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Book'], null=True))
23 def backwards(self, orm):
24 # Removing index on 'Cite', fields ['sticky']
25 db.delete_index('social_cite', ['sticky'])
27 # Deleting field 'Cite.image_shift'
28 db.delete_column('social_cite', 'image_shift')
31 # Changing field 'Cite.book'
32 db.alter_column('social_cite', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['catalogue.Book']))
36 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
37 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
38 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
39 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
40 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
41 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
42 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
43 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
44 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
45 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
46 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
47 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
48 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
49 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
50 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
51 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
52 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
53 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
54 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
55 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
56 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
57 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
58 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
59 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
62 'Meta': {'ordering': "('vip', 'text')", 'object_name': 'Cite'},
63 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']", 'null': 'True', 'blank': 'True'}),
64 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
66 'image_author': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
67 'image_license': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
68 'image_license_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
69 'image_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
70 'image_shift': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
71 'image_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
72 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
73 'small': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
74 'sticky': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
75 'text': ('django.db.models.fields.TextField', [], {}),
76 'vip': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'})
80 complete_apps = ['social']