1 from south.v2 import DataMigration
2 from south.orm import FakeORM
4 class Migration(DataMigration):
5 def forwards(self, orm):
9 def backwards(self, orm):
10 "Write your backwards methods here."
14 'Meta': {'object_name': 'Group'},
15 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
16 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
17 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
20 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
21 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
22 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
23 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
24 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
27 'Meta': {'object_name': 'User'},
28 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
29 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
30 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
31 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
32 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
33 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
34 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
35 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
36 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
37 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
38 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
39 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
40 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
42 'contenttypes.contenttype': {
43 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
44 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
45 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
47 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
50 'Meta': {'object_name': 'Action'},
51 'action_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
52 'action_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
53 'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
54 'canceled_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
55 'canceled_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'canceled_actions'", 'null': 'True', 'to': "orm['forum.User']"}),
56 'canceled_ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
57 'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
60 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'null': 'True', 'to': "orm['forum.Node']"}),
61 'real_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'proxied_actions'", 'null': 'True', 'to': "orm['forum.User']"}),
62 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'to': "orm['forum.User']"})
64 'forum.actionrepute': {
65 'Meta': {'object_name': 'ActionRepute'},
66 'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.Action']"}),
67 'by_canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
68 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.User']"}),
71 'value': ('django.db.models.fields.IntegerField', [], {'default': '0'})
73 'forum.authkeyuserassociation': {
74 'Meta': {'object_name': 'AuthKeyUserAssociation'},
75 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
76 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
78 'provider': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
79 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_keys'", 'to': "orm['forum.User']"})
82 'Meta': {'unique_together': "(('user', 'badge', 'node'),)", 'object_name': 'Award'},
83 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'award'", 'unique': 'True', 'to': "orm['forum.Action']"}),
84 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
85 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'to': "orm['forum.Badge']"}),
86 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),
88 'trigger': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'null': 'True', 'to': "orm['forum.Action']"}),
89 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
92 'Meta': {'object_name': 'Badge'},
93 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
94 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['forum.Award']", 'to': "orm['forum.User']"}),
95 'cls': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
96 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
97 'type': ('django.db.models.fields.SmallIntegerField', [], {})
100 'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Flag'},
101 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'flag'", 'unique': 'True', 'to': "orm['forum.Action']"}),
102 'flagged_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
103 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
104 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.Node']"}),
105 'reason': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
106 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.User']"})
109 'Meta': {'object_name': 'KeyValue'},
110 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
111 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
112 'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})
115 'Meta': {'object_name': 'MarkedTag'},
116 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
118 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['forum.Tag']"}),
119 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['forum.User']"})
122 'Meta': {'object_name': 'Node'},
123 'abs_parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_children'", 'null': 'True', 'to': "orm['forum.Node']"}),
124 'active_revision': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'active'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.NodeRevision']"}),
125 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
126 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['forum.User']"}),
127 'body': ('django.db.models.fields.TextField', [], {}),
128 'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),
129 'extra_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
130 'extra_ref': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),
131 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
133 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']", 'null': 'True'}),
134 'last_edited': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edited_node'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.Action']"}),
135 'marked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
136 'node_type': ('django.db.models.fields.CharField', [], {'default': "'node'", 'max_length': '16'}),
137 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'null': 'True', 'to': "orm['forum.Node']"}),
138 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
139 'state_string': ('django.db.models.fields.TextField', [], {'default': "''"}),
140 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
141 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'nodes'", 'symmetrical': 'False', 'to': "orm['forum.Tag']"}),
142 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})
144 'forum.noderevision': {
145 'Meta': {'unique_together': "(('node', 'revision'),)", 'object_name': 'NodeRevision'},
146 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'noderevisions'", 'to': "orm['forum.User']"}),
147 'body': ('django.db.models.fields.TextField', [], {}),
148 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
149 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['forum.Node']"}),
150 'revised_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
151 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),
152 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
153 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
154 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})
157 'Meta': {'unique_together': "(('node', 'state_type'),)", 'object_name': 'NodeState'},
158 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'node_state'", 'unique': 'True', 'to': "orm['forum.Action']"}),
159 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['forum.Node']"}),
161 'state_type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
163 'forum.openidassociation': {
164 'Meta': {'object_name': 'OpenIdAssociation'},
165 'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),
166 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
167 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
168 'issued': ('django.db.models.fields.IntegerField', [], {}),
169 'lifetime': ('django.db.models.fields.IntegerField', [], {}),
170 'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),
171 'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})
173 'forum.openidnonce': {
174 'Meta': {'object_name': 'OpenIdNonce'},
175 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
176 'salt': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
177 'server_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
178 'timestamp': ('django.db.models.fields.IntegerField', [], {})
180 'forum.questionsubscription': {
181 'Meta': {'object_name': 'QuestionSubscription'},
182 'auto_subscription': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
183 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
184 'last_view': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 7, 1, 13, 6, 46, 789996)'}),
185 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']"}),
186 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
188 'forum.subscriptionsettings': {
189 'Meta': {'object_name': 'SubscriptionSettings'},
190 'all_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
191 'all_questions_watched_tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
192 'enable_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
193 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
194 'member_joins': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),
195 'new_question': ('django.db.models.fields.CharField', [], {'default': "'d'", 'max_length': '1'}),
196 'new_question_watched_tags': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
197 'notify_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
198 'notify_answers': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
199 'notify_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
200 'notify_comments_own_post': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
201 'notify_reply_to_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
202 'questions_answered': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
203 'questions_asked': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
204 'questions_commented': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
205 'questions_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
206 'send_digest': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
207 'subscribed_questions': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
208 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subscription_settings'", 'unique': 'True', 'to': "orm['forum.User']"})
211 'Meta': {'object_name': 'Tag'},
212 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['forum.User']"}),
213 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
214 'marked_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'marked_tags'", 'symmetrical': 'False', 'through': "orm['forum.MarkedTag']", 'to': "orm['forum.User']"}),
215 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
216 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
219 'Meta': {'object_name': 'User', '_ormbases': ['auth.User']},
220 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
221 'bronze': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
222 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
223 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
224 'gold': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
225 'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
226 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
227 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
228 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
229 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
230 'silver': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
231 'subscriptions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'", 'symmetrical': 'False', 'through': "orm['forum.QuestionSubscription']", 'to': "orm['forum.Node']"}),
232 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
233 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
235 'forum.userproperty': {
236 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserProperty'},
237 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
238 'key': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
239 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': "orm['forum.User']"}),
240 'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})
242 'forum.validationhash': {
243 'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'ValidationHash'},
244 'expiration': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 7, 2, 13, 6, 46, 883626)'}),
245 'hash_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
246 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
247 'seed': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
248 'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
249 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
252 'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Vote'},
253 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'vote'", 'unique': 'True', 'to': "orm['forum.Action']"}),
254 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
255 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.Node']"}),
256 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.User']"}),
257 'value': ('django.db.models.fields.SmallIntegerField', [], {}),
258 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})
262 complete_apps = ['forum']
264 orm = FakeORM(Migration, "forum")