1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding model 'Topic'
12 db.create_table(u'forum_topic', (
13 ('pybb_topic', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['pybb.Topic'], unique=True, primary_key=True)),
14 ('lesson', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Lesson'], null=True, blank=True)),
16 db.send_create_signal(u'forum', ['Topic'])
19 def backwards(self, orm):
20 # Deleting model 'Topic'
21 db.delete_table(u'forum_topic')
26 'Meta': {'object_name': 'Group'},
27 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
28 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
29 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
32 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
33 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
34 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
35 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
39 'Meta': {'object_name': 'User'},
40 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
41 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
42 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
43 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
44 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
46 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
47 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
48 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
49 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
50 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
51 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
52 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
54 u'catalogue.lesson': {
55 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
56 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
57 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
58 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
59 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
61 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
62 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
63 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
64 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
65 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
66 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
67 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
68 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
69 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
70 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
72 u'catalogue.section': {
73 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
74 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
76 'order': ('django.db.models.fields.IntegerField', [], {}),
77 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
78 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
79 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
81 u'contenttypes.contenttype': {
82 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
83 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
84 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
86 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
88 u'curriculum.curriculumcourse': {
89 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
90 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
91 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
93 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
95 u'curriculum.level': {
96 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
97 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
98 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
100 'order': ('django.db.models.fields.IntegerField', [], {}),
101 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
104 'Meta': {'object_name': 'Topic'},
105 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']", 'null': 'True', 'blank': 'True'}),
106 'pybb_topic': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['pybb.Topic']", 'unique': 'True', 'primary_key': 'True'})
109 'Meta': {'ordering': "['position']", 'object_name': 'Category'},
110 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
111 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
112 'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
113 'position': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'})
116 'Meta': {'ordering': "['position']", 'object_name': 'Forum'},
117 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'forums'", 'to': u"orm['pybb.Category']"}),
118 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
119 'headline': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
120 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
121 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
122 'moderators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
123 'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
124 'position': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
125 'post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
126 'readed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'readed_forums'", 'symmetrical': 'False', 'through': u"orm['pybb.ForumReadTracker']", 'to': u"orm['auth.User']"}),
127 'topic_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
128 'updated': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
130 u'pybb.forumreadtracker': {
131 'Meta': {'unique_together': "(('user', 'forum'),)", 'object_name': 'ForumReadTracker'},
132 'forum': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['pybb.Forum']", 'null': 'True', 'blank': 'True'}),
133 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
134 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
135 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
138 'Meta': {'ordering': "['-created']", 'object_name': 'Topic'},
139 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
140 'created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
141 'forum': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'topics'", 'to': u"orm['pybb.Forum']"}),
142 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
143 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
144 'on_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
145 'poll_question': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
146 'poll_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
147 'post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
148 'readed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'readed_topics'", 'symmetrical': 'False', 'through': u"orm['pybb.TopicReadTracker']", 'to': u"orm['auth.User']"}),
149 'sticky': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
150 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'subscriptions'", 'blank': 'True', 'to': u"orm['auth.User']"}),
151 'updated': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
152 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
153 'views': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'})
155 u'pybb.topicreadtracker': {
156 'Meta': {'unique_together': "(('user', 'topic'),)", 'object_name': 'TopicReadTracker'},
157 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
158 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
159 'topic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['pybb.Topic']", 'null': 'True', 'blank': 'True'}),
160 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
164 complete_apps = ['forum']