curriculum - ordering by unique identifiers
[edumed.git] / curriculum / migrations / 0001_initial.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         # Adding model 'Section'
12         db.create_table('curriculum_section', (
13             ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14             ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
15             ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
16             ('order', self.gf('django.db.models.fields.IntegerField')()),
17         ))
18         db.send_create_signal('curriculum', ['Section'])
19
20         # Adding model 'Competence'
21         db.create_table('curriculum_competence', (
22             ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23             ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Section'])),
24             ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
25             ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
26             ('order', self.gf('django.db.models.fields.IntegerField')()),
27         ))
28         db.send_create_signal('curriculum', ['Competence'])
29
30         # Adding model 'Level'
31         db.create_table('curriculum_level', (
32             ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
33             ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
34             ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
35             ('order', self.gf('django.db.models.fields.IntegerField')()),
36         ))
37         db.send_create_signal('curriculum', ['Level'])
38
39         # Adding model 'CompetenceLevel'
40         db.create_table('curriculum_competencelevel', (
41             ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
42             ('competence', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Competence'])),
43             ('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Level'])),
44             ('description', self.gf('django.db.models.fields.TextField')()),
45         ))
46         db.send_create_signal('curriculum', ['CompetenceLevel'])
47
48
49     def backwards(self, orm):
50         # Deleting model 'Section'
51         db.delete_table('curriculum_section')
52
53         # Deleting model 'Competence'
54         db.delete_table('curriculum_competence')
55
56         # Deleting model 'Level'
57         db.delete_table('curriculum_level')
58
59         # Deleting model 'CompetenceLevel'
60         db.delete_table('curriculum_competencelevel')
61
62
63     models = {
64         'curriculum.competence': {
65             'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
66             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
68             'order': ('django.db.models.fields.IntegerField', [], {}),
69             'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
70             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
71         },
72         'curriculum.competencelevel': {
73             'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
74             'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
75             'description': ('django.db.models.fields.TextField', [], {}),
76             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77             'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
78         },
79         'curriculum.level': {
80             'Meta': {'ordering': "['order']", 'object_name': 'Level'},
81             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
83             'order': ('django.db.models.fields.IntegerField', [], {}),
84             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
85         },
86         'curriculum.section': {
87             'Meta': {'ordering': "['order']", 'object_name': 'Section'},
88             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
89             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
90             'order': ('django.db.models.fields.IntegerField', [], {}),
91             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
92         }
93     }
94
95     complete_apps = ['curriculum']