1 # -*- coding: utf-8 -*-
3 from south
.db
import db
4 from south
.v2
import SchemaMigration
5 from django
.db
import models
8 class Migration(SchemaMigration
):
10 def forwards(self
, orm
):
12 db
.create_table('paf_area', (
13 ('id', self
.gf('django.db.models.fields.AutoField')(primary_key
=True)),
14 ('name', self
.gf('django.db.models.fields.CharField')(max_length
=100)),
15 ('country', self
.gf('django.db.models.fields.related.ForeignKey')(to
=orm
['paf.Country'])),
17 db
.send_create_signal('paf', ['Area'])
19 # Adding field 'Location.area'
20 db
.add_column('paf_location', 'area',
21 self
.gf('smart_selects.db_fields.ChainedForeignKey')(default
=1, to
=orm
['paf.Area']),
24 # Adding field 'Location.city'
25 db
.add_column('paf_location', 'city',
26 self
.gf('django.db.models.fields.CharField')(default
=2, max_length
=50),
29 # Adding field 'Location.street'
30 db
.add_column('paf_location', 'street',
31 self
.gf('django.db.models.fields.CharField')(default
=2, max_length
=100),
35 # Changing field 'Location.country'
36 db
.alter_column('paf_location', 'country_id', self
.gf('smart_selects.db_fields.ChainedForeignKey')(to
=orm
['paf.Country']))
38 def backwards(self
, orm
):
39 # Deleting model 'Area'
40 db
.delete_table('paf_area')
42 # Deleting field 'Location.area'
43 db
.delete_column('paf_location', 'area_id')
45 # Deleting field 'Location.city'
46 db
.delete_column('paf_location', 'city')
48 # Deleting field 'Location.street'
49 db
.delete_column('paf_location', 'street')
52 # Changing field 'Location.country'
53 db
.alter_column('paf_location', 'country_id', self
.gf('smart_selects.db_fields.GroupedForeignKey')(to
=orm
['paf.Country'], group_field
='continent'))
57 'Meta': {'object_name': 'Area'},
58 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Country']"}),
59 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
63 'Meta': {'object_name': 'Continent'},
64 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
68 'Meta': {'object_name': 'Country'},
69 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
70 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
71 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
73 'paf.currentacademic': {
74 'Meta': {'object_name': 'CurrentAcademic'},
75 'faculty': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Faculty']"}),
76 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
79 'Meta': {'object_name': 'Faculty'},
80 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
82 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
84 'paf.linguisticlevel': {
85 'Meta': {'object_name': 'LinguisticLevel'},
86 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
87 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
89 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
90 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
91 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
94 'Meta': {'object_name': 'Location'},
95 'area': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Area']"}),
96 'city': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
97 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
98 'country': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Country']"}),
99 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
100 'street': ('django.db.models.fields.CharField', [], {'max_length': '100'})
103 'Meta': {'object_name': 'Student'},
104 'dob': ('django.db.models.fields.DateField', [], {}),
105 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
106 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
107 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
108 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '9', 'blank': 'True'}),
109 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
110 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
111 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
112 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
113 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
114 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
117 'Meta': {'object_name': 'University'},
118 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
119 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
123 complete_apps
= ['paf']