Nettoyage, 1ère passe…
[auf_paf.git] / paf / migrations / 0015_auto__add_country__add_employment__add_city__add_entreprise__add_field.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 # 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 ))
16 db.send_create_signal('paf', ['Country'])
17
18 # Adding model 'Employment'
19 db.create_table('paf_employment', (
20 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
21 ('entreprise', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.Entreprise'])),
22 ('activity_sector', self.gf('django.db.models.fields.CharField')(max_length=200)),
23 ('country', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.Country'])),
24 ('website', self.gf('django.db.models.fields.URLField')(max_length=200)),
25 ('position', self.gf('django.db.models.fields.CharField')(max_length=200)),
26 ('detail_position', self.gf('django.db.models.fields.TextField')()),
27 ('observation', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
28 ('student', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['paf.Student'], unique=True)),
29 ))
30 db.send_create_signal('paf', ['Employment'])
31
32 # Adding model 'City'
33 db.create_table('paf_city', (
34 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
35 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
36 ))
37 db.send_create_signal('paf', ['City'])
38
39 # Adding model 'Entreprise'
40 db.create_table('paf_entreprise', (
41 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
42 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
43 ))
44 db.send_create_signal('paf', ['Entreprise'])
45
46 # Adding field 'CurrentAcademic.city'
47 db.add_column('paf_currentacademic', 'city',
48 self.gf('django.db.models.fields.related.ForeignKey')(default=2, to=orm['paf.City']),
49 keep_default=False)
50
51
52 def backwards(self, orm):
53 # Deleting model 'Country'
54 db.delete_table('paf_country')
55
56 # Deleting model 'Employment'
57 db.delete_table('paf_employment')
58
59 # Deleting model 'City'
60 db.delete_table('paf_city')
61
62 # Deleting model 'Entreprise'
63 db.delete_table('paf_entreprise')
64
65 # Deleting field 'CurrentAcademic.city'
66 db.delete_column('paf_currentacademic', 'city_id')
67
68
69 models = {
70 'paf.city': {
71 'Meta': {'object_name': 'City'},
72 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
74 },
75 'paf.country': {
76 'Meta': {'object_name': 'Country'},
77 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
79 },
80 'paf.currentacademic': {
81 'Meta': {'object_name': 'CurrentAcademic'},
82 'certified': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
83 'city': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.City']"}),
84 'end_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
85 'entry_year': ('django.db.models.fields.PositiveIntegerField', [], {}),
86 'faculty': ('smart_selects.db_fields.ChainedForeignKey', [], {'to': "orm['paf.Faculty']"}),
87 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Level']"}),
89 'specialty': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
90 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
91 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
92 },
93 'paf.diplomaobtained': {
94 'Meta': {'object_name': 'DiplomaObtained'},
95 'entitle': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
96 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
97 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Level']"}),
98 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Student']"}),
99 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"}),
100 'year': ('django.db.models.fields.PositiveIntegerField', [], {})
101 },
102 'paf.employment': {
103 'Meta': {'object_name': 'Employment'},
104 'activity_sector': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
105 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Country']"}),
106 'detail_position': ('django.db.models.fields.TextField', [], {}),
107 'entreprise': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Entreprise']"}),
108 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109 'observation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
110 'position': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
111 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
112 'website': ('django.db.models.fields.URLField', [], {'max_length': '200'})
113 },
114 'paf.entreprise': {
115 'Meta': {'object_name': 'Entreprise'},
116 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
118 },
119 'paf.faculty': {
120 'Meta': {'object_name': 'Faculty'},
121 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
122 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
123 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
124 },
125 'paf.level': {
126 'Meta': {'object_name': 'Level'},
127 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
128 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
129 },
130 'paf.linguisticlevel': {
131 'Meta': {'object_name': 'LinguisticLevel'},
132 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
133 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
134 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
135 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
136 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
137 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
138 },
139 'paf.student': {
140 'Meta': {'object_name': 'Student'},
141 'dob': ('django.db.models.fields.DateField', [], {}),
142 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
143 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
144 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '9', 'blank': 'True'}),
146 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
147 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
148 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
149 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
150 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
151 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
152 },
153 'paf.university': {
154 'Meta': {'object_name': 'University'},
155 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
156 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
157 }
158 }
159
160 complete_apps = ['paf']