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