Nettoyage, 1ère passe…
[auf_paf.git] / paf / migrations / 0007_auto__add_faculty__add_university__add_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 model 'Faculty'
12 db.create_table('paf_faculty', (
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 ('university', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.University'])),
16 ))
17 db.send_create_signal('paf', ['Faculty'])
18
19 # Adding model 'University'
20 db.create_table('paf_university', (
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', ['University'])
25
26 # Adding model 'CurrentAcademic'
27 db.create_table('paf_currentacademic', (
28 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
29 ('faculty', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['paf.Faculty'])),
30 ))
31 db.send_create_signal('paf', ['CurrentAcademic'])
32
33
34 def backwards(self, orm):
35 # Deleting model 'Faculty'
36 db.delete_table('paf_faculty')
37
38 # Deleting model 'University'
39 db.delete_table('paf_university')
40
41 # Deleting model 'CurrentAcademic'
42 db.delete_table('paf_currentacademic')
43
44
45 models = {
46 'paf.currentacademic': {
47 'Meta': {'object_name': 'CurrentAcademic'},
48 'faculty': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.Faculty']"}),
49 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
50 },
51 'paf.faculty': {
52 'Meta': {'object_name': 'Faculty'},
53 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
55 'university': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['paf.University']"})
56 },
57 'paf.linguisticlevel': {
58 'Meta': {'object_name': 'LinguisticLevel'},
59 'delf_dalf': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
60 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61 'other': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}),
62 'student': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['paf.Student']", 'unique': 'True'}),
63 'year_delf_dalf': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
64 'year_other': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
65 },
66 'paf.student': {
67 'Meta': {'object_name': 'Student'},
68 'dob': ('django.db.models.fields.DateField', [], {}),
69 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
70 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
71 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '9', 'blank': 'True'}),
73 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
74 'nationality': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
75 'parent_address': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
76 'parent_tel': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
77 'sex': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
78 'tel': ('django.db.models.fields.CharField', [], {'max_length': '20'})
79 },
80 'paf.university': {
81 'Meta': {'object_name': 'University'},
82 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
83 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
84 }
85 }
86
87 complete_apps = ['paf']