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 model 'UserProperty'
12 db.create_table('forum_userproperty', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='properties', to=orm['forum.User'])),
15 ('key', self.gf('django.db.models.fields.CharField')(max_length=16)),
16 ('value', self.gf('forum.models.utils.PickledObjectField')(null=True)),
18 db.send_create_signal('forum', ['UserProperty'])
21 def backwards(self, orm):
23 # Deleting model 'UserProperty'
24 db.delete_table('forum_userproperty')
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 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'to': "orm['forum.User']"})
78 'forum.actionrepute': {
79 'Meta': {'object_name': 'ActionRepute'},
80 'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.Action']"}),
81 'by_canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
82 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
83 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.User']"}),
85 'value': ('django.db.models.fields.IntegerField', [], {'default': '0'})
87 'forum.authkeyuserassociation': {
88 'Meta': {'object_name': 'AuthKeyUserAssociation'},
89 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
90 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
91 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
92 'provider': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
93 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_keys'", 'to': "orm['forum.User']"})
96 'Meta': {'unique_together': "(('user', 'badge', 'node'),)", 'object_name': 'Award'},
97 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'award'", 'unique': 'True', 'to': "orm['forum.Action']"}),
98 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
99 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'to': "orm['forum.Badge']"}),
100 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101 'node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),
102 'trigger': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'null': 'True', 'to': "orm['forum.Action']"}),
103 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
106 'Meta': {'object_name': 'Badge'},
107 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
108 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['forum.Award']", 'to': "orm['forum.User']"}),
109 'cls': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
110 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
111 'type': ('django.db.models.fields.SmallIntegerField', [], {})
114 'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Flag'},
115 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'flag'", 'unique': 'True', 'to': "orm['forum.Action']"}),
116 'flagged_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
117 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.Node']"}),
119 'reason': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
120 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.User']"})
123 'Meta': {'object_name': 'KeyValue'},
124 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
125 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
126 'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})
129 'Meta': {'object_name': 'MarkedTag'},
130 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
131 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
132 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['forum.Tag']"}),
133 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['forum.User']"})
136 'Meta': {'object_name': 'Node'},
137 'abs_parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_children'", 'null': 'True', 'to': "orm['forum.Node']"}),
138 'active_revision': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'active'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.NodeRevision']"}),
139 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
140 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['forum.User']"}),
141 'body': ('django.db.models.fields.TextField', [], {}),
142 'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),
143 'extra_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
144 'extra_ref': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),
145 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
146 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
147 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']", 'null': 'True'}),
148 'last_edited': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edited_node'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.Action']"}),
149 'marked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
150 'node_type': ('django.db.models.fields.CharField', [], {'default': "'node'", 'max_length': '16'}),
151 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'null': 'True', 'to': "orm['forum.Node']"}),
152 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
153 'state_string': ('django.db.models.fields.TextField', [], {'default': "''"}),
154 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
155 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'nodes'", 'symmetrical': 'False', 'to': "orm['forum.Tag']"}),
156 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})
158 'forum.noderevision': {
159 'Meta': {'unique_together': "(('node', 'revision'),)", 'object_name': 'NodeRevision'},
160 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'noderevisions'", 'to': "orm['forum.User']"}),
161 'body': ('django.db.models.fields.TextField', [], {}),
162 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
163 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['forum.Node']"}),
164 'revised_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
165 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),
166 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
167 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
168 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})
171 'Meta': {'unique_together': "(('node', 'state_type'),)", 'object_name': 'NodeState'},
172 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'node_state'", 'unique': 'True', 'to': "orm['forum.Action']"}),
173 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
174 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['forum.Node']"}),
175 'state_type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
177 'forum.openidassociation': {
178 'Meta': {'object_name': 'OpenIdAssociation'},
179 'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),
180 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
181 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
182 'issued': ('django.db.models.fields.IntegerField', [], {}),
183 'lifetime': ('django.db.models.fields.IntegerField', [], {}),
184 'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),
185 'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})
187 'forum.openidnonce': {
188 'Meta': {'object_name': 'OpenIdNonce'},
189 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
190 'salt': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
191 'server_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
192 'timestamp': ('django.db.models.fields.IntegerField', [], {})
194 'forum.questionsubscription': {
195 'Meta': {'object_name': 'QuestionSubscription'},
196 'auto_subscription': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
197 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
198 'last_view': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 6, 30, 19, 11, 19, 580720)'}),
199 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']"}),
200 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
202 'forum.subscriptionsettings': {
203 'Meta': {'object_name': 'SubscriptionSettings'},
204 'all_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
205 'all_questions_watched_tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
206 'enable_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
207 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
208 'member_joins': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),
209 'new_question': ('django.db.models.fields.CharField', [], {'default': "'d'", 'max_length': '1'}),
210 'new_question_watched_tags': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
211 'notify_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
212 'notify_answers': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
213 'notify_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
214 'notify_comments_own_post': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
215 'notify_reply_to_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
216 'questions_answered': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
217 'questions_asked': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
218 'questions_commented': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
219 'questions_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
220 'subscribed_questions': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
221 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subscription_settings'", 'unique': 'True', 'to': "orm['forum.User']"})
224 'Meta': {'object_name': 'Tag'},
225 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['forum.User']"}),
226 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
227 'marked_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'marked_tags'", 'symmetrical': 'False', 'through': "orm['forum.MarkedTag']", 'to': "orm['forum.User']"}),
228 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
229 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
232 'Meta': {'object_name': 'User', '_ormbases': ['auth.User']},
233 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
234 'bronze': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
235 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
236 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
237 'gold': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
238 'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
239 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
240 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
241 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
242 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
243 'silver': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
244 'subscriptions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'", 'symmetrical': 'False', 'through': "orm['forum.QuestionSubscription']", 'to': "orm['forum.Node']"}),
245 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
246 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
248 'forum.userproperty': {
249 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserProperty'},
250 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
251 'key': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
252 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': "orm['forum.User']"}),
253 'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})
255 'forum.validationhash': {
256 'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'ValidationHash'},
257 'expiration': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 7, 1, 19, 11, 19, 671272)'}),
258 'hash_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
259 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
260 'seed': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
261 'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
262 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
265 'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Vote'},
266 'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'vote'", 'unique': 'True', 'to': "orm['forum.Action']"}),
267 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
268 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.Node']"}),
269 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.User']"}),
270 'value': ('django.db.models.fields.SmallIntegerField', [], {}),
271 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})
275 complete_apps = ['forum']