summaryrefslogtreecommitdiff
path: root/allotter/migrations/0001_initial.py
diff options
context:
space:
mode:
Diffstat (limited to 'allotter/migrations/0001_initial.py')
-rw-r--r--allotter/migrations/0001_initial.py54
1 files changed, 42 insertions, 12 deletions
diff --git a/allotter/migrations/0001_initial.py b/allotter/migrations/0001_initial.py
index 13601c5..563a547 100644
--- a/allotter/migrations/0001_initial.py
+++ b/allotter/migrations/0001_initial.py
@@ -8,6 +8,14 @@ class Migration(SchemaMigration):
def forwards(self, orm):
+ # Adding model 'Exam'
+ db.create_table('allotter_exam', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('exam_code', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ ('exam_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ ))
+ db.send_create_signal('allotter', ['Exam'])
+
# Adding model 'Option'
db.create_table('allotter_option', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
@@ -16,24 +24,35 @@ class Migration(SchemaMigration):
))
db.send_create_signal('allotter', ['Option'])
- # Adding model 'Exam'
- db.create_table('allotter_exam', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('exam_code', self.gf('django.db.models.fields.CharField')(max_length=100)),
- ('exam_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ # Adding M2M table for field exam on 'Option'
+ db.create_table('allotter_option_exam', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('option', models.ForeignKey(orm['allotter.option'], null=False)),
+ ('exam', models.ForeignKey(orm['allotter.exam'], null=False))
))
- db.send_create_signal('allotter', ['Exam'])
+ db.create_unique('allotter_option_exam', ['option_id', 'exam_id'])
# Adding model 'Profile'
db.create_table('allotter_profile', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
- ('roll_number', self.gf('django.db.models.fields.CharField')(max_length=20)),
- ('dob', self.gf('django.db.models.fields.DateTimeField')()),
+ ('application_number', self.gf('django.db.models.fields.IntegerField')(max_length=20)),
+ ('dob', self.gf('django.db.models.fields.DateField')()),
('category', self.gf('django.db.models.fields.CharField')(max_length=30)),
+ ('rank', self.gf('django.db.models.fields.IntegerField')(max_length=6)),
+ ('gender', self.gf('django.db.models.fields.CharField')(max_length=10)),
+ ('pd', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('allotter', ['Profile'])
+ # Adding M2M table for field exam_code on 'Profile'
+ db.create_table('allotter_profile_exam_code', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('profile', models.ForeignKey(orm['allotter.profile'], null=False)),
+ ('option', models.ForeignKey(orm['allotter.option'], null=False))
+ ))
+ db.create_unique('allotter_profile_exam_code', ['profile_id', 'option_id'])
+
# Adding model 'Application'
db.create_table('allotter_application', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
@@ -56,15 +75,21 @@ class Migration(SchemaMigration):
def backwards(self, orm):
+ # Deleting model 'Exam'
+ db.delete_table('allotter_exam')
+
# Deleting model 'Option'
db.delete_table('allotter_option')
- # Deleting model 'Exam'
- db.delete_table('allotter_exam')
+ # Removing M2M table for field exam on 'Option'
+ db.delete_table('allotter_option_exam')
# Deleting model 'Profile'
db.delete_table('allotter_profile')
+ # Removing M2M table for field exam_code on 'Profile'
+ db.delete_table('allotter_profile_exam_code')
+
# Deleting model 'Application'
db.delete_table('allotter_application')
@@ -91,16 +116,21 @@ class Migration(SchemaMigration):
},
'allotter.option': {
'Meta': {'object_name': 'Option'},
+ 'exam': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['allotter.Exam']", 'symmetrical': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'opt_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'seats': ('django.db.models.fields.IntegerField', [], {})
},
'allotter.profile': {
'Meta': {'object_name': 'Profile'},
+ 'application_number': ('django.db.models.fields.IntegerField', [], {'max_length': '20'}),
'category': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
- 'dob': ('django.db.models.fields.DateTimeField', [], {}),
+ 'dob': ('django.db.models.fields.DateField', [], {}),
+ 'exam_code': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['allotter.Option']", 'symmetrical': 'False'}),
+ 'gender': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'roll_number': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'pd': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'rank': ('django.db.models.fields.IntegerField', [], {'max_length': '6'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
},
'auth.group': {