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