Postgresql needed the default FlowCellModel to be created before adding the column
authorDiane Trout <diane@ghic.org>
Thu, 13 Feb 2014 00:22:57 +0000 (16:22 -0800)
committerDiane Trout <diane@ghic.org>
Tue, 10 Jun 2014 23:40:48 +0000 (16:40 -0700)
htsworkflow/frontend/experiments/migrations/0002_auto__add_flowcelltype.py

index de299437a05d3637171b855fd84d9731f08935a3..3496f276bfcdb833e745a6cb47f46291d7c17d23 100644 (file)
@@ -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']),