Allow for manual marking of question of type "file_upload"
[edumed.git] / wtem / migrations / 0006_auto__del_field_attachment_name__add_field_attachment_exercise_id.py
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
6
7
8 class Migration(SchemaMigration):
9
10     def forwards(self, orm):
11         # Deleting field 'Attachment.name'
12         db.delete_column(u'wtem_attachment', 'name')
13
14         # Adding field 'Attachment.exercise_id'
15         db.add_column(u'wtem_attachment', 'exercise_id',
16                       self.gf('django.db.models.fields.IntegerField')(default=None),
17                       keep_default=False)
18
19
20     def backwards(self, orm):
21
22         # User chose to not deal with backwards NULL issues for 'Attachment.name'
23         raise RuntimeError("Cannot reverse this migration. 'Attachment.name' and its values cannot be restored.")
24         # Deleting field 'Attachment.exercise_id'
25         db.delete_column(u'wtem_attachment', 'exercise_id')
26
27
28     models = {
29         u'auth.group': {
30             'Meta': {'object_name': 'Group'},
31             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32             'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
33             'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
34         },
35         u'auth.permission': {
36             'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
37             'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
38             'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
39             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
41         },
42         u'auth.user': {
43             'Meta': {'object_name': 'User'},
44             'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
45             'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
46             'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
47             'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
48             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
49             'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
50             'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
51             'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
52             'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
53             'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
54             'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
55             'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
56             'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
57         },
58         u'contact.contact': {
59             'Meta': {'ordering': "('-created_at',)", 'object_name': 'Contact'},
60             'body': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
61             'contact': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
62             'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
63             'form_tag': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
64             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65             'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'})
66         },
67         u'contenttypes.contenttype': {
68             'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
69             'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
70             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
71             'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
72             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
73         },
74         u'wtem.assignment': {
75             'Meta': {'object_name': 'Assignment'},
76             'exercises': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
77             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78             'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'unique': 'True'})
79         },
80         u'wtem.attachment': {
81             'Meta': {'object_name': 'Attachment'},
82             'exercise_id': ('django.db.models.fields.IntegerField', [], {}),
83             'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
84             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85             'submission': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['wtem.Submission']"})
86         },
87         u'wtem.submission': {
88             'Meta': {'object_name': 'Submission'},
89             'answers': ('django.db.models.fields.CharField', [], {'max_length': '65536', 'null': 'True', 'blank': 'True'}),
90             'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contact.Contact']", 'null': 'True'}),
91             'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '100'}),
92             'first_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
93             u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
94             'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
95             'key_sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
96             'last_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
97             'marks': ('jsonfield.fields.JSONField', [], {'default': '{}'})
98         }
99     }
100
101     complete_apps = ['wtem']