|
| 1 | +# encoding: 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 | +class Migration(SchemaMigration): |
| 8 | + |
| 9 | + def forwards(self, orm): |
| 10 | + |
| 11 | + # Adding model 'College' |
| 12 | + db.create_table('participantsprofile_college', ( |
| 13 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 14 | + ('name', self.gf('django.db.models.fields.CharField')(max_length=150)), |
| 15 | + )) |
| 16 | + db.send_create_signal('participantsprofile', ['College']) |
| 17 | + |
| 18 | + # Adding model 'Participant' |
| 19 | + db.create_table('participantsprofile_participant', ( |
| 20 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 21 | + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['participantsprofile.UserProfile'], unique=True)), |
| 22 | + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), |
| 23 | + ('email_id', self.gf('django.db.models.fields.EmailField')(max_length=75)), |
| 24 | + ('phone_no', self.gf('django.db.models.fields.CharField')(max_length=12)), |
| 25 | + ('college', self.gf('django.db.models.fields.related.ForeignKey')(related_name='participants', to=orm['participantsprofile.College'])), |
| 26 | + ('roll_no', self.gf('django.db.models.fields.CharField')(max_length=8)), |
| 27 | + )) |
| 28 | + db.send_create_signal('participantsprofile', ['Participant']) |
| 29 | + |
| 30 | + # Adding model 'UserProfile' |
| 31 | + db.create_table('participantsprofile_userprofile', ( |
| 32 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 33 | + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)), |
| 34 | + ('user_type', self.gf('django.db.models.fields.CharField')(max_length=1)), |
| 35 | + )) |
| 36 | + db.send_create_signal('participantsprofile', ['UserProfile']) |
| 37 | + |
| 38 | + # Adding model 'Team' |
| 39 | + db.create_table('participantsprofile_team', ( |
| 40 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 41 | + ('no_of_persons', self.gf('django.db.models.fields.IntegerField')()), |
| 42 | + ('for_event', self.gf('django.db.models.fields.related.ForeignKey')(related_name='teams_registered', to=orm['events.Event'])), |
| 43 | + )) |
| 44 | + db.send_create_signal('participantsprofile', ['Team']) |
| 45 | + |
| 46 | + # Adding M2M table for field participants on 'Team' |
| 47 | + db.create_table('participantsprofile_team_participants', ( |
| 48 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
| 49 | + ('team', models.ForeignKey(orm['participantsprofile.team'], null=False)), |
| 50 | + ('participant', models.ForeignKey(orm['participantsprofile.participant'], null=False)) |
| 51 | + )) |
| 52 | + db.create_unique('participantsprofile_team_participants', ['team_id', 'participant_id']) |
| 53 | + |
| 54 | + |
| 55 | + def backwards(self, orm): |
| 56 | + |
| 57 | + # Deleting model 'College' |
| 58 | + db.delete_table('participantsprofile_college') |
| 59 | + |
| 60 | + # Deleting model 'Participant' |
| 61 | + db.delete_table('participantsprofile_participant') |
| 62 | + |
| 63 | + # Deleting model 'UserProfile' |
| 64 | + db.delete_table('participantsprofile_userprofile') |
| 65 | + |
| 66 | + # Deleting model 'Team' |
| 67 | + db.delete_table('participantsprofile_team') |
| 68 | + |
| 69 | + # Removing M2M table for field participants on 'Team' |
| 70 | + db.delete_table('participantsprofile_team_participants') |
| 71 | + |
| 72 | + |
| 73 | + models = { |
| 74 | + 'auth.group': { |
| 75 | + 'Meta': {'object_name': 'Group'}, |
| 76 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 77 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
| 78 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
| 79 | + }, |
| 80 | + 'auth.permission': { |
| 81 | + 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
| 82 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 83 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
| 84 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 85 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
| 86 | + }, |
| 87 | + 'auth.user': { |
| 88 | + 'Meta': {'object_name': 'User'}, |
| 89 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
| 90 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
| 91 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
| 92 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
| 93 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 94 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
| 95 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
| 96 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
| 97 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
| 98 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
| 99 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
| 100 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
| 101 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
| 102 | + }, |
| 103 | + 'contenttypes.contenttype': { |
| 104 | + 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
| 105 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 106 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 107 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 108 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
| 109 | + }, |
| 110 | + 'events.event': { |
| 111 | + 'Meta': {'object_name': 'Event'}, |
| 112 | + 'additional_info': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
| 113 | + 'caption': ('django.db.models.fields.CharField', [], {'max_length': '30'}), |
| 114 | + 'classic_name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), |
| 115 | + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
| 116 | + 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), |
| 117 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 118 | + 'rules': ('django.db.models.fields.TextField', [], {}), |
| 119 | + 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), |
| 120 | + 'venue': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) |
| 121 | + }, |
| 122 | + 'participantsprofile.college': { |
| 123 | + 'Meta': {'object_name': 'College'}, |
| 124 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 125 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}) |
| 126 | + }, |
| 127 | + 'participantsprofile.participant': { |
| 128 | + 'Meta': {'object_name': 'Participant'}, |
| 129 | + 'college': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'participants'", 'to': "orm['participantsprofile.College']"}), |
| 130 | + 'email_id': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
| 131 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 132 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 133 | + 'phone_no': ('django.db.models.fields.CharField', [], {'max_length': '12'}), |
| 134 | + 'roll_no': ('django.db.models.fields.CharField', [], {'max_length': '8'}), |
| 135 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['participantsprofile.UserProfile']", 'unique': 'True'}) |
| 136 | + }, |
| 137 | + 'participantsprofile.team': { |
| 138 | + 'Meta': {'object_name': 'Team'}, |
| 139 | + 'for_event': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'teams_registered'", 'to': "orm['events.Event']"}), |
| 140 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 141 | + 'no_of_persons': ('django.db.models.fields.IntegerField', [], {}), |
| 142 | + 'participants': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['participantsprofile.Participant']", 'symmetrical': 'False'}) |
| 143 | + }, |
| 144 | + 'participantsprofile.userprofile': { |
| 145 | + 'Meta': {'object_name': 'UserProfile'}, |
| 146 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 147 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}), |
| 148 | + 'user_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}) |
| 149 | + } |
| 150 | + } |
| 151 | + |
| 152 | + complete_apps = ['participantsprofile'] |
0 commit comments