c70396cdfde390fc012a3bab452c60283105a98b
[auf_paf.git] / paf / migrations / 0008_auto__add_country__add_continent__add_location.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 model 'Country'
12 db.create_table('paf_country', (
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 ('continent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.Continent'])),
16 ))
17 db.send_create_signal('paf', ['Country'])
18
19 # Adding model 'Continent'
20 db.create_table('paf_continent', (
21 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
22 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
23 ))
24 db.send_create_signal('paf', ['Continent'])
25
26 # Adding model 'Location'
27 db.create_table('paf_location', (
28 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
29 ('continent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.Continent'])),
30 ('country', self.gf('smart_selects.db_fields.GroupedForeignKey')(to=orm['paf.Country'], group_field='continent')),
31 ))
32 db.send_create_signal('paf', ['Location'])
33
34
35 def backwards(self, orm):
36 # Deleting model 'Country'
37 db.delete_table('paf_country')
38
39 # Deleting model 'Continent'
40 db.delete_table('paf_continent')
41
42 # Deleting model 'Location'
43 db.delete_table('paf_location')
44
45
46 models = {
47 'paf.continent': {
48 'Meta': {'object_name': 'Continent'},
49 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
51 },
52 'paf.country': {
53 'Meta': {'object_name': 'Country'},
54 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
55 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
57 },
58 'paf.currentacademic': {
59 'Meta': {'object_name': 'CurrentAcademic'},
60 'faculty': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Faculty']"}),
61 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
62 },
63 'paf.faculty': {
64 'Meta': {'object_name': 'Faculty'},
65 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
67 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
68 },
69 'paf.linguisticlevel': {
70 'Meta': {'object_name': 'LinguisticLevel'},
71 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
72 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
74 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
75 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
76 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
77 },
78 'paf.location': {
79 'Meta': {'object_name': 'Location'},
80 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Continent']"}),
81 'country': ('smart_selects.db_fields.GroupedForeignKey', [], {'to': "orm['paf.Country']", 'group_field': "'continent'"}),
82 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
83 },
84 'paf.student': {
85 'Meta': {'object_name': 'Student'},
86 'dob': ('django.db.models.fields.DateField', [], {}),
87 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
88 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '9', 'blank': 'True'}),
91 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
92 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
93 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
94 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
95 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
96 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
97 },
98 'paf.university': {
99 'Meta': {'object_name': 'University'},
100 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
102 }
103 }
104
105 complete_apps = ['paf']