Statistics
| Branch: | Tag: | Revision:

root / cloudcms / migrate / cloudcmsblog / 0008_auto__chg_field_richtextcontent_text__chg_field_sectioncontent_richtex.py @ 6b9ccffa

History | View | Annotate | Download (16.4 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 'RichTextContent.text'
13
        db.alter_column('cloudcmsblog_entry_richtextcontent', 'text', self.gf('feincms.contrib.richtext.RichTextField')())
14

    
15
        # Changing field 'SectionContent.richtext'
16
        db.alter_column('cloudcmsblog_entry_sectioncontent', 'richtext', self.gf('feincms.contrib.richtext.RichTextField')())
17

    
18
        # Changing field 'SectionContent.mediafile'
19
        db.alter_column('cloudcmsblog_entry_sectioncontent', 'mediafile_id', self.gf('feincms.module.medialibrary.fields.MediaFileForeignKey')(null=True, to=orm['medialibrary.MediaFile']))
20
        # Adding field 'ImageContent.alt_text'
21
        db.add_column('cloudcmsblog_entry_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('cloudcmsblog_entry_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('cloudcmsblog_entry_imagecontent', 'image', self.gf('django.db.models.fields.files.ImageField')(max_length=255))
33

    
34
    def backwards(self, orm):
35

    
36
        # Changing field 'RichTextContent.text'
37
        db.alter_column('cloudcmsblog_entry_richtextcontent', 'text', self.gf('django.db.models.fields.TextField')())
38

    
39
        # Changing field 'SectionContent.richtext'
40
        db.alter_column('cloudcmsblog_entry_sectioncontent', 'richtext', self.gf('django.db.models.fields.TextField')())
41

    
42
        # Changing field 'SectionContent.mediafile'
43
        db.alter_column('cloudcmsblog_entry_sectioncontent', 'mediafile_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['medialibrary.MediaFile']))
44
        # Deleting field 'ImageContent.alt_text'
45
        db.delete_column('cloudcmsblog_entry_imagecontent', 'alt_text')
46

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

    
50

    
51
        # Changing field 'ImageContent.image'
52
        db.alter_column('cloudcmsblog_entry_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
        'cloudcmsblog.category': {
106
            'Meta': {'ordering': "['-ordering']", 'object_name': 'Category'},
107
            'display_on_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
108
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109
            'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
110
        },
111
        'cloudcmsblog.categorytranslation': {
112
            'Meta': {'ordering': "['title']", 'object_name': 'CategoryTranslation'},
113
            'description': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}),
114
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
115
            'language_code': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
116
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'to': "orm['cloudcmsblog.Category']"}),
117
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
118
            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
119
        },
120
        'cloudcmsblog.entry': {
121
            'Meta': {'ordering': "['-published_on']", 'object_name': 'Entry'},
122
            'application': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blogentries'", 'symmetrical': 'False', 'to': "orm['cloudcms.Application']"}),
123
            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'blogentries'", 'to': "orm['auth.User']"}),
124
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'blogentries'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['cloudcmsblog.Category']"}),
125
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126
            'image': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
127
            'intro_text': ('django.db.models.fields.TextField', [], {'max_length': '255', 'blank': 'True'}),
128
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
129
            'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
130
            'language': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
131
            'last_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
132
            'published_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'blank': 'True'}),
133
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100'}),
134
            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
135
        },
136
        'cloudcmsblog.imagecontent': {
137
            'Meta': {'ordering': "['ordering']", 'object_name': 'ImageContent', 'db_table': "'cloudcmsblog_entry_imagecontent'"},
138
            'alt_text': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
139
            'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
140
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255'}),
142
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
143
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'imagecontent_set'", 'to': "orm['cloudcmsblog.Entry']"}),
144
            'position': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '10'}),
145
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
146
        },
147
        'cloudcmsblog.rawcontent': {
148
            'Meta': {'ordering': "['ordering']", 'object_name': 'RawContent', 'db_table': "'cloudcmsblog_entry_rawcontent'"},
149
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
150
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
151
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rawcontent_set'", 'to': "orm['cloudcmsblog.Entry']"}),
152
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
153
            'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
154
        },
155
        'cloudcmsblog.richtextcontent': {
156
            'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContent', 'db_table': "'cloudcmsblog_entry_richtextcontent'"},
157
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
158
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
159
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontent_set'", 'to': "orm['cloudcmsblog.Entry']"}),
160
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
161
            'text': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'})
162
        },
163
        'cloudcmsblog.sectioncontent': {
164
            'Meta': {'ordering': "['ordering']", 'object_name': 'SectionContent', 'db_table': "'cloudcmsblog_entry_sectioncontent'"},
165
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
166
            'mediafile': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
167
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
168
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sectioncontent_set'", 'to': "orm['cloudcmsblog.Entry']"}),
169
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
170
            'richtext': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'}),
171
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
172
            'type': ('django.db.models.fields.CharField', [], {'default': "'block'", 'max_length': '10'})
173
        },
174
        'cloudcmsblog.templatecontent': {
175
            'Meta': {'ordering': "['ordering']", 'object_name': 'TemplateContent', 'db_table': "'cloudcmsblog_entry_templatecontent'"},
176
            'filename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
177
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
178
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
179
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'templatecontent_set'", 'to': "orm['cloudcmsblog.Entry']"}),
180
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
181
        },
182
        'contenttypes.contenttype': {
183
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
184
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
185
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
186
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
187
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
188
        },
189
        'medialibrary.category': {
190
            'Meta': {'ordering': "['parent__title', 'title']", 'object_name': 'Category'},
191
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
192
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
193
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150'}),
194
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
195
        },
196
        'medialibrary.mediafile': {
197
            'Meta': {'ordering': "['-created']", 'object_name': 'MediaFile'},
198
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
199
            'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
200
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
201
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
202
            'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
203
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
204
            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
205
        },
206
        'sites.site': {
207
            'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
208
            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
209
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
210
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
211
        }
212
    }
213

    
214
    complete_apps = ['cloudcmsblog']