Statistics
| Branch: | Tag: | Revision:

root / cloudcms / migrate / cloudcmsfaq / 0009_auto__chg_field_sectioncontent_richtext__chg_field_sectioncontent_medi.py @ ab055e94

History | View | Annotate | Download (17.3 kB)

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

    
12
        # Changing field 'SectionContent.richtext'
13
        db.alter_column('cloudcmsfaq_question_sectioncontent', 'richtext', self.gf('feincms.contrib.richtext.RichTextField')())
14

    
15
        # Changing field 'SectionContent.mediafile'
16
        db.alter_column('cloudcmsfaq_question_sectioncontent', 'mediafile_id', self.gf('feincms.module.medialibrary.fields.MediaFileForeignKey')(null=True, to=orm['medialibrary.MediaFile']))
17

    
18
        # Changing field 'RichTextContent.text'
19
        db.alter_column('cloudcmsfaq_question_richtextcontent', 'text', self.gf('feincms.contrib.richtext.RichTextField')())
20
        # Adding field 'ImageContent.alt_text'
21
        db.add_column('cloudcmsfaq_question_imagecontent', 'alt_text',
22
                      self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True),
23
                      keep_default=False)
24

    
25
        # Adding field 'ImageContent.caption'
26
        db.add_column('cloudcmsfaq_question_imagecontent', 'caption',
27
                      self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True),
28
                      keep_default=False)
29

    
30

    
31
        # Changing field 'ImageContent.image'
32
        db.alter_column('cloudcmsfaq_question_imagecontent', 'image', self.gf('django.db.models.fields.files.ImageField')(max_length=255))
33

    
34
    def backwards(self, orm):
35

    
36
        # Changing field 'SectionContent.richtext'
37
        db.alter_column('cloudcmsfaq_question_sectioncontent', 'richtext', self.gf('django.db.models.fields.TextField')())
38

    
39
        # Changing field 'SectionContent.mediafile'
40
        db.alter_column('cloudcmsfaq_question_sectioncontent', 'mediafile_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['medialibrary.MediaFile']))
41

    
42
        # Changing field 'RichTextContent.text'
43
        db.alter_column('cloudcmsfaq_question_richtextcontent', 'text', self.gf('django.db.models.fields.TextField')())
44
        # Deleting field 'ImageContent.alt_text'
45
        db.delete_column('cloudcmsfaq_question_imagecontent', 'alt_text')
46

    
47
        # Deleting field 'ImageContent.caption'
48
        db.delete_column('cloudcmsfaq_question_imagecontent', 'caption')
49

    
50

    
51
        # Changing field 'ImageContent.image'
52
        db.alter_column('cloudcmsfaq_question_imagecontent', 'image', self.gf('django.db.models.fields.files.ImageField')(max_length=100))
53

    
54
    models = {
55
        'auth.group': {
56
            'Meta': {'object_name': 'Group'},
57
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
58
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
59
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
60
        },
61
        'auth.permission': {
62
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
63
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
64
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
65
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
67
        },
68
        'auth.user': {
69
            'Meta': {'object_name': 'User'},
70
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
71
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
72
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
73
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
74
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
76
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
77
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
78
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
79
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
80
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
81
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
82
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
83
        },
84
        'cloudcms.application': {
85
            'Meta': {'object_name': 'Application'},
86
            'accounts_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
87
            'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
88
            'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
89
            'custom_message': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
90
            'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
91
            'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
92
            'favicon': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'as_favicon'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
93
            'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
94
            'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
95
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
96
            'index_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255'}),
97
            'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
98
            'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
99
            'message_type': ('django.db.models.fields.CharField', [], {'default': "'NM'", 'max_length': '20'}),
100
            'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
101
            'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
102
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
103
            'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
104
        },
105
        'cloudcms.service': {
106
            'Meta': {'ordering': "['-ordering']", 'object_name': 'Service'},
107
            'class_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
108
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109
            'image_faq': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'image_faq'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
110
            'image_userguide': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'image_userguide'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
111
            'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
112
        },
113
        'cloudcmsfaq.category': {
114
            'Meta': {'ordering': "['ordering']", 'object_name': 'Category'},
115
            'class_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
116
            'display_on_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
117
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118
            'image': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
119
            'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
120
        },
121
        'cloudcmsfaq.categorytranslation': {
122
            'Meta': {'ordering': "['title']", 'object_name': 'CategoryTranslation'},
123
            'description': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}),
124
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
125
            'language_code': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
126
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'to': "orm['cloudcmsfaq.Category']"}),
127
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
128
            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
129
        },
130
        'cloudcmsfaq.imagecontent': {
131
            'Meta': {'ordering': "['ordering']", 'object_name': 'ImageContent', 'db_table': "'cloudcmsfaq_question_imagecontent'"},
132
            'alt_text': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
133
            'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
134
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
135
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255'}),
136
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
137
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'imagecontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
138
            'position': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '10'}),
139
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
140
        },
141
        'cloudcmsfaq.question': {
142
            'Meta': {'ordering': "['service', 'category__ordering', 'published_on']", 'object_name': 'Question'},
143
            'application': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'faqs'", 'symmetrical': 'False', 'to': "orm['cloudcms.Application']"}),
144
            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['auth.User']"}),
145
            'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['cloudcmsfaq.Category']"}),
146
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
147
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
148
            'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
149
            'language': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
150
            'last_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
151
            'published_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
152
            'service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'null': 'True', 'to': "orm['cloudcms.Service']"}),
153
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100'}),
154
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
155
        },
156
        'cloudcmsfaq.rawcontent': {
157
            'Meta': {'ordering': "['ordering']", 'object_name': 'RawContent', 'db_table': "'cloudcmsfaq_question_rawcontent'"},
158
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
160
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rawcontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
161
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
162
            'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
163
        },
164
        'cloudcmsfaq.richtextcontent': {
165
            'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContent', 'db_table': "'cloudcmsfaq_question_richtextcontent'"},
166
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
167
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
168
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
169
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
170
            'text': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'})
171
        },
172
        'cloudcmsfaq.sectioncontent': {
173
            'Meta': {'ordering': "['ordering']", 'object_name': 'SectionContent', 'db_table': "'cloudcmsfaq_question_sectioncontent'"},
174
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
175
            'mediafile': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
176
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
177
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sectioncontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
178
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
179
            'richtext': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'}),
180
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
181
            'type': ('django.db.models.fields.CharField', [], {'default': "'block'", 'max_length': '10'})
182
        },
183
        'cloudcmsfaq.templatecontent': {
184
            'Meta': {'ordering': "['ordering']", 'object_name': 'TemplateContent', 'db_table': "'cloudcmsfaq_question_templatecontent'"},
185
            'filename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
186
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
187
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
188
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'templatecontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
189
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
190
        },
191
        'contenttypes.contenttype': {
192
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
193
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
194
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
195
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
196
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
197
        },
198
        'medialibrary.category': {
199
            'Meta': {'ordering': "['parent__title', 'title']", 'object_name': 'Category'},
200
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
201
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
202
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150'}),
203
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
204
        },
205
        'medialibrary.mediafile': {
206
            'Meta': {'ordering': "['-created']", 'object_name': 'MediaFile'},
207
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
208
            'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
209
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
210
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
211
            'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
212
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
213
            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
214
        },
215
        'sites.site': {
216
            'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
217
            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
218
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
219
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
220
        }
221
    }
222

    
223
    complete_apps = ['cloudcmsfaq']