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 curriculum_courses on 'Lesson'
12 db.create_table('catalogue_lesson_curriculum_courses', (
13 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
14 ('lesson', models.ForeignKey(orm['catalogue.lesson'], null=False)),
15 ('curriculumcourse', models.ForeignKey(orm['curriculum.curriculumcourse'], null=False))
17 db.create_unique('catalogue_lesson_curriculum_courses', ['lesson_id', 'curriculumcourse_id'])
20 def backwards(self, orm):
21 # Removing M2M table for field curriculum_courses on 'Lesson'
22 db.delete_table('catalogue_lesson_curriculum_courses')
26 'catalogue.attachment': {
27 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
28 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
29 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
30 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
32 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
35 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
36 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['curriculum.CurriculumCourse']", 'symmetrical': 'False'}),
37 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
38 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
39 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
41 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
42 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
43 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
44 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
45 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
46 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
47 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
48 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
49 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
50 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
53 'Meta': {'object_name': 'Part'},
54 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
55 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
56 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
57 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
59 'catalogue.section': {
60 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
61 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62 'order': ('django.db.models.fields.IntegerField', [], {}),
63 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
64 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
65 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
67 'curriculum.curriculumcourse': {
68 'Meta': {'object_name': 'CurriculumCourse'},
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
71 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
74 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
75 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
76 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
78 'order': ('django.db.models.fields.IntegerField', [], {}),
79 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
83 complete_apps = ['catalogue']