Nettoyage, 1ère passe…
[auf_paf.git] / paf / migrations / 0011_auto__add_field_currentacademic_student.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 field 'CurrentAcademic.student'
12 db.add_column('paf_currentacademic', 'student',
13 self.gf('django.db.models.fields.related.OneToOneField')(default=6, to=orm['paf.Student'], unique=True),
14 keep_default=False)
15
16
17 def backwards(self, orm):
18 # Deleting field 'CurrentAcademic.student'
19 db.delete_column('paf_currentacademic', 'student_id')
20
21
22 models = {
23 'paf.area': {
24 'Meta': {'object_name': 'Area'},
25 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Country']"}),
26 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
27 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
28 },
29 'paf.continent': {
30 'Meta': {'object_name': 'Continent'},
31 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
33 },
34 'paf.country': {
35 'Meta': {'object_name': 'Country'},
36 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
37 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
39 },
40 'paf.currentacademic': {
41 'Meta': {'object_name': 'CurrentAcademic'},
42 'faculty': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Faculty']"}),
43 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
44 'level': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
45 'specialty': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
46 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
47 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
48 },
49 'paf.faculty': {
50 'Meta': {'object_name': 'Faculty'},
51 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
52 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
53 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
54 },
55 'paf.linguisticlevel': {
56 'Meta': {'object_name': 'LinguisticLevel'},
57 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
60 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
61 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
62 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
63 },
64 'paf.location': {
65 'Meta': {'object_name': 'Location'},
66 'area': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Area']"}),
67 'city': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
68 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
69 'country': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Country']"}),
70 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
71 'street': ('django.db.models.fields.CharField', [], {'max_length': '100'})
72 },
73 'paf.student': {
74 'Meta': {'object_name': 'Student'},
75 'dob': ('django.db.models.fields.DateField', [], {}),
76 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
77 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
78 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
79 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '9', 'blank': 'True'}),
80 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
81 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
82 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
83 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
84 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
85 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
86 },
87 'paf.university': {
88 'Meta': {'object_name': 'University'},
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
91 }
92 }
93
94 complete_apps = ['paf']