diff --git a/gracedb/migrations/0001_initial.py b/gracedb/migrations/0001_initial.py index 0d35ad75ec12869d2053ce50b88cb2012d2fb59c..5c36f7d956e18f8653e90e1bcf9aad7a187a4b96 100644 --- a/gracedb/migrations/0001_initial.py +++ b/gracedb/migrations/0001_initial.py @@ -1,284 +1,547 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import models, migrations +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'User' - db.create_table('gracedb_user', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)), - ('principal', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('dn', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('unixid', self.gf('django.db.models.fields.CharField')(max_length=25)), - )) - db.send_create_signal('gracedb', ['User']) +class Migration(migrations.Migration): - # Adding model 'Group' - db.create_table('gracedb_group', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=20)), - )) - db.send_create_signal('gracedb', ['Group']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding M2M table for field managers on 'Group' - db.create_table('gracedb_group_managers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('group', models.ForeignKey(orm['gracedb.group'], null=False)), - ('user', models.ForeignKey(orm['gracedb.user'], null=False)) - )) - db.create_unique('gracedb_group_managers', ['group_id', 'user_id']) - - # Adding model 'Label' - db.create_table('gracedb_label', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), - ('defaultColor', self.gf('django.db.models.fields.CharField')(default='black', max_length=20)), - )) - db.send_create_signal('gracedb', ['Label']) - - # Adding model 'Event' - db.create_table('gracedb_event', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('submitter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Group'])), - ('uid', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), - ('analysisType', self.gf('django.db.models.fields.CharField')(max_length=20)), - ('instruments', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), - ('nevents', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('far', self.gf('django.db.models.fields.FloatField')(null=True)), - ('likelihood', self.gf('django.db.models.fields.FloatField')(null=True)), - ('gpstime', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - )) - db.send_create_signal('gracedb', ['Event']) - - # Adding model 'EventLog' - db.create_table('gracedb_eventlog', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('issuer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('filename', self.gf('django.db.models.fields.CharField')(default='', max_length=100)), - ('comment', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('gracedb', ['EventLog']) - - # Adding model 'Labelling' - db.create_table('gracedb_labelling', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), - ('label', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Label'])), - ('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - )) - db.send_create_signal('gracedb', ['Labelling']) - - # Adding model 'Approval' - db.create_table('gracedb_approval', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('approver', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('approvedEvent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), - ('approvingCollaboration', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('gracedb', ['Approval']) - - # Adding model 'CoincInspiralEvent' - db.create_table('gracedb_coincinspiralevent', ( - ('event_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['gracedb.Event'], unique=True, primary_key=True)), - ('ifos', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), - ('end_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('end_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('mass', self.gf('django.db.models.fields.FloatField')(null=True)), - ('mchirp', self.gf('django.db.models.fields.FloatField')(null=True)), - ('minimum_duration', self.gf('django.db.models.fields.FloatField')(null=True)), - ('snr', self.gf('django.db.models.fields.FloatField')(null=True)), - ('false_alarm_rate', self.gf('django.db.models.fields.FloatField')(null=True)), - ('combined_far', self.gf('django.db.models.fields.FloatField')(null=True)), - )) - db.send_create_signal('gracedb', ['CoincInspiralEvent']) - - # Adding model 'MultiBurstEvent' - db.create_table('gracedb_multiburstevent', ( - ('event_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['gracedb.Event'], unique=True, primary_key=True)), - ('ifos', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), - ('start_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('start_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('duration', self.gf('django.db.models.fields.FloatField')(null=True)), - ('peak_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('peak_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('central_freq', self.gf('django.db.models.fields.FloatField')(null=True)), - ('bandwidth', self.gf('django.db.models.fields.FloatField')(null=True)), - ('amplitude', self.gf('django.db.models.fields.FloatField')(null=True)), - ('snr', self.gf('django.db.models.fields.FloatField')(null=True)), - ('confidence', self.gf('django.db.models.fields.FloatField')(null=True)), - ('false_alarm_rate', self.gf('django.db.models.fields.FloatField')(null=True)), - ('ligo_axis_ra', self.gf('django.db.models.fields.FloatField')(null=True)), - ('ligo_axis_dec', self.gf('django.db.models.fields.FloatField')(null=True)), - ('ligo_angle', self.gf('django.db.models.fields.FloatField')(null=True)), - ('ligo_angle_sig', self.gf('django.db.models.fields.FloatField')(null=True)), - )) - db.send_create_signal('gracedb', ['MultiBurstEvent']) - - # Adding model 'Slot' - db.create_table('gracedb_slot', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('value', self.gf('django.db.models.fields.CharField')(max_length=100)), - )) - db.send_create_signal('gracedb', ['Slot']) - - # Adding unique constraint on 'Slot', fields ['event', 'name'] - db.create_unique('gracedb_slot', ['event_id', 'name']) - - - def backwards(self, orm): - # Removing unique constraint on 'Slot', fields ['event', 'name'] - db.delete_unique('gracedb_slot', ['event_id', 'name']) - - # Deleting model 'User' - db.delete_table('gracedb_user') - - # Deleting model 'Group' - db.delete_table('gracedb_group') - - # Removing M2M table for field managers on 'Group' - db.delete_table('gracedb_group_managers') - - # Deleting model 'Label' - db.delete_table('gracedb_label') - - # Deleting model 'Event' - db.delete_table('gracedb_event') - - # Deleting model 'EventLog' - db.delete_table('gracedb_eventlog') - - # Deleting model 'Labelling' - db.delete_table('gracedb_labelling') - - # Deleting model 'Approval' - db.delete_table('gracedb_approval') - - # Deleting model 'CoincInspiralEvent' - db.delete_table('gracedb_coincinspiralevent') - - # Deleting model 'MultiBurstEvent' - db.delete_table('gracedb_multiburstevent') - - # Deleting model 'Slot' - db.delete_table('gracedb_slot') - - - models = { - 'gracedb.approval': { - 'Meta': {'object_name': 'Approval'}, - 'approvedEvent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), - 'approver': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), - 'approvingCollaboration': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'gracedb.coincinspiralevent': { - 'Meta': {'ordering': "['-id']", 'object_name': 'CoincInspiralEvent', '_ormbases': ['gracedb.Event']}, - 'combined_far': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'end_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'end_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['gracedb.Event']", 'unique': 'True', 'primary_key': 'True'}), - 'false_alarm_rate': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'ifos': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), - 'mass': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'mchirp': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'minimum_duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'snr': ('django.db.models.fields.FloatField', [], {'null': 'True'}) - }, - 'gracedb.event': { - 'Meta': {'ordering': "['-id']", 'object_name': 'Event'}, - 'analysisType': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'far': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'gpstime': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Group']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instruments': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), - 'labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.Label']", 'through': "orm['gracedb.Labelling']", 'symmetrical': 'False'}), - 'likelihood': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'nevents': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'submitter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), - 'uid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}) - }, - 'gracedb.eventlog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'EventLog'}, - 'comment': ('django.db.models.fields.TextField', [], {}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), - 'filename': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'issuer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) - }, - 'gracedb.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.User']", 'symmetrical': 'False'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - }, - 'gracedb.label': { - 'Meta': {'object_name': 'Label'}, - 'defaultColor': ('django.db.models.fields.CharField', [], {'default': "'black'", 'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) - }, - 'gracedb.labelling': { - 'Meta': {'object_name': 'Labelling'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), - 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Label']"}) - }, - 'gracedb.multiburstevent': { - 'Meta': {'ordering': "['-id']", 'object_name': 'MultiBurstEvent', '_ormbases': ['gracedb.Event']}, - 'amplitude': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'bandwidth': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'central_freq': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'confidence': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['gracedb.Event']", 'unique': 'True', 'primary_key': 'True'}), - 'false_alarm_rate': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'ifos': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), - 'ligo_angle': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'ligo_angle_sig': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'ligo_axis_dec': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'ligo_axis_ra': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'peak_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'peak_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'snr': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'start_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}) - }, - 'gracedb.slot': { - 'Meta': {'unique_together': "(('event', 'name'),)", 'object_name': 'Slot'}, - 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'gracedb.user': { - 'Meta': {'ordering': "['name']", 'object_name': 'User'}, - 'dn': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'principal': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'unixid': ('django.db.models.fields.CharField', [], {'max_length': '25'}) - } - } - - complete_apps = ['gracedb'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='Approval', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('approvingCollaboration', models.CharField(max_length=1, choices=[(b'L', b'LIGO'), (b'V', b'Virgo')])), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EMBBEventLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('N', models.IntegerField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('instrument', models.CharField(max_length=200, blank=True)), + ('footprintID', models.TextField(blank=True)), + ('waveband', models.CharField(max_length=25, choices=[(b'em.gamma', b'Gamma rays part of the spectrum'), (b'em.gamma.soft', b'Soft gamma ray (120 - 500 keV)'), (b'em.gamma.hard', b'Hard gamma ray (>500 keV)'), (b'em.X-ray', b'X-ray part of the spectrum'), (b'em.X-ray.soft', b'Soft X-ray (0.12 - 2 keV)'), (b'em.X-ray.medium', b'Medium X-ray (2 - 12 keV)'), (b'em.X-ray.hard', b'Hard X-ray (12 - 120 keV)'), (b'em.UV', b'Ultraviolet part of the spectrum'), (b'em.UV.10-50nm', b'Ultraviolet between 10 and 50 nm'), (b'em.UV.50-100nm', b'Ultraviolet between 50 and 100 nm'), (b'em.UV.100-200nm', b'Ultraviolet between 100 and 200 nm'), (b'em.UV.200-300nm', b'Ultraviolet between 200 and 300 nm'), (b'em.UV.FUV', b'Far-Infrared, 30-100 microns'), (b'em.opt', b'Optical part of the spectrum'), (b'em.opt.U', b'Optical band between 300 and 400 nm'), (b'em.opt.B', b'Optical band between 400 and 500 nm'), (b'em.opt.V', b'Optical band between 500 and 600 nm'), (b'em.opt.R', b'Optical band between 600 and 750 nm'), (b'em.opt.I', b'Optical band between 750 and 1000 nm'), (b'em.IR', b'Infrared part of the spectrum'), (b'em.IR.NIR', b'Near-Infrared, 1-5 microns'), (b'em.IR.J', b'Infrared between 1.0 and 1.5 micron'), (b'em.IR.H', b'Infrared between 1.5 and 2 micron'), (b'em.IR.K', b'Infrared between 2 and 3 micron'), (b'em.IR.MIR', b'Medium-Infrared, 5-30 microns'), (b'em.IR.3-4um', b'Infrared between 3 and 4 micron'), (b'em.IR.4-8um', b'Infrared between 4 and 8 micron'), (b'em.IR.8-15um', b'Infrared between 8 and 15 micron'), (b'em.IR.15-30um', b'Infrared between 15 and 30 micron'), (b'em.IR.30-60um', b'Infrared between 30 and 60 micron'), (b'em.IR.60-100um', b'Infrared between 60 and 100 micron'), (b'em.IR.FIR', b'Far-Infrared, 30-100 microns'), (b'em.mm', b'Millimetric part of the spectrum'), (b'em.mm.1500-3000GHz', b'Millimetric between 1500 and 3000 GHz'), (b'em.mm.750-1500GHz', b'Millimetric between 750 and 1500 GHz'), (b'em.mm.400-750GHz', b'Millimetric between 400 and 750 GHz'), (b'em.mm.200-400GHz', b'Millimetric between 200 and 400 GHz'), (b'em.mm.100-200GHz', b'Millimetric between 100 and 200 GHz'), (b'em.mm.50-100GHz', b'Millimetric between 50 and 100 GHz'), (b'em.mm.30-50GHz', b'Millimetric between 30 and 50 GHz'), (b'em.radio', b'Radio part of the spectrum'), (b'em.radio.12-30GHz', b'Radio between 12 and 30 GHz'), (b'em.radio.6-12GHz', b'Radio between 6 and 12 GHz'), (b'em.radio.3-6GHz', b'Radio between 3 and 6 GHz'), (b'em.radio.1500-3000MHz', b'Radio between 1500 and 3000 MHz'), (b'em.radio.750-1500MHz', b'Radio between 750 and 1500 MHz'), (b'em.radio.400-750MHz', b'Radio between 400 and 750 MHz'), (b'em.radio.200-400MHz', b'Radio between 200 and 400 MHz'), (b'em.radio.100-200MHz', b'Radio between 100 and 200 MHz'), (b'em.radio.20-100MHz', b'Radio between 20 and 100 MHz')])), + ('ra', models.FloatField(null=True)), + ('dec', models.FloatField(null=True)), + ('raWidth', models.FloatField(null=True)), + ('decWidth', models.FloatField(null=True)), + ('gpstime', models.PositiveIntegerField(null=True)), + ('duration', models.PositiveIntegerField(null=True)), + ('raList', models.TextField(blank=True)), + ('decList', models.TextField(blank=True)), + ('raWidthList', models.TextField(blank=True)), + ('decWidthList', models.TextField(blank=True)), + ('gpstimeList', models.TextField(blank=True)), + ('durationList', models.TextField(blank=True)), + ('eel_status', models.CharField(max_length=2, choices=[(b'FO', b'FOOTPRINT'), (b'SO', b'SOURCE'), (b'CO', b'COMMENT'), (b'CI', b'CIRCULAR')])), + ('obs_status', models.CharField(max_length=2, choices=[(b'NA', b'NOT APPLICABLE'), (b'OB', b'OBSERVATION'), (b'TE', b'TEST'), (b'PR', b'PREDICTION')])), + ('comment', models.TextField(blank=True)), + ('extra_info_dict', models.TextField(blank=True)), + ], + options={ + 'ordering': ['-created', '-N'], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EMFootprint', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('N', models.IntegerField()), + ('ra', models.FloatField()), + ('dec', models.FloatField()), + ('raWidth', models.FloatField()), + ('decWidth', models.FloatField()), + ('start_time', models.DateTimeField()), + ('exposure_time', models.PositiveIntegerField()), + ], + options={ + 'ordering': ['-N'], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EMGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=20)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EMObservation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('N', models.IntegerField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('ra', models.FloatField(null=True)), + ('dec', models.FloatField(null=True)), + ('raWidth', models.FloatField(null=True)), + ('decWidth', models.FloatField(null=True)), + ('comment', models.TextField(blank=True)), + ], + options={ + 'ordering': ['-created', '-N'], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Event', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('instruments', models.CharField(default=b'', max_length=20)), + ('nevents', models.PositiveIntegerField(null=True)), + ('far', models.FloatField(null=True)), + ('likelihood', models.FloatField(null=True)), + ('gpstime', models.DecimalField(null=True, max_digits=16, decimal_places=6)), + ('perms', models.TextField(null=True)), + ], + options={ + 'ordering': ['-id'], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='CoincInspiralEvent', + fields=[ + ('event_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='gracedb.Event')), + ('ifos', models.CharField(default=b'', max_length=20)), + ('end_time', models.PositiveIntegerField(null=True)), + ('end_time_ns', models.PositiveIntegerField(null=True)), + ('mass', models.FloatField(null=True)), + ('mchirp', models.FloatField(null=True)), + ('minimum_duration', models.FloatField(null=True)), + ('snr', models.FloatField(null=True)), + ('false_alarm_rate', models.FloatField(null=True)), + ('combined_far', models.FloatField(null=True)), + ], + options={ + }, + bases=('gracedb.event',), + ), + migrations.CreateModel( + name='EventLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('filename', models.CharField(default=b'', max_length=100)), + ('comment', models.TextField()), + ('N', models.IntegerField()), + ('file_version', models.IntegerField(null=True)), + ], + options={ + 'ordering': ['-created', '-N'], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='GrbEvent', + fields=[ + ('event_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='gracedb.Event')), + ('ivorn', models.CharField(max_length=200, null=True)), + ('author_ivorn', models.CharField(max_length=200, null=True)), + ('author_shortname', models.CharField(max_length=200, null=True)), + ('observatory_location_id', models.CharField(max_length=200, null=True)), + ('coord_system', models.CharField(max_length=200, null=True)), + ('ra', models.FloatField(null=True)), + ('dec', models.FloatField(null=True)), + ('error_radius', models.FloatField(null=True)), + ('how_description', models.CharField(max_length=200, null=True)), + ('how_reference_url', models.URLField(null=True)), + ('trigger_duration', models.FloatField(null=True)), + ('t90', models.FloatField(null=True)), + ], + options={ + }, + bases=('gracedb.event',), + ), + migrations.CreateModel( + name='Group', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=20)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Label', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=20)), + ('defaultColor', models.CharField(default=b'black', max_length=20)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Labelling', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('creator', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MultiBurstEvent', + fields=[ + ('event_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='gracedb.Event')), + ('ifos', models.CharField(default=b'', max_length=20)), + ('start_time', models.PositiveIntegerField(null=True)), + ('start_time_ns', models.PositiveIntegerField(null=True)), + ('duration', models.FloatField(null=True)), + ('peak_time', models.PositiveIntegerField(null=True)), + ('peak_time_ns', models.PositiveIntegerField(null=True)), + ('central_freq', models.FloatField(null=True)), + ('bandwidth', models.FloatField(null=True)), + ('amplitude', models.FloatField(null=True)), + ('snr', models.FloatField(null=True)), + ('confidence', models.FloatField(null=True)), + ('false_alarm_rate', models.FloatField(null=True)), + ('ligo_axis_ra', models.FloatField(null=True)), + ('ligo_axis_dec', models.FloatField(null=True)), + ('ligo_angle', models.FloatField(null=True)), + ('ligo_angle_sig', models.FloatField(null=True)), + ], + options={ + }, + bases=('gracedb.event',), + ), + migrations.CreateModel( + name='Pipeline', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Search', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('description', models.TextField(blank=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='SimInspiralEvent', + fields=[ + ('event_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='gracedb.Event')), + ('mass1', models.FloatField(null=True)), + ('mass2', models.FloatField(null=True)), + ('eta', models.FloatField(null=True)), + ('amp_order', models.IntegerField(null=True)), + ('coa_phase', models.FloatField(null=True)), + ('mchirp', models.FloatField(null=True)), + ('spin1y', models.FloatField(null=True)), + ('spin1x', models.FloatField(null=True)), + ('spin1z', models.FloatField(null=True)), + ('spin2x', models.FloatField(null=True)), + ('spin2y', models.FloatField(null=True)), + ('spin2z', models.FloatField(null=True)), + ('geocent_end_time', models.IntegerField(null=True)), + ('geocent_end_time_ns', models.IntegerField(null=True)), + ('end_time_gmst', models.FloatField(null=True)), + ('f_lower', models.FloatField(null=True)), + ('f_final', models.FloatField(null=True)), + ('distance', models.FloatField(null=True)), + ('latitude', models.FloatField(null=True)), + ('longitude', models.FloatField(null=True)), + ('polarization', models.FloatField(null=True)), + ('inclination', models.FloatField(null=True)), + ('theta0', models.FloatField(null=True)), + ('phi0', models.FloatField(null=True)), + ('waveform', models.CharField(default=b'', max_length=50, blank=True)), + ('numrel_mode_min', models.IntegerField(null=True)), + ('numrel_mode_max', models.IntegerField(null=True)), + ('numrel_data', models.CharField(default=b'', max_length=50, blank=True)), + ('source', models.CharField(default=b'', max_length=50, blank=True)), + ('taper', models.CharField(default=b'', max_length=50, blank=True)), + ('bandpass', models.IntegerField(null=True)), + ('alpha', models.FloatField(null=True)), + ('beta', models.FloatField(null=True)), + ('psi0', models.FloatField(null=True)), + ('psi3', models.FloatField(null=True)), + ('alpha1', models.FloatField(null=True)), + ('alpha2', models.FloatField(null=True)), + ('alpha3', models.FloatField(null=True)), + ('alpha4', models.FloatField(null=True)), + ('alpha5', models.FloatField(null=True)), + ('alpha6', models.FloatField(null=True)), + ('g_end_time', models.IntegerField(null=True)), + ('g_end_time_ns', models.IntegerField(null=True)), + ('h_end_time', models.IntegerField(null=True)), + ('h_end_time_ns', models.IntegerField(null=True)), + ('l_end_time', models.IntegerField(null=True)), + ('l_end_time_ns', models.IntegerField(null=True)), + ('t_end_time', models.IntegerField(null=True)), + ('t_end_time_ns', models.IntegerField(null=True)), + ('v_end_time', models.IntegerField(null=True)), + ('v_end_time_ns', models.IntegerField(null=True)), + ('eff_dist_g', models.FloatField(null=True)), + ('eff_dist_h', models.FloatField(null=True)), + ('eff_dist_l', models.FloatField(null=True)), + ('eff_dist_t', models.FloatField(null=True)), + ('eff_dist_v', models.FloatField(null=True)), + ('source_channel', models.CharField(default=b'', max_length=50, blank=True)), + ('destination_channel', models.CharField(default=b'', max_length=50, blank=True)), + ], + options={ + }, + bases=('gracedb.event',), + ), + migrations.CreateModel( + name='SingleInspiral', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('ifo', models.CharField(max_length=20, null=True)), + ('search', models.CharField(max_length=20, null=True)), + ('channel', models.CharField(max_length=20)), + ('end_time', models.IntegerField(null=True)), + ('end_time_ns', models.IntegerField(null=True)), + ('end_time_gmst', models.FloatField(null=True)), + ('impulse_time', models.IntegerField(null=True)), + ('impulse_time_ns', models.IntegerField(null=True)), + ('template_duration', models.FloatField(null=True)), + ('event_duration', models.FloatField(null=True)), + ('amplitude', models.FloatField(null=True)), + ('eff_distance', models.FloatField(null=True)), + ('coa_phase', models.FloatField(null=True)), + ('mass1', models.FloatField(null=True)), + ('mass2', models.FloatField(null=True)), + ('mchirp', models.FloatField(null=True)), + ('mtotal', models.FloatField(null=True)), + ('eta', models.FloatField(null=True)), + ('kappa', models.FloatField(null=True)), + ('chi', models.FloatField(null=True)), + ('tau0', models.FloatField(null=True)), + ('tau2', models.FloatField(null=True)), + ('tau3', models.FloatField(null=True)), + ('tau4', models.FloatField(null=True)), + ('tau5', models.FloatField(null=True)), + ('ttotal', models.FloatField(null=True)), + ('psi0', models.FloatField(null=True)), + ('psi3', models.FloatField(null=True)), + ('alpha', models.FloatField(null=True)), + ('alpha1', models.FloatField(null=True)), + ('alpha2', models.FloatField(null=True)), + ('alpha3', models.FloatField(null=True)), + ('alpha4', models.FloatField(null=True)), + ('alpha5', models.FloatField(null=True)), + ('alpha6', models.FloatField(null=True)), + ('beta', models.FloatField(null=True)), + ('f_final', models.FloatField(null=True)), + ('snr', models.FloatField(null=True)), + ('chisq', models.FloatField(null=True)), + ('chisq_dof', models.IntegerField(null=True)), + ('bank_chisq', models.FloatField(null=True)), + ('bank_chisq_dof', models.IntegerField(null=True)), + ('cont_chisq', models.FloatField(null=True)), + ('cont_chisq_dof', models.IntegerField(null=True)), + ('sigmasq', models.FloatField(null=True)), + ('rsqveto_duration', models.FloatField(null=True)), + ('Gamma0', models.FloatField(null=True)), + ('Gamma1', models.FloatField(null=True)), + ('Gamma2', models.FloatField(null=True)), + ('Gamma3', models.FloatField(null=True)), + ('Gamma4', models.FloatField(null=True)), + ('Gamma5', models.FloatField(null=True)), + ('Gamma6', models.FloatField(null=True)), + ('Gamma7', models.FloatField(null=True)), + ('Gamma8', models.FloatField(null=True)), + ('Gamma9', models.FloatField(null=True)), + ('spin1x', models.FloatField(null=True)), + ('spin1y', models.FloatField(null=True)), + ('spin1z', models.FloatField(null=True)), + ('spin2x', models.FloatField(null=True)), + ('spin2y', models.FloatField(null=True)), + ('spin2z', models.FloatField(null=True)), + ('event', models.ForeignKey(to='gracedb.Event')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('displayName', models.CharField(max_length=200, null=True)), + ('eventlogs', models.ManyToManyField(to='gracedb.EventLog')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='VOEvent', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('ivorn', models.CharField(default=b'', max_length=200)), + ('filename', models.CharField(default=b'', max_length=100)), + ('file_version', models.IntegerField(null=True)), + ('N', models.IntegerField()), + ('voevent_type', models.CharField(max_length=2, choices=[(b'PR', b'preliminary'), (b'IN', b'initial'), (b'UP', b'update'), (b'RE', b'retraction')])), + ('event', models.ForeignKey(to='gracedb.Event')), + ('issuer', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ['-created', '-N'], + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='voevent', + unique_together=set([('event', 'N')]), + ), + migrations.AddField( + model_name='labelling', + name='event', + field=models.ForeignKey(to='gracedb.Event'), + preserve_default=True, + ), + migrations.AddField( + model_name='labelling', + name='label', + field=models.ForeignKey(to='gracedb.Label'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventlog', + name='event', + field=models.ForeignKey(to='gracedb.Event'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventlog', + name='issuer', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='eventlog', + unique_together=set([('event', 'N')]), + ), + migrations.AddField( + model_name='event', + name='group', + field=models.ForeignKey(to='gracedb.Group'), + preserve_default=True, + ), + migrations.AddField( + model_name='event', + name='labels', + field=models.ManyToManyField(to='gracedb.Label', through='gracedb.Labelling'), + preserve_default=True, + ), + migrations.AddField( + model_name='event', + name='pipeline', + field=models.ForeignKey(to='gracedb.Pipeline'), + preserve_default=True, + ), + migrations.AddField( + model_name='event', + name='search', + field=models.ForeignKey(to='gracedb.Search', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='event', + name='submitter', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + migrations.AddField( + model_name='emobservation', + name='event', + field=models.ForeignKey(to='gracedb.Event'), + preserve_default=True, + ), + migrations.AddField( + model_name='emobservation', + name='group', + field=models.ForeignKey(to='gracedb.EMGroup'), + preserve_default=True, + ), + migrations.AddField( + model_name='emobservation', + name='submitter', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='emobservation', + unique_together=set([('event', 'N')]), + ), + migrations.AddField( + model_name='emfootprint', + name='observation', + field=models.ForeignKey(to='gracedb.EMObservation'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='emfootprint', + unique_together=set([('observation', 'N')]), + ), + migrations.AddField( + model_name='embbeventlog', + name='event', + field=models.ForeignKey(to='gracedb.Event'), + preserve_default=True, + ), + migrations.AddField( + model_name='embbeventlog', + name='group', + field=models.ForeignKey(to='gracedb.EMGroup'), + preserve_default=True, + ), + migrations.AddField( + model_name='embbeventlog', + name='submitter', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='embbeventlog', + unique_together=set([('event', 'N')]), + ), + migrations.AddField( + model_name='approval', + name='approvedEvent', + field=models.ForeignKey(to='gracedb.Event'), + preserve_default=True, + ), + migrations.AddField( + model_name='approval', + name='approver', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + ] diff --git a/gracedb/south_migrations/0001_initial.py b/gracedb/south_migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..0d35ad75ec12869d2053ce50b88cb2012d2fb59c --- /dev/null +++ b/gracedb/south_migrations/0001_initial.py @@ -0,0 +1,284 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'User' + db.create_table('gracedb_user', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)), + ('principal', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('dn', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('unixid', self.gf('django.db.models.fields.CharField')(max_length=25)), + )) + db.send_create_signal('gracedb', ['User']) + + # Adding model 'Group' + db.create_table('gracedb_group', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=20)), + )) + db.send_create_signal('gracedb', ['Group']) + + # Adding M2M table for field managers on 'Group' + db.create_table('gracedb_group_managers', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('group', models.ForeignKey(orm['gracedb.group'], null=False)), + ('user', models.ForeignKey(orm['gracedb.user'], null=False)) + )) + db.create_unique('gracedb_group_managers', ['group_id', 'user_id']) + + # Adding model 'Label' + db.create_table('gracedb_label', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), + ('defaultColor', self.gf('django.db.models.fields.CharField')(default='black', max_length=20)), + )) + db.send_create_signal('gracedb', ['Label']) + + # Adding model 'Event' + db.create_table('gracedb_event', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('submitter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Group'])), + ('uid', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), + ('analysisType', self.gf('django.db.models.fields.CharField')(max_length=20)), + ('instruments', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), + ('nevents', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('far', self.gf('django.db.models.fields.FloatField')(null=True)), + ('likelihood', self.gf('django.db.models.fields.FloatField')(null=True)), + ('gpstime', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + )) + db.send_create_signal('gracedb', ['Event']) + + # Adding model 'EventLog' + db.create_table('gracedb_eventlog', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('issuer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('filename', self.gf('django.db.models.fields.CharField')(default='', max_length=100)), + ('comment', self.gf('django.db.models.fields.TextField')()), + )) + db.send_create_signal('gracedb', ['EventLog']) + + # Adding model 'Labelling' + db.create_table('gracedb_labelling', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), + ('label', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Label'])), + ('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + )) + db.send_create_signal('gracedb', ['Labelling']) + + # Adding model 'Approval' + db.create_table('gracedb_approval', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('approver', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('approvedEvent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), + ('approvingCollaboration', self.gf('django.db.models.fields.CharField')(max_length=1)), + )) + db.send_create_signal('gracedb', ['Approval']) + + # Adding model 'CoincInspiralEvent' + db.create_table('gracedb_coincinspiralevent', ( + ('event_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['gracedb.Event'], unique=True, primary_key=True)), + ('ifos', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), + ('end_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('end_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('mass', self.gf('django.db.models.fields.FloatField')(null=True)), + ('mchirp', self.gf('django.db.models.fields.FloatField')(null=True)), + ('minimum_duration', self.gf('django.db.models.fields.FloatField')(null=True)), + ('snr', self.gf('django.db.models.fields.FloatField')(null=True)), + ('false_alarm_rate', self.gf('django.db.models.fields.FloatField')(null=True)), + ('combined_far', self.gf('django.db.models.fields.FloatField')(null=True)), + )) + db.send_create_signal('gracedb', ['CoincInspiralEvent']) + + # Adding model 'MultiBurstEvent' + db.create_table('gracedb_multiburstevent', ( + ('event_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['gracedb.Event'], unique=True, primary_key=True)), + ('ifos', self.gf('django.db.models.fields.CharField')(default='', max_length=20)), + ('start_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('start_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('duration', self.gf('django.db.models.fields.FloatField')(null=True)), + ('peak_time', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('peak_time_ns', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), + ('central_freq', self.gf('django.db.models.fields.FloatField')(null=True)), + ('bandwidth', self.gf('django.db.models.fields.FloatField')(null=True)), + ('amplitude', self.gf('django.db.models.fields.FloatField')(null=True)), + ('snr', self.gf('django.db.models.fields.FloatField')(null=True)), + ('confidence', self.gf('django.db.models.fields.FloatField')(null=True)), + ('false_alarm_rate', self.gf('django.db.models.fields.FloatField')(null=True)), + ('ligo_axis_ra', self.gf('django.db.models.fields.FloatField')(null=True)), + ('ligo_axis_dec', self.gf('django.db.models.fields.FloatField')(null=True)), + ('ligo_angle', self.gf('django.db.models.fields.FloatField')(null=True)), + ('ligo_angle_sig', self.gf('django.db.models.fields.FloatField')(null=True)), + )) + db.send_create_signal('gracedb', ['MultiBurstEvent']) + + # Adding model 'Slot' + db.create_table('gracedb_slot', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.Event'])), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('value', self.gf('django.db.models.fields.CharField')(max_length=100)), + )) + db.send_create_signal('gracedb', ['Slot']) + + # Adding unique constraint on 'Slot', fields ['event', 'name'] + db.create_unique('gracedb_slot', ['event_id', 'name']) + + + def backwards(self, orm): + # Removing unique constraint on 'Slot', fields ['event', 'name'] + db.delete_unique('gracedb_slot', ['event_id', 'name']) + + # Deleting model 'User' + db.delete_table('gracedb_user') + + # Deleting model 'Group' + db.delete_table('gracedb_group') + + # Removing M2M table for field managers on 'Group' + db.delete_table('gracedb_group_managers') + + # Deleting model 'Label' + db.delete_table('gracedb_label') + + # Deleting model 'Event' + db.delete_table('gracedb_event') + + # Deleting model 'EventLog' + db.delete_table('gracedb_eventlog') + + # Deleting model 'Labelling' + db.delete_table('gracedb_labelling') + + # Deleting model 'Approval' + db.delete_table('gracedb_approval') + + # Deleting model 'CoincInspiralEvent' + db.delete_table('gracedb_coincinspiralevent') + + # Deleting model 'MultiBurstEvent' + db.delete_table('gracedb_multiburstevent') + + # Deleting model 'Slot' + db.delete_table('gracedb_slot') + + + models = { + 'gracedb.approval': { + 'Meta': {'object_name': 'Approval'}, + 'approvedEvent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), + 'approver': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), + 'approvingCollaboration': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'gracedb.coincinspiralevent': { + 'Meta': {'ordering': "['-id']", 'object_name': 'CoincInspiralEvent', '_ormbases': ['gracedb.Event']}, + 'combined_far': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'end_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'end_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['gracedb.Event']", 'unique': 'True', 'primary_key': 'True'}), + 'false_alarm_rate': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'ifos': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), + 'mass': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'mchirp': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'minimum_duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'snr': ('django.db.models.fields.FloatField', [], {'null': 'True'}) + }, + 'gracedb.event': { + 'Meta': {'ordering': "['-id']", 'object_name': 'Event'}, + 'analysisType': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'far': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'gpstime': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Group']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'instruments': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), + 'labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.Label']", 'through': "orm['gracedb.Labelling']", 'symmetrical': 'False'}), + 'likelihood': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'nevents': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'submitter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), + 'uid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}) + }, + 'gracedb.eventlog': { + 'Meta': {'ordering': "['-created']", 'object_name': 'EventLog'}, + 'comment': ('django.db.models.fields.TextField', [], {}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), + 'filename': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'issuer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) + }, + 'gracedb.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.User']", 'symmetrical': 'False'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}) + }, + 'gracedb.label': { + 'Meta': {'object_name': 'Label'}, + 'defaultColor': ('django.db.models.fields.CharField', [], {'default': "'black'", 'max_length': '20'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) + }, + 'gracedb.labelling': { + 'Meta': {'object_name': 'Labelling'}, + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}), + 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Label']"}) + }, + 'gracedb.multiburstevent': { + 'Meta': {'ordering': "['-id']", 'object_name': 'MultiBurstEvent', '_ormbases': ['gracedb.Event']}, + 'amplitude': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'bandwidth': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'central_freq': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'confidence': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['gracedb.Event']", 'unique': 'True', 'primary_key': 'True'}), + 'false_alarm_rate': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'ifos': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20'}), + 'ligo_angle': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'ligo_angle_sig': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'ligo_axis_dec': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'ligo_axis_ra': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'peak_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'peak_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'snr': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'start_time': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), + 'start_time_ns': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}) + }, + 'gracedb.slot': { + 'Meta': {'unique_together': "(('event', 'name'),)", 'object_name': 'Slot'}, + 'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.Event']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'value': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'gracedb.user': { + 'Meta': {'ordering': "['name']", 'object_name': 'User'}, + 'dn': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'principal': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'unixid': ('django.db.models.fields.CharField', [], {'max_length': '25'}) + } + } + + complete_apps = ['gracedb'] \ No newline at end of file diff --git a/gracedb/migrations/0002_auto__add_tag.py b/gracedb/south_migrations/0002_auto__add_tag.py similarity index 100% rename from gracedb/migrations/0002_auto__add_tag.py rename to gracedb/south_migrations/0002_auto__add_tag.py diff --git a/gracedb/migrations/0003_auto__del_slot__del_unique_slot_event_name.py b/gracedb/south_migrations/0003_auto__del_slot__del_unique_slot_event_name.py similarity index 100% rename from gracedb/migrations/0003_auto__del_slot__del_unique_slot_event_name.py rename to gracedb/south_migrations/0003_auto__del_slot__del_unique_slot_event_name.py diff --git a/gracedb/migrations/0004_populate_tags.py b/gracedb/south_migrations/0004_populate_tags.py similarity index 100% rename from gracedb/migrations/0004_populate_tags.py rename to gracedb/south_migrations/0004_populate_tags.py diff --git a/gracedb/migrations/0005_stage1_rm_ligouser__add_new_foreign_keys.py b/gracedb/south_migrations/0005_stage1_rm_ligouser__add_new_foreign_keys.py similarity index 100% rename from gracedb/migrations/0005_stage1_rm_ligouser__add_new_foreign_keys.py rename to gracedb/south_migrations/0005_stage1_rm_ligouser__add_new_foreign_keys.py diff --git a/gracedb/migrations/0006_stage2_rm_ligouser__populate_new_foreign_keys.py b/gracedb/south_migrations/0006_stage2_rm_ligouser__populate_new_foreign_keys.py similarity index 100% rename from gracedb/migrations/0006_stage2_rm_ligouser__populate_new_foreign_keys.py rename to gracedb/south_migrations/0006_stage2_rm_ligouser__populate_new_foreign_keys.py diff --git a/gracedb/migrations/0007_stage3_rm_ligouser__remove_old_foreign_keys.py b/gracedb/south_migrations/0007_stage3_rm_ligouser__remove_old_foreign_keys.py similarity index 100% rename from gracedb/migrations/0007_stage3_rm_ligouser__remove_old_foreign_keys.py rename to gracedb/south_migrations/0007_stage3_rm_ligouser__remove_old_foreign_keys.py diff --git a/gracedb/migrations/0008_auto__del_user.py b/gracedb/south_migrations/0008_auto__del_user.py similarity index 100% rename from gracedb/migrations/0008_auto__del_user.py rename to gracedb/south_migrations/0008_auto__del_user.py diff --git a/gracedb/migrations/0009_add_single_inspiral.py b/gracedb/south_migrations/0009_add_single_inspiral.py similarity index 100% rename from gracedb/migrations/0009_add_single_inspiral.py rename to gracedb/south_migrations/0009_add_single_inspiral.py diff --git a/gracedb/migrations/0010_auto__add_field_eventlog_N.py b/gracedb/south_migrations/0010_auto__add_field_eventlog_N.py similarity index 100% rename from gracedb/migrations/0010_auto__add_field_eventlog_N.py rename to gracedb/south_migrations/0010_auto__add_field_eventlog_N.py diff --git a/gracedb/migrations/0011_calc_logN.py b/gracedb/south_migrations/0011_calc_logN.py similarity index 100% rename from gracedb/migrations/0011_calc_logN.py rename to gracedb/south_migrations/0011_calc_logN.py diff --git a/gracedb/migrations/0012_auto__add_unique_eventlog_event_N.py b/gracedb/south_migrations/0012_auto__add_unique_eventlog_event_N.py similarity index 100% rename from gracedb/migrations/0012_auto__add_unique_eventlog_event_N.py rename to gracedb/south_migrations/0012_auto__add_unique_eventlog_event_N.py diff --git a/gracedb/migrations/0013_empty_sync_migration.py b/gracedb/south_migrations/0013_empty_sync_migration.py similarity index 100% rename from gracedb/migrations/0013_empty_sync_migration.py rename to gracedb/south_migrations/0013_empty_sync_migration.py diff --git a/gracedb/migrations/0014_add_grb_event_table.py b/gracedb/south_migrations/0014_add_grb_event_table.py similarity index 100% rename from gracedb/migrations/0014_add_grb_event_table.py rename to gracedb/south_migrations/0014_add_grb_event_table.py diff --git a/gracedb/migrations/0015_add_tag_ana_comm.py b/gracedb/south_migrations/0015_add_tag_ana_comm.py similarity index 100% rename from gracedb/migrations/0015_add_tag_ana_comm.py rename to gracedb/south_migrations/0015_add_tag_ana_comm.py diff --git a/gracedb/migrations/0016_change_analyst_comments_tag.py b/gracedb/south_migrations/0016_change_analyst_comments_tag.py similarity index 100% rename from gracedb/migrations/0016_change_analyst_comments_tag.py rename to gracedb/south_migrations/0016_change_analyst_comments_tag.py diff --git a/gracedb/migrations/0017_auto__add_field_eventlog_file_version.py b/gracedb/south_migrations/0017_auto__add_field_eventlog_file_version.py similarity index 100% rename from gracedb/migrations/0017_auto__add_field_eventlog_file_version.py rename to gracedb/south_migrations/0017_auto__add_field_eventlog_file_version.py diff --git a/gracedb/migrations/0018_add_tag_background.py b/gracedb/south_migrations/0018_add_tag_background.py similarity index 100% rename from gracedb/migrations/0018_add_tag_background.py rename to gracedb/south_migrations/0018_add_tag_background.py diff --git a/gracedb/migrations/0019_auto__add_field_event_perms.py b/gracedb/south_migrations/0019_auto__add_field_event_perms.py similarity index 100% rename from gracedb/migrations/0019_auto__add_field_event_perms.py rename to gracedb/south_migrations/0019_auto__add_field_event_perms.py diff --git a/gracedb/migrations/0020_add_perms_on_existing_events.py b/gracedb/south_migrations/0020_add_perms_on_existing_events.py similarity index 100% rename from gracedb/migrations/0020_add_perms_on_existing_events.py rename to gracedb/south_migrations/0020_add_perms_on_existing_events.py diff --git a/gracedb/migrations/0021_auto__add_search__add_pipeline.py b/gracedb/south_migrations/0021_auto__add_search__add_pipeline.py similarity index 100% rename from gracedb/migrations/0021_auto__add_search__add_pipeline.py rename to gracedb/south_migrations/0021_auto__add_search__add_pipeline.py diff --git a/gracedb/migrations/0022_load_initial_pipelines.py b/gracedb/south_migrations/0022_load_initial_pipelines.py similarity index 100% rename from gracedb/migrations/0022_load_initial_pipelines.py rename to gracedb/south_migrations/0022_load_initial_pipelines.py diff --git a/gracedb/migrations/0023_load_initial_searches.py b/gracedb/south_migrations/0023_load_initial_searches.py similarity index 100% rename from gracedb/migrations/0023_load_initial_searches.py rename to gracedb/south_migrations/0023_load_initial_searches.py diff --git a/gracedb/migrations/0024_auto__add_field_event_pipeline__add_field_event_search.py b/gracedb/south_migrations/0024_auto__add_field_event_pipeline__add_field_event_search.py similarity index 100% rename from gracedb/migrations/0024_auto__add_field_event_pipeline__add_field_event_search.py rename to gracedb/south_migrations/0024_auto__add_field_event_pipeline__add_field_event_search.py diff --git a/gracedb/migrations/0025_populate_event_pipeline_and_search.py b/gracedb/south_migrations/0025_populate_event_pipeline_and_search.py similarity index 100% rename from gracedb/migrations/0025_populate_event_pipeline_and_search.py rename to gracedb/south_migrations/0025_populate_event_pipeline_and_search.py diff --git a/gracedb/migrations/0026_auto__del_field_event_analysisType.py b/gracedb/south_migrations/0026_auto__del_field_event_analysisType.py similarity index 100% rename from gracedb/migrations/0026_auto__del_field_event_analysisType.py rename to gracedb/south_migrations/0026_auto__del_field_event_analysisType.py diff --git a/gracedb/migrations/0027_auto__del_field_event_uid.py b/gracedb/south_migrations/0027_auto__del_field_event_uid.py similarity index 100% rename from gracedb/migrations/0027_auto__del_field_event_uid.py rename to gracedb/south_migrations/0027_auto__del_field_event_uid.py diff --git a/gracedb/migrations/0028_auto__add_emgroup__add_embbeventlog__add_unique_embbeventlog_event_N.py b/gracedb/south_migrations/0028_auto__add_emgroup__add_embbeventlog__add_unique_embbeventlog_event_N.py similarity index 100% rename from gracedb/migrations/0028_auto__add_emgroup__add_embbeventlog__add_unique_embbeventlog_event_N.py rename to gracedb/south_migrations/0028_auto__add_emgroup__add_embbeventlog__add_unique_embbeventlog_event_N.py diff --git a/gracedb/migrations/0029_populate_emgroups.py b/gracedb/south_migrations/0029_populate_emgroups.py similarity index 100% rename from gracedb/migrations/0029_populate_emgroups.py rename to gracedb/south_migrations/0029_populate_emgroups.py diff --git a/gracedb/migrations/0030_auto__add_field_embbeventlog_raList__add_field_embbeventlog_decList__a.py b/gracedb/south_migrations/0030_auto__add_field_embbeventlog_raList__add_field_embbeventlog_decList__a.py similarity index 100% rename from gracedb/migrations/0030_auto__add_field_embbeventlog_raList__add_field_embbeventlog_decList__a.py rename to gracedb/south_migrations/0030_auto__add_field_embbeventlog_raList__add_field_embbeventlog_decList__a.py diff --git a/gracedb/migrations/0031__auto__add_field_embbeventlog_raWidthList__add_field_embbeventlog_decWi.py b/gracedb/south_migrations/0031__auto__add_field_embbeventlog_raWidthList__add_field_embbeventlog_decWi.py similarity index 100% rename from gracedb/migrations/0031__auto__add_field_embbeventlog_raWidthList__add_field_embbeventlog_decWi.py rename to gracedb/south_migrations/0031__auto__add_field_embbeventlog_raWidthList__add_field_embbeventlog_decWi.py diff --git a/gracedb/migrations/0032_auto__chg_field_embbeventlog_decWidthList__chg_field_embbeventlog_raWi.py b/gracedb/south_migrations/0032_auto__chg_field_embbeventlog_decWidthList__chg_field_embbeventlog_raWi.py similarity index 100% rename from gracedb/migrations/0032_auto__chg_field_embbeventlog_decWidthList__chg_field_embbeventlog_raWi.py rename to gracedb/south_migrations/0032_auto__chg_field_embbeventlog_decWidthList__chg_field_embbeventlog_raWi.py diff --git a/gracedb/migrations/0033_auto__chg_field_embbeventlog_durationList.py b/gracedb/south_migrations/0033_auto__chg_field_embbeventlog_durationList.py similarity index 100% rename from gracedb/migrations/0033_auto__chg_field_embbeventlog_durationList.py rename to gracedb/south_migrations/0033_auto__chg_field_embbeventlog_durationList.py diff --git a/gracedb/migrations/0034_migrate_existing_eels_to_lists.py b/gracedb/south_migrations/0034_migrate_existing_eels_to_lists.py similarity index 100% rename from gracedb/migrations/0034_migrate_existing_eels_to_lists.py rename to gracedb/south_migrations/0034_migrate_existing_eels_to_lists.py diff --git a/gracedb/migrations/0035_add_mdc_search.py b/gracedb/south_migrations/0035_add_mdc_search.py similarity index 100% rename from gracedb/migrations/0035_add_mdc_search.py rename to gracedb/south_migrations/0035_add_mdc_search.py diff --git a/gracedb/migrations/0036_auto__add_field_singleinspiral_spin1x__add_field_singleinspiral_spin1y.py b/gracedb/south_migrations/0036_auto__add_field_singleinspiral_spin1x__add_field_singleinspiral_spin1y.py similarity index 100% rename from gracedb/migrations/0036_auto__add_field_singleinspiral_spin1x__add_field_singleinspiral_spin1y.py rename to gracedb/south_migrations/0036_auto__add_field_singleinspiral_spin1x__add_field_singleinspiral_spin1y.py diff --git a/gracedb/migrations/0037_auto__chg_field_event_gpstime.py b/gracedb/south_migrations/0037_auto__chg_field_event_gpstime.py similarity index 100% rename from gracedb/migrations/0037_auto__chg_field_event_gpstime.py rename to gracedb/south_migrations/0037_auto__chg_field_event_gpstime.py diff --git a/gracedb/migrations/0038_auto__add_voevent__add_unique_voevent_event_N.py b/gracedb/south_migrations/0038_auto__add_voevent__add_unique_voevent_event_N.py similarity index 100% rename from gracedb/migrations/0038_auto__add_voevent__add_unique_voevent_event_N.py rename to gracedb/south_migrations/0038_auto__add_voevent__add_unique_voevent_event_N.py diff --git a/gracedb/migrations/0039_auto__add_emobservation__add_unique_emobservation_event_N__add_emfootp.py b/gracedb/south_migrations/0039_auto__add_emobservation__add_unique_emobservation_event_N__add_emfootp.py similarity index 100% rename from gracedb/migrations/0039_auto__add_emobservation__add_unique_emobservation_event_N__add_emfootp.py rename to gracedb/south_migrations/0039_auto__add_emobservation__add_unique_emobservation_event_N__add_emfootp.py diff --git a/gracedb/migrations/0040_migrate_eels_to_observations.py b/gracedb/south_migrations/0040_migrate_eels_to_observations.py similarity index 100% rename from gracedb/migrations/0040_migrate_eels_to_observations.py rename to gracedb/south_migrations/0040_migrate_eels_to_observations.py diff --git a/gracedb/migrations/0041_auto__add_field_emobservation_comment.py b/gracedb/south_migrations/0041_auto__add_field_emobservation_comment.py similarity index 100% rename from gracedb/migrations/0041_auto__add_field_emobservation_comment.py rename to gracedb/south_migrations/0041_auto__add_field_emobservation_comment.py diff --git a/gracedb/migrations/0042_auto__add_field_grbevent_t90.py b/gracedb/south_migrations/0042_auto__add_field_grbevent_t90.py similarity index 100% rename from gracedb/migrations/0042_auto__add_field_grbevent_t90.py rename to gracedb/south_migrations/0042_auto__add_field_grbevent_t90.py diff --git a/gracedb/migrations/0043_auto__add_field_grbevent_trigger_duration.py b/gracedb/south_migrations/0043_auto__add_field_grbevent_trigger_duration.py similarity index 100% rename from gracedb/migrations/0043_auto__add_field_grbevent_trigger_duration.py rename to gracedb/south_migrations/0043_auto__add_field_grbevent_trigger_duration.py diff --git a/gracedb/migrations/0044_auto__add_siminspiralevent.py b/gracedb/south_migrations/0044_auto__add_siminspiralevent.py similarity index 100% rename from gracedb/migrations/0044_auto__add_siminspiralevent.py rename to gracedb/south_migrations/0044_auto__add_siminspiralevent.py diff --git a/gracedb/south_migrations/__init__.py b/gracedb/south_migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gracedb/view_utils.py b/gracedb/view_utils.py index 0c9536353bc75bc73c524a4dc3100e553fcc0a55..020ac9b6fdc0225051faabdb4c5ce04ae4c8f6d2 100644 --- a/gracedb/view_utils.py +++ b/gracedb/view_utils.py @@ -581,7 +581,7 @@ def jqgridResponse(request, objects): pass def flexigridResponse(request, objects): - response = HttpResponse(mimetype='application/json') + response = HttpResponse(content_type='application/json') #sortname = request.POST.get('sortname', None) #sortorder = request.POST.get('sortorder', 'desc') diff --git a/gracedb/views.py b/gracedb/views.py index 4ac80a95946742420d7cf743c1c96a9a1fe16b20..51ca977c52c65069b1648e8f384bf5e19f769453 100644 --- a/gracedb/views.py +++ b/gracedb/views.py @@ -109,13 +109,13 @@ def create(request): # XXX Risky. msg should be json, not str. # str(x) is *often* the same as json(x), but not always. # It's not, because we don't reliably have json on the client side. - response = HttpResponse(mimetype='application/json') + response = HttpResponse(content_type='application/json') if 'graceid' in d: d['output'] = "%s" % d['graceid'] d['graceid'] = "%s" % d['graceid'] msg = str(d) else: # Old client - response = HttpResponse(mimetype='text/plain') + response = HttpResponse(content_type='text/plain') if 'error' in d: msg = "ERROR: " + d['error'] elif 'warning' in d: @@ -374,7 +374,7 @@ def search(request, format=""): msg = "An error occured while trying to compile LigoLw results: %s" % str(e) return HttpResponseServerError(msg) - response = HttpResponse(mimetype='application/xml') + response = HttpResponse(content_type='application/xml') response['Content-Disposition'] = 'attachment; filename=gracedb-query.xml' utils.write_fileobj(xmldoc, response) return response diff --git a/ligoauth/migrations/0001_initial.py b/ligoauth/migrations/0001_initial.py index 6b86b5cc732c619e43a1f4c76e669babc96a3b3e..3d3194b339b01fee67cf9287a7d7958382f2ab9a 100644 --- a/ligoauth/migrations/0001_initial.py +++ b/ligoauth/migrations/0001_initial.py @@ -1,107 +1,68 @@ # -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import models, migrations +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'LigoLdapUser' - db.create_table('ligoauth_ligoldapuser', ( - ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), - ('ldap_dn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), - )) - db.send_create_signal('ligoauth', ['LigoLdapUser']) +class Migration(migrations.Migration): - # Adding model 'LocalUser' - db.create_table('ligoauth_localuser', ( - ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), - )) - db.send_create_signal('ligoauth', ['LocalUser']) + dependencies = [ + ('auth', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding model 'X509Cert' - db.create_table('ligoauth_x509cert', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('subject', self.gf('django.db.models.fields.CharField')(max_length=200)), - )) - db.send_create_signal('ligoauth', ['X509Cert']) - - # Adding M2M table for field users on 'X509Cert' - db.create_table('ligoauth_x509cert_users', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('x509cert', models.ForeignKey(orm['ligoauth.x509cert'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('ligoauth_x509cert_users', ['x509cert_id', 'user_id']) - - - def backwards(self, orm): - # Deleting model 'LigoLdapUser' - db.delete_table('ligoauth_ligoldapuser') - - # Deleting model 'LocalUser' - db.delete_table('ligoauth_localuser') - - # Deleting model 'X509Cert' - db.delete_table('ligoauth_x509cert') - - # Removing M2M table for field users on 'X509Cert' - db.delete_table('ligoauth_x509cert_users') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'ligoauth.ligoldapuser': { - 'Meta': {'object_name': 'LigoLdapUser', '_ormbases': ['auth.User']}, - 'ldap_dn': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'ligoauth.localuser': { - 'Meta': {'object_name': 'LocalUser', '_ormbases': ['auth.User']}, - 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'ligoauth.x509cert': { - 'Meta': {'object_name': 'X509Cert'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}) - } - } - - complete_apps = ['ligoauth'] + operations = [ + migrations.CreateModel( + name='AlternateEmail', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=254)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='LigoLdapUser', + fields=[ + ('user_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), + ('ldap_dn', models.CharField(unique=True, max_length=100)), + ], + options={ + 'abstract': False, + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + }, + bases=('auth.user',), + ), + migrations.CreateModel( + name='LocalUser', + fields=[ + ('user_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + }, + bases=('auth.user',), + ), + migrations.CreateModel( + name='X509Cert', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('subject', models.CharField(max_length=200)), + ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='alternateemail', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + ] diff --git a/ligoauth/south_migrations/0001_initial.py b/ligoauth/south_migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..6b86b5cc732c619e43a1f4c76e669babc96a3b3e --- /dev/null +++ b/ligoauth/south_migrations/0001_initial.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'LigoLdapUser' + db.create_table('ligoauth_ligoldapuser', ( + ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), + ('ldap_dn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), + )) + db.send_create_signal('ligoauth', ['LigoLdapUser']) + + # Adding model 'LocalUser' + db.create_table('ligoauth_localuser', ( + ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), + )) + db.send_create_signal('ligoauth', ['LocalUser']) + + # Adding model 'X509Cert' + db.create_table('ligoauth_x509cert', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('subject', self.gf('django.db.models.fields.CharField')(max_length=200)), + )) + db.send_create_signal('ligoauth', ['X509Cert']) + + # Adding M2M table for field users on 'X509Cert' + db.create_table('ligoauth_x509cert_users', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('x509cert', models.ForeignKey(orm['ligoauth.x509cert'], null=False)), + ('user', models.ForeignKey(orm['auth.user'], null=False)) + )) + db.create_unique('ligoauth_x509cert_users', ['x509cert_id', 'user_id']) + + + def backwards(self, orm): + # Deleting model 'LigoLdapUser' + db.delete_table('ligoauth_ligoldapuser') + + # Deleting model 'LocalUser' + db.delete_table('ligoauth_localuser') + + # Deleting model 'X509Cert' + db.delete_table('ligoauth_x509cert') + + # Removing M2M table for field users on 'X509Cert' + db.delete_table('ligoauth_x509cert_users') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ligoauth.ligoldapuser': { + 'Meta': {'object_name': 'LigoLdapUser', '_ormbases': ['auth.User']}, + 'ldap_dn': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), + 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) + }, + 'ligoauth.localuser': { + 'Meta': {'object_name': 'LocalUser', '_ormbases': ['auth.User']}, + 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) + }, + 'ligoauth.x509cert': { + 'Meta': {'object_name': 'X509Cert'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'subject': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}) + } + } + + complete_apps = ['ligoauth'] diff --git a/ligoauth/migrations/0002_remove_old_auth_users.py b/ligoauth/south_migrations/0002_remove_old_auth_users.py similarity index 100% rename from ligoauth/migrations/0002_remove_old_auth_users.py rename to ligoauth/south_migrations/0002_remove_old_auth_users.py diff --git a/ligoauth/migrations/0003_utf8ify_user_tables.py b/ligoauth/south_migrations/0003_utf8ify_user_tables.py similarity index 100% rename from ligoauth/migrations/0003_utf8ify_user_tables.py rename to ligoauth/south_migrations/0003_utf8ify_user_tables.py diff --git a/ligoauth/migrations/0004_add_localusers.py b/ligoauth/south_migrations/0004_add_localusers.py similarity index 100% rename from ligoauth/migrations/0004_add_localusers.py rename to ligoauth/south_migrations/0004_add_localusers.py diff --git a/ligoauth/migrations/0005_add_ldapusers.py b/ligoauth/south_migrations/0005_add_ldapusers.py similarity index 100% rename from ligoauth/migrations/0005_add_ldapusers.py rename to ligoauth/south_migrations/0005_add_ldapusers.py diff --git a/ligoauth/migrations/0006_add_gcn_sender_user_and_dn.py b/ligoauth/south_migrations/0006_add_gcn_sender_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0006_add_gcn_sender_user_and_dn.py rename to ligoauth/south_migrations/0006_add_gcn_sender_user_and_dn.py diff --git a/ligoauth/migrations/0007_add_gdb_pe_user_and_dn.py b/ligoauth/south_migrations/0007_add_gdb_pe_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0007_add_gdb_pe_user_and_dn.py rename to ligoauth/south_migrations/0007_add_gdb_pe_user_and_dn.py diff --git a/ligoauth/migrations/0008_add_grbexttrig_user_and_dn.py b/ligoauth/south_migrations/0008_add_grbexttrig_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0008_add_grbexttrig_user_and_dn.py rename to ligoauth/south_migrations/0008_add_grbexttrig_user_and_dn.py diff --git a/ligoauth/migrations/0009_add_gstlal_spiir_gpu_user_and_dn.py b/ligoauth/south_migrations/0009_add_gstlal_spiir_gpu_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0009_add_gstlal_spiir_gpu_user_and_dn.py rename to ligoauth/south_migrations/0009_add_gstlal_spiir_gpu_user_and_dn.py diff --git a/ligoauth/migrations/0010_add_bayestar_mic_user_and_dn.py b/ligoauth/south_migrations/0010_add_bayestar_mic_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0010_add_bayestar_mic_user_and_dn.py rename to ligoauth/south_migrations/0010_add_bayestar_mic_user_and_dn.py diff --git a/ligoauth/migrations/0011_add_idq_users_and_dns.py b/ligoauth/south_migrations/0011_add_idq_users_and_dns.py similarity index 100% rename from ligoauth/migrations/0011_add_idq_users_and_dns.py rename to ligoauth/south_migrations/0011_add_idq_users_and_dns.py diff --git a/ligoauth/migrations/0012_auto__add_alternateemail.py b/ligoauth/south_migrations/0012_auto__add_alternateemail.py similarity index 100% rename from ligoauth/migrations/0012_auto__add_alternateemail.py rename to ligoauth/south_migrations/0012_auto__add_alternateemail.py diff --git a/ligoauth/migrations/0013_add_lib_user_and_dn.py b/ligoauth/south_migrations/0013_add_lib_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0013_add_lib_user_and_dn.py rename to ligoauth/south_migrations/0013_add_lib_user_and_dn.py diff --git a/ligoauth/migrations/0014_add_bayeswave_user_and_dn.py b/ligoauth/south_migrations/0014_add_bayeswave_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0014_add_bayeswave_user_and_dn.py rename to ligoauth/south_migrations/0014_add_bayeswave_user_and_dn.py diff --git a/ligoauth/migrations/0015_add_gstlalbbh_user_and_dn.py b/ligoauth/south_migrations/0015_add_gstlalbbh_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0015_add_gstlalbbh_user_and_dn.py rename to ligoauth/south_migrations/0015_add_gstlalbbh_user_and_dn.py diff --git a/ligoauth/migrations/0016_add_bwb_online_user_and_dn.py b/ligoauth/south_migrations/0016_add_bwb_online_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0016_add_bwb_online_user_and_dn.py rename to ligoauth/south_migrations/0016_add_bwb_online_user_and_dn.py diff --git a/ligoauth/migrations/0017_add_gstinjector_user_and_dns.py b/ligoauth/south_migrations/0017_add_gstinjector_user_and_dns.py similarity index 100% rename from ligoauth/migrations/0017_add_gstinjector_user_and_dns.py rename to ligoauth/south_migrations/0017_add_gstinjector_user_and_dns.py diff --git a/ligoauth/migrations/0018_add_cds_lho_user_and_dn.py b/ligoauth/south_migrations/0018_add_cds_lho_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0018_add_cds_lho_user_and_dn.py rename to ligoauth/south_migrations/0018_add_cds_lho_user_and_dn.py diff --git a/ligoauth/migrations/0019_add_cds_llo_user_and_dn.py b/ligoauth/south_migrations/0019_add_cds_llo_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0019_add_cds_llo_user_and_dn.py rename to ligoauth/south_migrations/0019_add_cds_llo_user_and_dn.py diff --git a/ligoauth/migrations/0020_add_gstlalcbcbbh_user_and_dn.py b/ligoauth/south_migrations/0020_add_gstlalcbcbbh_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0020_add_gstlalcbcbbh_user_and_dn.py rename to ligoauth/south_migrations/0020_add_gstlalcbcbbh_user_and_dn.py diff --git a/ligoauth/migrations/0021_add_gcncirculars_user_and_dn.py b/ligoauth/south_migrations/0021_add_gcncirculars_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0021_add_gcncirculars_user_and_dn.py rename to ligoauth/south_migrations/0021_add_gcncirculars_user_and_dn.py diff --git a/ligoauth/migrations/0022_add_skymapviewer_user_and_dn.py b/ligoauth/south_migrations/0022_add_skymapviewer_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0022_add_skymapviewer_user_and_dn.py rename to ligoauth/south_migrations/0022_add_skymapviewer_user_and_dn.py diff --git a/ligoauth/migrations/0023_add_rapidpe_user_and_dn.py b/ligoauth/south_migrations/0023_add_rapidpe_user_and_dn.py similarity index 100% rename from ligoauth/migrations/0023_add_rapidpe_user_and_dn.py rename to ligoauth/south_migrations/0023_add_rapidpe_user_and_dn.py diff --git a/ligoauth/south_migrations/__init__.py b/ligoauth/south_migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/migrations/auth/0001_initial.py b/migrations/auth/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..6fbd7fd0b4eea11d72c061926e596608ae309dad --- /dev/null +++ b/migrations/auth/0001_initial.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.utils.timezone +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='User', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True, max_length=30, verbose_name='username', validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username.', 'invalid')])), + ('first_name', models.CharField(max_length=30, verbose_name='first name', blank=True)), + ('last_name', models.CharField(max_length=30, verbose_name='last name', blank=True)), + ('email', models.EmailField(max_length=75, verbose_name='email address', blank=True)), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ], + options={ + 'abstract': False, + 'verbose_name': 'user', + 'swappable': 'AUTH_USER_MODEL', + 'verbose_name_plural': 'users', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Group', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=80, verbose_name='name')), + ], + options={ + 'verbose_name': 'group', + 'verbose_name_plural': 'groups', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Permission', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=50, verbose_name='name')), + ('codename', models.CharField(max_length=100, verbose_name='codename')), + ('content_type', models.ForeignKey(to='contenttypes.ContentType')), + ], + options={ + 'ordering': ('content_type__app_label', 'content_type__model', 'codename'), + 'verbose_name': 'permission', + 'verbose_name_plural': 'permissions', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='permission', + unique_together=set([('content_type', 'codename')]), + ), + migrations.AddField( + model_name='group', + name='permissions', + field=models.ManyToManyField(to='auth.Permission', verbose_name='permissions', blank=True), + preserve_default=True, + ), + migrations.AddField( + model_name='user', + name='groups', + field=models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of his/her group.', verbose_name='groups'), + preserve_default=True, + ), + migrations.AddField( + model_name='user', + name='user_permissions', + field=models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Permission', blank=True, help_text='Specific permissions for this user.', verbose_name='user permissions'), + preserve_default=True, + ), + ] diff --git a/migrations/guardian/0001_initial.py b/migrations/guardian/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..9eeba1b22aa77ab55e24605fadde4594b1455371 --- /dev/null +++ b/migrations/guardian/0001_initial.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('auth', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='GroupObjectPermission', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('object_pk', models.CharField(max_length=255, verbose_name='object ID')), + ('content_type', models.ForeignKey(to='contenttypes.ContentType')), + ('group', models.ForeignKey(to='auth.Group')), + ('permission', models.ForeignKey(to='auth.Permission')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='UserObjectPermission', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('object_pk', models.CharField(max_length=255, verbose_name='object ID')), + ('content_type', models.ForeignKey(to='contenttypes.ContentType')), + ('permission', models.ForeignKey(to='auth.Permission')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='userobjectpermission', + unique_together=set([('user', 'permission', 'object_pk')]), + ), + migrations.AlterUniqueTogether( + name='groupobjectpermission', + unique_together=set([('group', 'permission', 'object_pk')]), + ), + ] diff --git a/settings/default.py b/settings/default.py index 5807e1546192ec477d23313636dca2ea38f9d96a..c0dadc0b4beec0dae3a8c702da2c6c1eb2a98f32 100644 --- a/settings/default.py +++ b/settings/default.py @@ -44,6 +44,9 @@ EMBB_SMTP_SERVER = 'localhost' EMBB_MAIL_ADMINS = ['branson@gravity.phys.uwm.edu','roy.williams@ligo.org',] EMBB_IGNORE_ADDRESSES = ['Mailer-Daemon@gracedb.phys.uwm.edu',] +# Added for django 1.7.8 +TEST_RUNNER = 'django.test.runner.DiscoverRunner' + # 11/18/14. No longer checking XMPP_ALERT_CHANNELS. This is not necessary. # If someone sends out an event, an alert should go out. Listerers have the # option to unsubscribe from nodes if so desired. @@ -298,7 +301,6 @@ INSTALLED_APPS = ( 'userprofile', 'ligoauth', 'rest_framework', - 'south', 'guardian', ) @@ -322,7 +324,7 @@ STATICFILES_FINDERS = ( STATICFILES_DIRS = () # Added in order to perform data migrations on the auth app -SOUTH_MIGRATION_MODULES = { +MIGRATION_MODULES = { 'auth' : 'migrations.auth', 'guardian' : 'migrations.guardian', } diff --git a/settings/roy.py b/settings/roy.py index ee614eb327a4fc339d2cb222e27cb36606c00982..b1caedc033dc772ff8bf8e07e9f37c0bfcfe879c 100644 --- a/settings/roy.py +++ b/settings/roy.py @@ -148,7 +148,7 @@ INSTALLED_APPS = ( 'userprofile', 'ligoauth', 'rest_framework', - 'south', +# 'south', 'guardian', ) diff --git a/south_migrations/__init__.py b/south_migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/migrations/auth/0001_create_groups_for_tiered_auth.py b/south_migrations/auth/0001_create_groups_for_tiered_auth.py similarity index 100% rename from migrations/auth/0001_create_groups_for_tiered_auth.py rename to south_migrations/auth/0001_create_groups_for_tiered_auth.py diff --git a/migrations/auth/0002_populate_executives_group.py b/south_migrations/auth/0002_populate_executives_group.py similarity index 100% rename from migrations/auth/0002_populate_executives_group.py rename to south_migrations/auth/0002_populate_executives_group.py diff --git a/migrations/auth/0003_add_robots_to_internal_group.py b/south_migrations/auth/0003_add_robots_to_internal_group.py similarity index 100% rename from migrations/auth/0003_add_robots_to_internal_group.py rename to south_migrations/auth/0003_add_robots_to_internal_group.py diff --git a/migrations/auth/0004_add_event_view_permission.py b/south_migrations/auth/0004_add_event_view_permission.py similarity index 100% rename from migrations/auth/0004_add_event_view_permission.py rename to south_migrations/auth/0004_add_event_view_permission.py diff --git a/migrations/auth/0005_add_pipeline_populate_permission.py b/south_migrations/auth/0005_add_pipeline_populate_permission.py similarity index 100% rename from migrations/auth/0005_add_pipeline_populate_permission.py rename to south_migrations/auth/0005_add_pipeline_populate_permission.py diff --git a/migrations/auth/0006_add_exec_perms_on_groupobjectperms.py b/south_migrations/auth/0006_add_exec_perms_on_groupobjectperms.py similarity index 100% rename from migrations/auth/0006_add_exec_perms_on_groupobjectperms.py rename to south_migrations/auth/0006_add_exec_perms_on_groupobjectperms.py diff --git a/migrations/auth/0007_add_grbevent_t90_permission.py b/south_migrations/auth/0007_add_grbevent_t90_permission.py similarity index 100% rename from migrations/auth/0007_add_grbevent_t90_permission.py rename to south_migrations/auth/0007_add_grbevent_t90_permission.py diff --git a/migrations/auth/0008_add_siminspiral_event_view_permission.py b/south_migrations/auth/0008_add_siminspiral_event_view_permission.py similarity index 100% rename from migrations/auth/0008_add_siminspiral_event_view_permission.py rename to south_migrations/auth/0008_add_siminspiral_event_view_permission.py diff --git a/south_migrations/auth/__init__.py b/south_migrations/auth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/migrations/guardian/0001_create_perms_for_existing_events.py b/south_migrations/guardian/0001_create_perms_for_existing_events.py similarity index 100% rename from migrations/guardian/0001_create_perms_for_existing_events.py rename to south_migrations/guardian/0001_create_perms_for_existing_events.py diff --git a/migrations/guardian/0002_create_perms_for_pipelines.py b/south_migrations/guardian/0002_create_perms_for_pipelines.py similarity index 100% rename from migrations/guardian/0002_create_perms_for_pipelines.py rename to south_migrations/guardian/0002_create_perms_for_pipelines.py diff --git a/migrations/guardian/0003_add_lib_pipeline_perms.py b/south_migrations/guardian/0003_add_lib_pipeline_perms.py similarity index 100% rename from migrations/guardian/0003_add_lib_pipeline_perms.py rename to south_migrations/guardian/0003_add_lib_pipeline_perms.py diff --git a/migrations/guardian/0004_add_snews_pipeline_perms.py b/south_migrations/guardian/0004_add_snews_pipeline_perms.py similarity index 100% rename from migrations/guardian/0004_add_snews_pipeline_perms.py rename to south_migrations/guardian/0004_add_snews_pipeline_perms.py diff --git a/migrations/guardian/0005_authorize_gstinjector_hwinj.py b/south_migrations/guardian/0005_authorize_gstinjector_hwinj.py similarity index 100% rename from migrations/guardian/0005_authorize_gstinjector_hwinj.py rename to south_migrations/guardian/0005_authorize_gstinjector_hwinj.py diff --git a/migrations/guardian/0006_create_perms_for_existing_mdc_events.py b/south_migrations/guardian/0006_create_perms_for_existing_mdc_events.py similarity index 100% rename from migrations/guardian/0006_create_perms_for_existing_mdc_events.py rename to south_migrations/guardian/0006_create_perms_for_existing_mdc_events.py diff --git a/south_migrations/guardian/__init__.py b/south_migrations/guardian/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/userprofile/migrations/0001_initial.py b/userprofile/migrations/0001_initial.py index def4e474c3415fab08866f523dd2d234ea302802..7d25fc5a3e7a5d7790d48e687292defae3e732df 100644 --- a/userprofile/migrations/0001_initial.py +++ b/userprofile/migrations/0001_initial.py @@ -1,123 +1,43 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'AnalysisType' - db.create_table('userprofile_analysistype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('code', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), - ('display', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), - )) - db.send_create_signal('userprofile', ['AnalysisType']) - - # Adding model 'Contact' - db.create_table('userprofile_contact', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('desc', self.gf('django.db.models.fields.CharField')(max_length=20)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)), - )) - db.send_create_signal('userprofile', ['Contact']) - - # Adding model 'Trigger' - db.create_table('userprofile_trigger', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), - ('triggerType', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('farThresh', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - )) - db.send_create_signal('userprofile', ['Trigger']) - - # Adding M2M table for field labels on 'Trigger' - db.create_table('userprofile_trigger_labels', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), - ('label', models.ForeignKey(orm['gracedb.label'], null=False)) - )) - db.create_unique('userprofile_trigger_labels', ['trigger_id', 'label_id']) - - # Adding M2M table for field atypes on 'Trigger' - db.create_table('userprofile_trigger_atypes', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), - ('analysistype', models.ForeignKey(orm['userprofile.analysistype'], null=False)) - )) - db.create_unique('userprofile_trigger_atypes', ['trigger_id', 'analysistype_id']) - - # Adding M2M table for field contacts on 'Trigger' - db.create_table('userprofile_trigger_contacts', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), - ('contact', models.ForeignKey(orm['userprofile.contact'], null=False)) - )) - db.create_unique('userprofile_trigger_contacts', ['trigger_id', 'contact_id']) - - - def backwards(self, orm): - # Deleting model 'AnalysisType' - db.delete_table('userprofile_analysistype') - - # Deleting model 'Contact' - db.delete_table('userprofile_contact') - - # Deleting model 'Trigger' - db.delete_table('userprofile_trigger') - - # Removing M2M table for field labels on 'Trigger' - db.delete_table('userprofile_trigger_labels') - - # Removing M2M table for field atypes on 'Trigger' - db.delete_table('userprofile_trigger_atypes') - - # Removing M2M table for field contacts on 'Trigger' - db.delete_table('userprofile_trigger_contacts') - - - models = { - 'gracedb.label': { - 'Meta': {'object_name': 'Label'}, - 'defaultColor': ('django.db.models.fields.CharField', [], {'default': "'black'", 'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) - }, - 'gracedb.user': { - 'Meta': {'ordering': "['name']", 'object_name': 'User'}, - 'dn': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'principal': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'unixid': ('django.db.models.fields.CharField', [], {'max_length': '25'}) - }, - 'userprofile.analysistype': { - 'Meta': {'object_name': 'AnalysisType'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'display': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'userprofile.contact': { - 'Meta': {'object_name': 'Contact'}, - 'desc': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) - }, - 'userprofile.trigger': { - 'Meta': {'object_name': 'Trigger'}, - 'atypes': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofile.AnalysisType']", 'symmetrical': 'False', 'blank': 'True'}), - 'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofile.Contact']", 'symmetrical': 'False', 'blank': 'True'}), - 'farThresh': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.Label']", 'symmetrical': 'False', 'blank': 'True'}), - 'triggerType': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) - } - } - - complete_apps = ['userprofile'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('gracedb', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Contact', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('desc', models.CharField(max_length=20)), + ('email', models.EmailField(max_length=75)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Trigger', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('triggerType', models.CharField(blank=True, max_length=20, choices=[(b'create', b'create'), (b'change', b'change'), (b'label', b'label')])), + ('farThresh', models.FloatField(null=True, blank=True)), + ('contacts', models.ManyToManyField(to='userprofile.Contact', blank=True)), + ('labels', models.ManyToManyField(to='gracedb.Label', blank=True)), + ('pipelines', models.ManyToManyField(to='gracedb.Pipeline', blank=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/userprofile/south_migrations/0001_initial.py b/userprofile/south_migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..def4e474c3415fab08866f523dd2d234ea302802 --- /dev/null +++ b/userprofile/south_migrations/0001_initial.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'AnalysisType' + db.create_table('userprofile_analysistype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('code', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), + ('display', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), + )) + db.send_create_signal('userprofile', ['AnalysisType']) + + # Adding model 'Contact' + db.create_table('userprofile_contact', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('desc', self.gf('django.db.models.fields.CharField')(max_length=20)), + ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)), + )) + db.send_create_signal('userprofile', ['Contact']) + + # Adding model 'Trigger' + db.create_table('userprofile_trigger', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gracedb.User'])), + ('triggerType', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), + ('farThresh', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + )) + db.send_create_signal('userprofile', ['Trigger']) + + # Adding M2M table for field labels on 'Trigger' + db.create_table('userprofile_trigger_labels', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), + ('label', models.ForeignKey(orm['gracedb.label'], null=False)) + )) + db.create_unique('userprofile_trigger_labels', ['trigger_id', 'label_id']) + + # Adding M2M table for field atypes on 'Trigger' + db.create_table('userprofile_trigger_atypes', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), + ('analysistype', models.ForeignKey(orm['userprofile.analysistype'], null=False)) + )) + db.create_unique('userprofile_trigger_atypes', ['trigger_id', 'analysistype_id']) + + # Adding M2M table for field contacts on 'Trigger' + db.create_table('userprofile_trigger_contacts', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('trigger', models.ForeignKey(orm['userprofile.trigger'], null=False)), + ('contact', models.ForeignKey(orm['userprofile.contact'], null=False)) + )) + db.create_unique('userprofile_trigger_contacts', ['trigger_id', 'contact_id']) + + + def backwards(self, orm): + # Deleting model 'AnalysisType' + db.delete_table('userprofile_analysistype') + + # Deleting model 'Contact' + db.delete_table('userprofile_contact') + + # Deleting model 'Trigger' + db.delete_table('userprofile_trigger') + + # Removing M2M table for field labels on 'Trigger' + db.delete_table('userprofile_trigger_labels') + + # Removing M2M table for field atypes on 'Trigger' + db.delete_table('userprofile_trigger_atypes') + + # Removing M2M table for field contacts on 'Trigger' + db.delete_table('userprofile_trigger_contacts') + + + models = { + 'gracedb.label': { + 'Meta': {'object_name': 'Label'}, + 'defaultColor': ('django.db.models.fields.CharField', [], {'default': "'black'", 'max_length': '20'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) + }, + 'gracedb.user': { + 'Meta': {'ordering': "['name']", 'object_name': 'User'}, + 'dn': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'principal': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'unixid': ('django.db.models.fields.CharField', [], {'max_length': '25'}) + }, + 'userprofile.analysistype': { + 'Meta': {'object_name': 'AnalysisType'}, + 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), + 'display': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'userprofile.contact': { + 'Meta': {'object_name': 'Contact'}, + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) + }, + 'userprofile.trigger': { + 'Meta': {'object_name': 'Trigger'}, + 'atypes': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofile.AnalysisType']", 'symmetrical': 'False', 'blank': 'True'}), + 'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofile.Contact']", 'symmetrical': 'False', 'blank': 'True'}), + 'farThresh': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['gracedb.Label']", 'symmetrical': 'False', 'blank': 'True'}), + 'triggerType': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['gracedb.User']"}) + } + } + + complete_apps = ['userprofile'] \ No newline at end of file diff --git a/userprofile/migrations/0002_stage1_rm_ligouser__add_new_foreign_key.py b/userprofile/south_migrations/0002_stage1_rm_ligouser__add_new_foreign_key.py similarity index 100% rename from userprofile/migrations/0002_stage1_rm_ligouser__add_new_foreign_key.py rename to userprofile/south_migrations/0002_stage1_rm_ligouser__add_new_foreign_key.py diff --git a/userprofile/migrations/0003_stage2_rm_ligouser__populate_new_foreign_key.py b/userprofile/south_migrations/0003_stage2_rm_ligouser__populate_new_foreign_key.py similarity index 100% rename from userprofile/migrations/0003_stage2_rm_ligouser__populate_new_foreign_key.py rename to userprofile/south_migrations/0003_stage2_rm_ligouser__populate_new_foreign_key.py diff --git a/userprofile/migrations/0004_stage3_rm_ligouser__remove_old_foreign_keys.py b/userprofile/south_migrations/0004_stage3_rm_ligouser__remove_old_foreign_keys.py similarity index 100% rename from userprofile/migrations/0004_stage3_rm_ligouser__remove_old_foreign_keys.py rename to userprofile/south_migrations/0004_stage3_rm_ligouser__remove_old_foreign_keys.py diff --git a/userprofile/migrations/0005_auto__chg_field_trigger_user__chg_field_contact_user.py b/userprofile/south_migrations/0005_auto__chg_field_trigger_user__chg_field_contact_user.py similarity index 100% rename from userprofile/migrations/0005_auto__chg_field_trigger_user__chg_field_contact_user.py rename to userprofile/south_migrations/0005_auto__chg_field_trigger_user__chg_field_contact_user.py diff --git a/userprofile/migrations/0006_auto__add_m2m_pipelines.py b/userprofile/south_migrations/0006_auto__add_m2m_pipelines.py similarity index 100% rename from userprofile/migrations/0006_auto__add_m2m_pipelines.py rename to userprofile/south_migrations/0006_auto__add_m2m_pipelines.py diff --git a/userprofile/migrations/0007_populate_pipelines_on_triggers.py b/userprofile/south_migrations/0007_populate_pipelines_on_triggers.py similarity index 100% rename from userprofile/migrations/0007_populate_pipelines_on_triggers.py rename to userprofile/south_migrations/0007_populate_pipelines_on_triggers.py diff --git a/userprofile/migrations/0008_auto__del_analysistype.py b/userprofile/south_migrations/0008_auto__del_analysistype.py similarity index 100% rename from userprofile/migrations/0008_auto__del_analysistype.py rename to userprofile/south_migrations/0008_auto__del_analysistype.py diff --git a/userprofile/south_migrations/__init__.py b/userprofile/south_migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/wsgi/branson.wsgi b/wsgi/branson.wsgi index 78b5af6d65cbd33d93ffdf27abfef912fbd39c78..b75cdd63a3522fc8e0f6182ff3ff16e1aaaae49e 100644 --- a/wsgi/branson.wsgi +++ b/wsgi/branson.wsgi @@ -12,6 +12,9 @@ execfile(VIRTUALENV_ACTIVATOR, dict(__file__=VIRTUALENV_ACTIVATOR)) os.environ['MPLCONFIGDIR']='/home/branson/logs/' -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() +#import django.core.handlers.wsgi +#application = django.core.handlers.wsgi.WSGIHandler() + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() diff --git a/wsgi/django.wsgi b/wsgi/django.wsgi index 9a3ff680369016c7e0adbab80f4a7d57b2835d63..a61b36879f04ba017400743b72fcb38e43f79169 100644 --- a/wsgi/django.wsgi +++ b/wsgi/django.wsgi @@ -12,6 +12,10 @@ execfile(VIRTUALENV_ACTIVATOR, dict(__file__=VIRTUALENV_ACTIVATOR)) os.environ['MPLCONFIGDIR']='/tmp/' -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() +# Changed for compatibility with django 1.7.8 +#import django.core.handlers.wsgi +#application = django.core.handlers.wsgi.WSGIHandler() + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() diff --git a/wsgi/fzhang.wsgi b/wsgi/fzhang.wsgi deleted file mode 100644 index a5214a847537c6631ad27d066b3b8a897acd5458..0000000000000000000000000000000000000000 --- a/wsgi/fzhang.wsgi +++ /dev/null @@ -1,25 +0,0 @@ -import os -import sys - -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' - -# Sandbox libs here, if required. -# -#Path to the gracedb source code -sys.path.insert(1,'/home/fzhang/gracedb/gracedb') -sys.path.insert(1,'/home/fzhang/djangoenv/lib/python2.7/site-packages') - -# Scott's Shib app uses loggers. -import logging -logging.basicConfig() - -os.environ['MPLCONFIGDIR']='/home/fzhang/gracedb' - -#logging.basicConfig(level=logging.DEBUG, -# format='%(asctime)s %(levelname)s %(message)s', -# filename='/tmp/myapp.log', -# filemode='w') - -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() - diff --git a/wsgi/roy.wsgi b/wsgi/roy.wsgi index 2045144297bf34233861c29fc422f298feded7dd..17631d4b7dec8fb24531cc9481d98af1f5209383 100644 --- a/wsgi/roy.wsgi +++ b/wsgi/roy.wsgi @@ -26,6 +26,10 @@ os.environ['MPLCONFIGDIR']='/tmp/' # filename='/tmp/myapp.log', # filemode='w') -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() +# Changed for compatibility with Django 1.7.8 +#import django.core.handlers.wsgi +#application = django.core.handlers.wsgi.WSGIHandler() + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application()