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 # Adding model 'Collection'
12 db.create_table('catalogue_collection', (
13 ('title', self.gf('django.db.models.fields.CharField')(max_length=120, db_index=True)),
14 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, primary_key=True, db_index=True)),
15 ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
16 ('book_slugs', self.gf('django.db.models.fields.TextField')()),
18 db.send_create_signal('catalogue', ['Collection'])
21 def backwards(self, orm):
23 # Deleting model 'Collection'
24 db.delete_table('catalogue_collection')
29 'Meta': {'object_name': 'Group'},
30 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
32 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
35 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
36 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
37 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
38 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
39 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
42 'Meta': {'object_name': 'User'},
43 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
44 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
45 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
46 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
47 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
48 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
49 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
50 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
51 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
52 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
53 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
54 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
55 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
58 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
59 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
60 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
61 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
62 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
63 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
64 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
65 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
66 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
67 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
68 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
70 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
71 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
72 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
73 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
74 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
75 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
76 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
77 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
78 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
79 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
81 'catalogue.bookmedia': {
82 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
83 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
84 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
85 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
86 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
88 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
89 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
90 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
92 'catalogue.collection': {
93 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
94 'book_slugs': ('django.db.models.fields.TextField', [], {}),
95 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
96 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True', 'db_index': 'True'}),
97 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
99 'catalogue.fragment': {
100 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
101 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
102 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
103 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
104 'short_text': ('django.db.models.fields.TextField', [], {}),
105 'text': ('django.db.models.fields.TextField', [], {})
108 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
109 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
110 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
111 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
112 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
113 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
114 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
115 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
116 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
117 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
118 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
119 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
120 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
122 'catalogue.tagrelation': {
123 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
124 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
125 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
127 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
129 'contenttypes.contenttype': {
130 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
131 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
132 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
134 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
138 complete_apps = ['catalogue']