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