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 field 'Book.changed_at'
12 db.add_column('catalogue_book', 'changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 2, 25, 15, 19, 36, 525463), db_index=True, blank=True), keep_default=False)
14 # Adding index on 'Book', fields ['created_at']
15 db.create_index('catalogue_book', ['created_at'])
17 # Adding field 'Tag.created_at'
18 db.add_column('catalogue_tag', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2011, 2, 25, 15, 19, 42, 921525), db_index=True, blank=True), keep_default=False)
20 # Adding field 'Tag.changed_at'
21 db.add_column('catalogue_tag', 'changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 2, 25, 15, 19, 45, 697471), db_index=True, blank=True), keep_default=False)
24 def backwards(self, orm):
26 # Removing index on 'Book', fields ['created_at']
27 db.delete_index('catalogue_book', ['created_at'])
29 # Deleting field 'Book.changed_at'
30 db.delete_column('catalogue_book', 'changed_at')
32 # Deleting field 'Tag.created_at'
33 db.delete_column('catalogue_tag', 'created_at')
35 # Deleting field 'Tag.changed_at'
36 db.delete_column('catalogue_tag', 'changed_at')
41 'Meta': {'object_name': 'Group'},
42 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
43 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
44 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
47 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
48 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
49 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
50 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
51 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
54 'Meta': {'object_name': 'User'},
55 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
56 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
57 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
58 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
59 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
61 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
62 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
63 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
64 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
65 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
66 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
67 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
70 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
71 '_short_html': ('django.db.models.fields.TextField', [], {}),
72 '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
73 '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
74 '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
75 '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
76 '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
77 '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
78 '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
79 '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
80 '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
81 '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
82 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
83 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
84 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
85 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
86 'extra_info': ('catalogue.fields.JSONField', [], {}),
87 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
88 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
91 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
92 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
93 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
94 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
95 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
96 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
97 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
99 'catalogue.bookmedia': {
100 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
101 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
102 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
103 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
104 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
106 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
107 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
108 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
110 'catalogue.filerecord': {
111 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
112 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
114 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
115 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
116 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
118 'catalogue.fragment': {
119 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
120 '_short_html': ('django.db.models.fields.TextField', [], {}),
121 '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
122 '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
123 '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
124 '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
125 '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
126 '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
127 '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
128 '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
129 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
130 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
131 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132 'short_text': ('django.db.models.fields.TextField', [], {}),
133 'text': ('django.db.models.fields.TextField', [], {})
136 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
137 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
138 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
139 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
140 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
141 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
142 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
143 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
144 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
145 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
146 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
147 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
148 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
149 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
151 'catalogue.tagrelation': {
152 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
153 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
154 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
155 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
156 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
158 'contenttypes.contenttype': {
159 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
160 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
161 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
162 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
163 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
167 complete_apps = ['catalogue']