From: Diane Trout Date: Thu, 13 Feb 2014 00:22:57 +0000 (-0800) Subject: Postgresql needed the default FlowCellModel to be created before adding the column X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=c16c2f16a416f55af1b1c49b1472240b589b767e Postgresql needed the default FlowCellModel to be created before adding the column --- diff --git a/htsworkflow/frontend/experiments/migrations/0002_auto__add_flowcelltype.py b/htsworkflow/frontend/experiments/migrations/0002_auto__add_flowcelltype.py index de29943..3496f27 100644 --- a/htsworkflow/frontend/experiments/migrations/0002_auto__add_flowcelltype.py +++ b/htsworkflow/frontend/experiments/migrations/0002_auto__add_flowcelltype.py @@ -18,6 +18,14 @@ class Migration(SchemaMigration): )) db.send_create_signal(u'experiments', ['FlowCellModel']) + default = orm.FlowCellModel.objects.create() + default.id = 1 + default.name = 'classic' + default.fixed_time = 800 + default.per_cycle_time = 800 + default.isdefault = True + default.save() + # Adding field 'FlowCell.flowcell_model' db.add_column(u'experiments_flowcell', 'flowcell_model', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['experiments.FlowCellModel']),