going production #21
[wolnelektury.git] / apps / picture / migrations / 0009_auto__add_field_picture_sort_key_author.py
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
6
7
8 class Migration(SchemaMigration):
9
10     def forwards(self, orm):
11         # Adding field 'Picture.sort_key_author'
12         db.add_column(u'picture_picture', 'sort_key_author',
13                       self.gf('django.db.models.fields.CharField')(default=u'', max_length=120, db_index=True),
14                       keep_default=False)
15
16
17     def backwards(self, orm):
18         # Deleting field 'Picture.sort_key_author'
19         db.delete_column(u'picture_picture', 'sort_key_author')
20
21
22     models = {
23         u'picture.picture': {
24             'Meta': {'ordering': "('sort_key',)", 'object_name': 'Picture'},
25             '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
26             'areas_json': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
27             'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
28             'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
29             'culturepl_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
30             'extra_info': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
31             'height': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
32             'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
33             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34             'image_file': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100'}),
35             'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
36             'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
37             'sort_key_author': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '120', 'db_index': 'True'}),
38             'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
39             'width': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
40             'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
41             'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
42         },
43         u'picture.picturearea': {
44             'Meta': {'object_name': 'PictureArea'},
45             'area': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
46             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47             'kind': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_index': 'True'}),
48             'picture': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'areas'", 'to': u"orm['picture.Picture']"})
49         }
50     }
51
52     complete_apps = ['picture']