root / cloudcms / migrate / cloudcmsfaq / 0001_initial.py @ 6b9ccffa
History | View | Annotate | Download (12.7 kB)
1 |
# encoding: 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 |
class Migration(SchemaMigration): |
8 |
|
9 |
depends_on = ( |
10 |
("cloudcms", "0011_auto__del_field_service_title_faq__del_field_service_title_userguide__"), |
11 |
) |
12 |
|
13 |
def forwards(self, orm): |
14 |
|
15 |
# Adding model 'Category'
|
16 |
db.create_table('cloudcmsfaq_category', (
|
17 |
('ordering', self.gf('django.db.models.fields.SmallIntegerField')(default=0)), |
18 |
('display_on_menu', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)), |
19 |
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
20 |
)) |
21 |
db.send_create_signal('cloudcmsfaq', ['Category']) |
22 |
|
23 |
# Adding model 'CategoryTranslation'
|
24 |
db.create_table('cloudcmsfaq_categorytranslation', (
|
25 |
('description', self.gf('django.db.models.fields.CharField')(max_length=250, blank=True)), |
26 |
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name='translations', to=orm['cloudcmsfaq.Category'])), |
27 |
('title', self.gf('django.db.models.fields.CharField')(max_length=100)), |
28 |
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
29 |
('language_code', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)), |
30 |
('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)), |
31 |
)) |
32 |
db.send_create_signal('cloudcmsfaq', ['CategoryTranslation']) |
33 |
|
34 |
# Adding model 'Question'
|
35 |
db.create_table('cloudcmsfaq_question', (
|
36 |
('category', self.gf('django.db.models.fields.related.ForeignKey')(related_name='faqs', to=orm['cloudcmsfaq.Category'])), |
37 |
('is_featured', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)), |
38 |
('language', self.gf('django.db.models.fields.CharField')(max_length=255)), |
39 |
('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='faqs', to=orm['auth.User'])), |
40 |
('last_changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), |
41 |
('title', self.gf('django.db.models.fields.CharField')(max_length=100)), |
42 |
('is_active', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)), |
43 |
('published_on', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, null=True, blank=True)), |
44 |
('slug', self.gf('django.db.models.fields.SlugField')(max_length=100, db_index=True)), |
45 |
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
46 |
)) |
47 |
db.send_create_signal('cloudcmsfaq', ['Question']) |
48 |
|
49 |
# Adding M2M table for field application on 'Question'
|
50 |
db.create_table('cloudcmsfaq_question_application', (
|
51 |
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
52 |
('question', models.ForeignKey(orm['cloudcmsfaq.question'], null=False)), |
53 |
('application', models.ForeignKey(orm['cloudcms.application'], null=False)) |
54 |
)) |
55 |
db.create_unique('cloudcmsfaq_question_application', ['question_id', 'application_id']) |
56 |
|
57 |
|
58 |
def backwards(self, orm): |
59 |
|
60 |
# Deleting model 'Category'
|
61 |
db.delete_table('cloudcmsfaq_category')
|
62 |
|
63 |
# Deleting model 'CategoryTranslation'
|
64 |
db.delete_table('cloudcmsfaq_categorytranslation')
|
65 |
|
66 |
# Deleting model 'Question'
|
67 |
db.delete_table('cloudcmsfaq_question')
|
68 |
|
69 |
# Removing M2M table for field application on 'Question'
|
70 |
db.delete_table('cloudcmsfaq_question_application')
|
71 |
|
72 |
|
73 |
models = { |
74 |
'auth.group': {
|
75 |
'Meta': {'object_name': 'Group'}, |
76 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
77 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
78 |
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
79 |
}, |
80 |
'auth.permission': {
|
81 |
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
82 |
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
83 |
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
84 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
85 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
86 |
}, |
87 |
'auth.user': {
|
88 |
'Meta': {'object_name': 'User'}, |
89 |
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
90 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
91 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
92 |
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
93 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
94 |
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
95 |
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
96 |
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
97 |
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
98 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
99 |
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
100 |
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
101 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
102 |
}, |
103 |
'cloudcms.application': {
|
104 |
'Meta': {'object_name': 'Application'}, |
105 |
'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
106 |
'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
107 |
'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
108 |
'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
109 |
'favicon': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'as_favicon'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}), |
110 |
'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
111 |
'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
112 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
113 |
'index_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255'}), |
114 |
'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
115 |
'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}), |
116 |
'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
117 |
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), |
118 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
119 |
'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) |
120 |
}, |
121 |
'cloudcmsfaq.category': {
|
122 |
'Meta': {'object_name': 'Category'}, |
123 |
'display_on_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
124 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
125 |
'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}) |
126 |
}, |
127 |
'cloudcmsfaq.categorytranslation': {
|
128 |
'Meta': {'object_name': 'CategoryTranslation'}, |
129 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}), |
130 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
131 |
'language_code': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}), |
132 |
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'to': "orm['cloudcmsfaq.Category']"}), |
133 |
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), |
134 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
135 |
}, |
136 |
'cloudcmsfaq.question': {
|
137 |
'Meta': {'object_name': 'Question'}, |
138 |
'application': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'faqs'", 'symmetrical': 'False', 'to': "orm['cloudcms.Application']"}), |
139 |
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['auth.User']"}), |
140 |
'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['cloudcmsfaq.Category']"}), |
141 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
142 |
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
143 |
'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
144 |
'language': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
145 |
'last_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
146 |
'published_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'blank': 'True'}), |
147 |
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), |
148 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
149 |
}, |
150 |
'contenttypes.contenttype': {
|
151 |
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
152 |
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
153 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
154 |
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
155 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
156 |
}, |
157 |
'medialibrary.category': {
|
158 |
'Meta': {'object_name': 'Category'}, |
159 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
160 |
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}), |
161 |
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150', 'db_index': 'True'}), |
162 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) |
163 |
}, |
164 |
'medialibrary.mediafile': {
|
165 |
'Meta': {'object_name': 'MediaFile'}, |
166 |
'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}), |
167 |
'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), |
168 |
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
169 |
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}), |
170 |
'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), |
171 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
172 |
'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}) |
173 |
}, |
174 |
'sites.site': {
|
175 |
'Meta': {'object_name': 'Site', 'db_table': "'django_site'"}, |
176 |
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
177 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
178 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
179 |
} |
180 |
} |
181 |
|
182 |
complete_apps = ['cloudcmsfaq']
|