a@name to @id
[edumed.git] / curriculum / migrations / 0003_auto__chg_field_level_slug.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
12         # Changing field 'Level.slug'
13         db.alter_column('curriculum_level', 'slug', self.gf('django.db.models.fields.CharField')(max_length=255))
14         # Removing index on 'Level', fields ['slug']
15         db.delete_index('curriculum_level', ['slug'])
16
17
18     def backwards(self, orm):
19         # Adding index on 'Level', fields ['slug']
20         db.create_index('curriculum_level', ['slug'])
21
22
23         # Changing field 'Level.slug'
24         db.alter_column('curriculum_level', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=50))
25
26     models = {
27         'curriculum.competence': {
28             'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
29             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
30             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
31             'order': ('django.db.models.fields.IntegerField', [], {}),
32             'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
33             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
34         },
35         'curriculum.competencelevel': {
36             'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
37             'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
38             'description': ('django.db.models.fields.TextField', [], {}),
39             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40             'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
41         },
42         'curriculum.level': {
43             'Meta': {'ordering': "['order']", 'object_name': 'Level'},
44             'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
45             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
47             'order': ('django.db.models.fields.IntegerField', [], {}),
48             'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
49         },
50         'curriculum.section': {
51             'Meta': {'ordering': "['order']", 'object_name': 'Section'},
52             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53             'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
54             'order': ('django.db.models.fields.IntegerField', [], {}),
55             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
56         }
57     }
58
59     complete_apps = ['curriculum']