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 # Deleting model 'Activity'
12 db.delete_table(u'activity')
15 def backwards(self, orm):
17 # Adding model 'Activity'
18 db.create_table(u'activity', (
19 ('is_auditted', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
20 ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
21 ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['forum.User'])),
22 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
23 ('active_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
24 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
25 ('activity_type', self.gf('django.db.models.fields.SmallIntegerField')()),
27 db.send_create_signal('forum', ['Activity'])
32 'Meta': {'object_name': 'Group'},
33 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
35 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'})
38 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
39 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
40 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
41 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
45 'Meta': {'object_name': 'User'},
46 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
47 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
48 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
49 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}),
50 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
51 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
52 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
53 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
54 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
55 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
56 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
57 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}),
58 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
60 'contenttypes.contenttype': {
61 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
62 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
63 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
65 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
68 'Meta': {'object_name': 'Action'},
69 'action_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
70 'action_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
71 'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
72 'canceled_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
73 'canceled_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'canceled_actions'", 'null': 'True', 'to': "orm['forum.User']"}),
74 'extra': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
75 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
76 'ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
77 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'null': 'True', 'to': "orm['forum.Node']"}),
78 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'to': "orm['forum.User']"})
80 'forum.actionrepute': {
81 'Meta': {'object_name': 'ActionRepute'},
82 'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.Action']"}),
83 'by_canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
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': {'object_name': 'Award', 'db_table': "u'award'"},
98 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
99 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['forum.Badge']"}),
100 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
101 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
103 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
104 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'to': "orm['forum.User']"})
107 'Meta': {'unique_together': "(('name', 'type'),)", 'object_name': 'Badge', 'db_table': "u'badge'"},
108 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
109 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'through': "'Award'", 'to': "orm['forum.User']"}),
110 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
111 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
112 'multiple': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
113 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
114 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
115 'type': ('django.db.models.fields.SmallIntegerField', [], {})
118 'Meta': {'object_name': 'KeyValue'},
119 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
120 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
121 'value': ('forum.models.utils.PickledObjectField', [], {})
124 'Meta': {'object_name': 'MarkedTag'},
125 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
127 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['forum.Tag']"}),
128 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['forum.User']"})
131 'Meta': {'object_name': 'Node'},
132 'abs_parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_children'", 'null': 'True', 'to': "orm['forum.Node']"}),
133 'active_revision': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'active'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.NodeRevision']"}),
134 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
135 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['forum.User']"}),
136 'body': ('django.db.models.fields.TextField', [], {}),
137 'deleted': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'deleted_node'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.Action']"}),
138 'extra_action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'extra_node'", 'null': 'True', 'to': "orm['forum.Action']"}),
139 'extra_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
140 'extra_ref': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),
141 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
142 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
143 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']", 'null': 'True'}),
144 'last_edited': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edited_node'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.Action']"}),
145 'marked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
146 'node_type': ('django.db.models.fields.CharField', [], {'default': "'node'", 'max_length': '16'}),
147 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'null': 'True', 'to': "orm['forum.Node']"}),
148 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
149 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
150 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'nodes'", 'to': "orm['forum.Tag']"}),
151 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
152 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
154 'forum.noderevision': {
155 'Meta': {'unique_together': "(('node', 'revision'),)", 'object_name': 'NodeRevision'},
156 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'noderevisions'", 'to': "orm['forum.User']"}),
157 'body': ('django.db.models.fields.TextField', [], {}),
158 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['forum.Node']"}),
160 'revised_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
161 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),
162 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
163 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
164 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})
166 'forum.openidassociation': {
167 'Meta': {'object_name': 'OpenIdAssociation'},
168 'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),
169 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
170 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
171 'issued': ('django.db.models.fields.IntegerField', [], {}),
172 'lifetime': ('django.db.models.fields.IntegerField', [], {}),
173 'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),
174 'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})
176 'forum.openidnonce': {
177 'Meta': {'object_name': 'OpenIdNonce'},
178 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
179 'salt': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
180 'server_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
181 'timestamp': ('django.db.models.fields.IntegerField', [], {})
183 'forum.questionsubscription': {
184 'Meta': {'object_name': 'QuestionSubscription'},
185 'auto_subscription': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
186 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
187 'last_view': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 4, 29, 1, 30, 30, 35000)'}),
188 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']"}),
189 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
191 'forum.subscriptionsettings': {
192 'Meta': {'object_name': 'SubscriptionSettings'},
193 'all_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
194 'all_questions_watched_tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
195 'enable_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
196 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
197 'member_joins': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),
198 'new_question': ('django.db.models.fields.CharField', [], {'default': "'d'", 'max_length': '1'}),
199 'new_question_watched_tags': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
200 'notify_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
201 'notify_answers': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
202 'notify_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
203 'notify_comments_own_post': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
204 'notify_reply_to_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
205 'questions_answered': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
206 'questions_asked': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
207 'questions_commented': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
208 'questions_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
209 'subscribed_questions': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),
210 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subscription_settings'", 'unique': 'True', 'to': "orm['forum.User']"})
213 'Meta': {'object_name': 'Tag', 'db_table': "u'tag'"},
214 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['forum.User']"}),
215 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
216 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
217 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['forum.User']"}),
218 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
219 'marked_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'marked_tags'", 'through': "'MarkedTag'", 'to': "orm['forum.User']"}),
220 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
221 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
224 'Meta': {'object_name': 'User', '_ormbases': ['auth.User']},
225 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
226 'bronze': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
227 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
228 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
229 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
230 'gold': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
231 'hide_ignored_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
232 'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
233 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
234 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
235 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}),
236 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
237 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
238 'silver': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
239 'subscriptions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'", 'through': "'QuestionSubscription'", 'to': "orm['forum.Node']"}),
240 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
241 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
243 'forum.validationhash': {
244 'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'ValidationHash'},
245 'expiration': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 4, 30, 1, 30, 30, 211000)'}),
246 'hash_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
247 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
248 'seed': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
249 'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
250 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})
254 complete_apps = ['forum']