Nettoyage, 1ère passe…
[auf_paf.git] / paf / migrations / 0003_auto__del_field_student_user.py
CommitLineData
0ba28d89 1# -*- coding: utf-8 -*-
2import datetime
3from south.db import db
4from south.v2 import SchemaMigration
5from django.db import models
6
7
8class Migration(SchemaMigration):
9
10 def forwards(self, orm):
11 # Deleting field 'Student.user'
12 db.delete_column('paf_student', 'user_id')
13
14
15 def backwards(self, orm):
16 # Adding field 'Student.user'
17 db.add_column('paf_student', 'user',
18 self.gf('django.db.models.fields.related.OneToOneField')(default=1, to=orm['auth.User'], unique=True),
19 keep_default=False)
20
21
22 models = {
23 'paf.linguisticlevel': {
24 'Meta': {'object_name': 'LinguisticLevel'},
25 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
26 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
27 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
28 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
29 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
30 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
31 },
32 'paf.student': {
33 'Meta': {'object_name': 'Student'},
34 'dob': ('django.db.models.fields.DateField', [], {}),
35 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
36 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
37 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
39 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
40 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
41 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
42 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
43 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
44 }
45 }
46
47 complete_apps = ['paf']