Statistics
| Branch: | Tag: | Revision:

root / cloudcms / migrate / cloudcmsguide / 0002_auto__add_field_userguideentry_lft__add_field_userguideentry_rght__add.py @ 04fdd9d7

History | View | Annotate | Download (13 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
        # Adding field 'UserGuideEntry.lft'
12
        db.add_column('cloudcmsguide_userguideentry', 'lft',
13
                      self.gf('django.db.models.fields.PositiveIntegerField')(default=0, db_index=True),
14
                      keep_default=False)
15

    
16
        # Adding field 'UserGuideEntry.rght'
17
        db.add_column('cloudcmsguide_userguideentry', 'rght',
18
                      self.gf('django.db.models.fields.PositiveIntegerField')(default=0, db_index=True),
19
                      keep_default=False)
20

    
21
        # Adding field 'UserGuideEntry.tree_id'
22
        db.add_column('cloudcmsguide_userguideentry', 'tree_id',
23
                      self.gf('django.db.models.fields.PositiveIntegerField')(default=0, db_index=True),
24
                      keep_default=False)
25

    
26
        # Adding field 'UserGuideEntry.level'
27
        db.add_column('cloudcmsguide_userguideentry', 'level',
28
                      self.gf('django.db.models.fields.PositiveIntegerField')(default=0, db_index=True),
29
                      keep_default=False)
30

    
31
        # Adding field 'UserGuideEntry.parent'
32
        db.add_column('cloudcmsguide_userguideentry', 'parent',
33
                      self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['cloudcmsguide.UserGuideEntry']),
34
                      keep_default=False)
35

    
36

    
37
    def backwards(self, orm):
38
        # Deleting field 'UserGuideEntry.lft'
39
        db.delete_column('cloudcmsguide_userguideentry', 'lft')
40

    
41
        # Deleting field 'UserGuideEntry.rght'
42
        db.delete_column('cloudcmsguide_userguideentry', 'rght')
43

    
44
        # Deleting field 'UserGuideEntry.tree_id'
45
        db.delete_column('cloudcmsguide_userguideentry', 'tree_id')
46

    
47
        # Deleting field 'UserGuideEntry.level'
48
        db.delete_column('cloudcmsguide_userguideentry', 'level')
49

    
50
        # Deleting field 'UserGuideEntry.parent'
51
        db.delete_column('cloudcmsguide_userguideentry', 'parent_id')
52

    
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.service': {
85
            'Meta': {'ordering': "['-ordering']", 'object_name': 'Service'},
86
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87
            'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
88
        },
89
        'cloudcmsguide.imagecontent': {
90
            'Meta': {'ordering': "['ordering']", 'object_name': 'ImageContent', 'db_table': "'cloudcmsguide_userguideentry_imagecontent'"},
91
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
93
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
94
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'imagecontent_set'", 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
95
            'position': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '10'}),
96
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
97
        },
98
        'cloudcmsguide.rawcontent': {
99
            'Meta': {'ordering': "['ordering']", 'object_name': 'RawContent', 'db_table': "'cloudcmsguide_userguideentry_rawcontent'"},
100
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
102
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rawcontent_set'", 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
103
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
104
            'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
105
        },
106
        'cloudcmsguide.richtextcontent': {
107
            'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContent', 'db_table': "'cloudcmsguide_userguideentry_richtextcontent'"},
108
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
110
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontent_set'", 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
111
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
112
            'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
113
        },
114
        'cloudcmsguide.sectioncontent': {
115
            'Meta': {'ordering': "['ordering']", 'object_name': 'SectionContent', 'db_table': "'cloudcmsguide_userguideentry_sectioncontent'"},
116
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117
            'mediafile': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cloudcmsguide_sectioncontent_set'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
118
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
119
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sectioncontent_set'", 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
120
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
121
            'richtext': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
122
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
123
            'type': ('django.db.models.fields.CharField', [], {'default': "'block'", 'max_length': '10'})
124
        },
125
        'cloudcmsguide.templatecontent': {
126
            'Meta': {'ordering': "['ordering']", 'object_name': 'TemplateContent', 'db_table': "'cloudcmsguide_userguideentry_templatecontent'"},
127
            'filename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
128
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
129
            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
130
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'templatecontent_set'", 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
131
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
132
        },
133
        'cloudcmsguide.userguideentry': {
134
            'Meta': {'ordering': "['service', '-published_on']", 'object_name': 'UserGuideEntry'},
135
            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'guide_pages'", 'to': "orm['auth.User']"}),
136
            'creation_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
137
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
139
            'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
140
            'language': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
141
            'last_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
142
            'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
143
            'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
144
            'meta_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
145
            'meta_keywords': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
146
            'modification_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
147
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['cloudcmsguide.UserGuideEntry']"}),
148
            'published_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'blank': 'True'}),
149
            'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
150
            'service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'userguideentries'", 'null': 'True', 'to': "orm['cloudcms.Service']"}),
151
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100'}),
152
            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
153
            'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
154
        },
155
        'contenttypes.contenttype': {
156
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
157
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
158
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
160
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
161
        },
162
        'medialibrary.category': {
163
            'Meta': {'ordering': "['parent__title', 'title']", 'object_name': 'Category'},
164
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
165
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
166
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150'}),
167
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
168
        },
169
        'medialibrary.mediafile': {
170
            'Meta': {'object_name': 'MediaFile'},
171
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
172
            'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
173
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
174
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
175
            'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
176
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
177
            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
178
        }
179
    }
180

    
181
    complete_apps = ['cloudcmsguide']