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 M2M table for field examiners on 'Submission'
12 db.create_table(u'wtem_submission_examiners', (
13 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
14 ('submission', models.ForeignKey(orm[u'wtem.submission'], null=False)),
15 ('user', models.ForeignKey(orm[u'auth.user'], null=False))
17 db.create_unique(u'wtem_submission_examiners', ['submission_id', 'user_id'])
20 def backwards(self, orm):
21 # Removing M2M table for field examiners on 'Submission'
22 db.delete_table('wtem_submission_examiners')
27 'Meta': {'object_name': 'Group'},
28 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
29 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
30 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
33 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
34 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
35 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
36 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
40 'Meta': {'object_name': 'User'},
41 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
42 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
43 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
44 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
45 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
47 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
48 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
49 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
50 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
51 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
52 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
53 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
56 'Meta': {'ordering': "('-created_at',)", 'object_name': 'Contact'},
57 'body': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
58 'contact': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
59 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
60 'form_tag': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
61 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'})
64 u'contenttypes.contenttype': {
65 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
66 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
67 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
68 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
69 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
72 'Meta': {'object_name': 'Assignment'},
73 'exercises': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
74 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'unique': 'True'})
78 'Meta': {'object_name': 'Attachment'},
79 'exercise_id': ('django.db.models.fields.IntegerField', [], {}),
80 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
81 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82 'submission': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['wtem.Submission']"})
85 'Meta': {'object_name': 'Submission'},
86 'answers': ('django.db.models.fields.CharField', [], {'max_length': '65536', 'null': 'True', 'blank': 'True'}),
87 'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contact.Contact']", 'null': 'True'}),
88 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '100'}),
89 'examiners': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}),
90 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
91 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
93 'key_sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
94 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
95 'marks': ('jsonfield.fields.JSONField', [], {'default': '{}'})
99 complete_apps = ['wtem']