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):
12 # Changing field 'Book.pdf_file'
13 db.alter_column('catalogue_book', 'pdf_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='pdf'))
15 # Changing field 'Book.html_file'
16 db.alter_column('catalogue_book', 'html_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='html'))
18 # Changing field 'Book.xml_file'
19 db.alter_column('catalogue_book', 'xml_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='xml'))
21 # Changing field 'Book.txt_file'
22 db.alter_column('catalogue_book', 'txt_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='txt'))
24 # Changing field 'Book.fb2_file'
25 db.alter_column('catalogue_book', 'fb2_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='fb2'))
27 # Changing field 'Book.mobi_file'
28 db.alter_column('catalogue_book', 'mobi_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='mobi'))
30 # Changing field 'Book.epub_file'
31 db.alter_column('catalogue_book', 'epub_file', self.gf('catalogue.fields.EbookField')(max_length=100, format_name='epub'))
33 # Changing field 'Book.cover'
34 db.alter_column('catalogue_book', 'cover', self.gf('catalogue.fields.EbookField')(max_length=100, null=True, format_name='cover'))
36 def backwards(self, orm):
38 # Changing field 'Book.pdf_file'
39 db.alter_column('catalogue_book', 'pdf_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
41 # Changing field 'Book.html_file'
42 db.alter_column('catalogue_book', 'html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
44 # Changing field 'Book.xml_file'
45 db.alter_column('catalogue_book', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
47 # Changing field 'Book.txt_file'
48 db.alter_column('catalogue_book', 'txt_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
50 # Changing field 'Book.fb2_file'
51 db.alter_column('catalogue_book', 'fb2_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
53 # Changing field 'Book.mobi_file'
54 db.alter_column('catalogue_book', 'mobi_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
56 # Changing field 'Book.epub_file'
57 db.alter_column('catalogue_book', 'epub_file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
59 # Changing field 'Book.cover'
60 db.alter_column('catalogue_book', 'cover', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
64 'Meta': {'object_name': 'Group'},
65 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
67 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
70 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
71 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
72 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
73 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
77 'Meta': {'object_name': 'User'},
78 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
79 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
80 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
81 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
82 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
83 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
84 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
85 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
86 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
87 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
88 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
89 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
90 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
93 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
94 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
95 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
96 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
97 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
98 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
99 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
100 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
101 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
102 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
103 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
104 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
105 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
106 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
107 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
108 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
109 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
110 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
111 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
112 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
113 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
114 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
115 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
116 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
118 'catalogue.bookmedia': {
119 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
120 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
121 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
122 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
123 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
125 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
126 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
127 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
129 'catalogue.collection': {
130 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
131 'book_slugs': ('django.db.models.fields.TextField', [], {}),
132 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
133 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True'}),
134 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
136 'catalogue.fragment': {
137 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
138 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
139 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
140 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141 'short_text': ('django.db.models.fields.TextField', [], {}),
142 'text': ('django.db.models.fields.TextField', [], {})
145 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
146 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
147 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
148 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
149 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
150 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
151 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
152 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
153 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
154 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
155 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
156 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
157 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
159 'catalogue.tagrelation': {
160 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
161 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
162 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
163 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
164 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
166 'contenttypes.contenttype': {
167 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
168 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
169 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
170 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
171 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
175 complete_apps = ['catalogue']