Commit 1bcd46a67c2ed30e9cffc5563166ccbe243c025e
1 parent
16370ff8
Exists in
master
and in
1 other branch
migration
Showing
1 changed file
with
47 additions
and
15 deletions
Show diff stats
src/pyrosapp/migrations/0001_initial.py
1 | 1 | # -*- coding: utf-8 -*- |
2 | -# Generated by Django 1.9.4 on 2016-06-03 11:31 | |
2 | +# Generated by Django 1.9.4 on 2016-07-07 14:43 | |
3 | 3 | from __future__ import unicode_literals |
4 | 4 | |
5 | 5 | from django.conf import settings |
... | ... | @@ -24,6 +24,7 @@ class Migration(migrations.Migration): |
24 | 24 | ('desc', models.TextField(blank=True, null=True)), |
25 | 25 | ('created', models.DateTimeField(auto_now_add=True, null=True)), |
26 | 26 | ('updated', models.DateTimeField(auto_now=True, null=True)), |
27 | + ('complete', models.BooleanField(default=False)), | |
27 | 28 | ], |
28 | 29 | options={ |
29 | 30 | 'db_table': 'album', |
... | ... | @@ -118,7 +119,6 @@ class Migration(migrations.Migration): |
118 | 119 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
119 | 120 | ('category', models.CharField(blank=True, max_length=1, null=True)), |
120 | 121 | ('transmission_curve_doc', models.CharField(blank=True, max_length=45, null=True)), |
121 | - ('detector', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='filters', to='pyrosapp.Detector')), | |
122 | 122 | ('device', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='pyrosapp.Device')), |
123 | 123 | ], |
124 | 124 | options={ |
... | ... | @@ -127,6 +127,18 @@ class Migration(migrations.Migration): |
127 | 127 | }, |
128 | 128 | ), |
129 | 129 | migrations.CreateModel( |
130 | + name='FilterWheel', | |
131 | + fields=[ | |
132 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
133 | + ('detector', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='filter_wheel', to='pyrosapp.Detector')), | |
134 | + ('device', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='pyrosapp.Device')), | |
135 | + ], | |
136 | + options={ | |
137 | + 'db_table': 'filter_wheel', | |
138 | + 'managed': True, | |
139 | + }, | |
140 | + ), | |
141 | + migrations.CreateModel( | |
130 | 142 | name='Image', |
131 | 143 | fields=[ |
132 | 144 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
... | ... | @@ -194,13 +206,14 @@ class Migration(migrations.Migration): |
194 | 206 | ('desc', models.CharField(blank=True, max_length=45, null=True)), |
195 | 207 | ('created', models.DateTimeField(auto_now_add=True, null=True)), |
196 | 208 | ('updated', models.DateTimeField(auto_now=True, null=True)), |
197 | - ('duration', models.FloatField(blank=True, null=True)), | |
209 | + ('duration', models.FloatField(blank=True, default=0, null=True)), | |
198 | 210 | ('position', models.CharField(blank=True, max_length=45, null=True)), |
199 | 211 | ('exposure_time', models.FloatField(blank=True, null=True)), |
200 | 212 | ('nb_images', models.IntegerField(blank=True, null=True)), |
201 | 213 | ('dithering', models.BooleanField(default=False)), |
214 | + ('complete', models.BooleanField(default=False)), | |
202 | 215 | ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='plans', to='pyrosapp.Album')), |
203 | - ('filter', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='plans', to='pyrosapp.Filter')), | |
216 | + ('filter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='plans', to='pyrosapp.Filter')), | |
204 | 217 | ], |
205 | 218 | options={ |
206 | 219 | 'db_table': 'plan', |
... | ... | @@ -230,7 +243,7 @@ class Migration(migrations.Migration): |
230 | 243 | ('dir_level', models.IntegerField(blank=True, null=True)), |
231 | 244 | ('can_del_void_req', models.BooleanField(default=False)), |
232 | 245 | ('country', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='pyros_users', to='pyrosapp.Country')), |
233 | - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | |
246 | + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='pyros_user', to=settings.AUTH_USER_MODEL)), | |
234 | 247 | ], |
235 | 248 | options={ |
236 | 249 | 'db_table': 'pyros_user', |
... | ... | @@ -246,13 +259,13 @@ class Migration(migrations.Migration): |
246 | 259 | ('created', models.DateTimeField(auto_now_add=True, null=True)), |
247 | 260 | ('updated', models.DateTimeField(auto_now=True, null=True)), |
248 | 261 | ('is_alert', models.BooleanField(default=False)), |
249 | - ('type', models.CharField(blank=True, max_length=8, null=True)), | |
262 | + ('target_type', models.CharField(blank=True, max_length=8, null=True)), | |
250 | 263 | ('status', models.CharField(blank=True, max_length=10, null=True)), |
251 | - ('target_or_theme', models.CharField(blank=True, max_length=45, null=True)), | |
252 | - ('priority', models.IntegerField(blank=True, null=True)), | |
253 | 264 | ('autodeposit', models.BooleanField(default=False)), |
254 | 265 | ('checkpoint', models.CharField(blank=True, max_length=45, null=True)), |
255 | 266 | ('flag', models.CharField(blank=True, max_length=45, null=True)), |
267 | + ('complete', models.BooleanField(default=False)), | |
268 | + ('submitted', models.BooleanField(default=False)), | |
256 | 269 | ('pyros_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='requests', to='pyrosapp.PyrosUser')), |
257 | 270 | ], |
258 | 271 | options={ |
... | ... | @@ -280,13 +293,13 @@ class Migration(migrations.Migration): |
280 | 293 | name='ScheduleHasSequences', |
281 | 294 | fields=[ |
282 | 295 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
283 | - ('status', models.CharField(blank=True, choices=[('TBP', 'To be planned'), ('OBS', 'Observable'), ('UNPLN', 'Unplannable'), ('PNDG', 'Pending'), ('EXD', 'Executed'), ('EXING', 'Executing'), ('RJTD', 'Rejected'), ('CNCLD', 'Cancelled'), ('INVL', 'Invalid')], max_length=11, null=True)), | |
296 | + ('status', models.CharField(blank=True, choices=[('INCPL', 'Incomplete'), ('CPL', 'Complete'), ('TBP', 'To be planned'), ('OBS', 'Observable'), ('UNPLN', 'Unplannable'), ('PNDG', 'Pending'), ('EXD', 'Executed'), ('EXING', 'Executing'), ('RJTD', 'Rejected'), ('CNCLD', 'Cancelled'), ('INVL', 'Invalid')], max_length=11, null=True)), | |
284 | 297 | ('desc', models.CharField(blank=True, max_length=45, null=True)), |
285 | 298 | ('tsp', models.DecimalField(decimal_places=8, default=-1.0, max_digits=15)), |
286 | 299 | ('tep', models.DecimalField(decimal_places=8, default=-1.0, max_digits=15)), |
287 | 300 | ('deltaTL', models.DecimalField(decimal_places=8, default=-1.0, max_digits=15)), |
288 | 301 | ('deltaTR', models.DecimalField(decimal_places=8, default=-1.0, max_digits=15)), |
289 | - ('schedule', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='shs', to='pyrosapp.Schedule')), | |
302 | + ('schedule', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shs', to='pyrosapp.Schedule')), | |
290 | 303 | ], |
291 | 304 | options={ |
292 | 305 | 'db_table': 'schedule_has_sequences', |
... | ... | @@ -317,8 +330,8 @@ class Migration(migrations.Migration): |
317 | 330 | ('created', models.DateTimeField(auto_now_add=True, null=True)), |
318 | 331 | ('updated', models.DateTimeField(auto_now=True, null=True)), |
319 | 332 | ('is_alert', models.BooleanField(default=False)), |
320 | - ('status', models.CharField(blank=True, choices=[('TBP', 'To be planned'), ('OBS', 'Observable'), ('UNPLN', 'Unplannable'), ('PNDG', 'Pending'), ('EXD', 'Executed'), ('EXING', 'Executing'), ('RJTD', 'Rejected'), ('CNCLD', 'Cancelled'), ('INVL', 'Invalid')], max_length=11, null=True)), | |
321 | - ('pointing', models.CharField(blank=True, max_length=45, null=True)), | |
333 | + ('status', models.CharField(blank=True, choices=[('INCPL', 'Incomplete'), ('CPL', 'Complete'), ('TBP', 'To be planned'), ('OBS', 'Observable'), ('UNPLN', 'Unplannable'), ('PNDG', 'Pending'), ('EXD', 'Executed'), ('EXING', 'Executing'), ('RJTD', 'Rejected'), ('CNCLD', 'Cancelled'), ('INVL', 'Invalid')], max_length=11, null=True)), | |
334 | + ('target_coords', models.CharField(blank=True, max_length=100, null=True)), | |
322 | 335 | ('with_drift', models.BooleanField(default=False)), |
323 | 336 | ('priority', models.IntegerField(blank=True, null=True)), |
324 | 337 | ('analysis_method', models.CharField(blank=True, max_length=45, null=True)), |
... | ... | @@ -443,6 +456,20 @@ class Migration(migrations.Migration): |
443 | 456 | }, |
444 | 457 | ), |
445 | 458 | migrations.CreateModel( |
459 | + name='Version', | |
460 | + fields=[ | |
461 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
462 | + ('module_name', models.CharField(blank=True, max_length=45, null=True)), | |
463 | + ('version', models.CharField(blank=True, max_length=15, null=True)), | |
464 | + ('created', models.DateTimeField(auto_now_add=True, null=True)), | |
465 | + ('updated', models.DateTimeField(auto_now=True, null=True)), | |
466 | + ], | |
467 | + options={ | |
468 | + 'db_table': 'version', | |
469 | + 'managed': True, | |
470 | + }, | |
471 | + ), | |
472 | + migrations.CreateModel( | |
446 | 473 | name='WeatherWatch', |
447 | 474 | fields=[ |
448 | 475 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
... | ... | @@ -487,7 +514,7 @@ class Migration(migrations.Migration): |
487 | 514 | migrations.AddField( |
488 | 515 | model_name='schedulehassequences', |
489 | 516 | name='sequence', |
490 | - field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='shs', to='pyrosapp.Sequence'), | |
517 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shs', to='pyrosapp.Sequence'), | |
491 | 518 | ), |
492 | 519 | migrations.AddField( |
493 | 520 | model_name='schedule', |
... | ... | @@ -497,7 +524,7 @@ class Migration(migrations.Migration): |
497 | 524 | migrations.AddField( |
498 | 525 | model_name='request', |
499 | 526 | name='scientific_program', |
500 | - field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='requests', to='pyrosapp.ScientificProgram'), | |
527 | + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='requests', to='pyrosapp.ScientificProgram'), | |
501 | 528 | ), |
502 | 529 | migrations.AddField( |
503 | 530 | model_name='pyrosuser', |
... | ... | @@ -515,6 +542,11 @@ class Migration(migrations.Migration): |
515 | 542 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='pyrosapp.Plan'), |
516 | 543 | ), |
517 | 544 | migrations.AddField( |
545 | + model_name='filter', | |
546 | + name='filter_wheel', | |
547 | + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='filters', to='pyrosapp.FilterWheel'), | |
548 | + ), | |
549 | + migrations.AddField( | |
518 | 550 | model_name='detector', |
519 | 551 | name='device', |
520 | 552 | field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='pyrosapp.Device'), |
... | ... | @@ -537,7 +569,7 @@ class Migration(migrations.Migration): |
537 | 569 | migrations.AddField( |
538 | 570 | model_name='album', |
539 | 571 | name='detector', |
540 | - field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='albums', to='pyrosapp.Detector'), | |
572 | + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='albums', to='pyrosapp.Detector'), | |
541 | 573 | ), |
542 | 574 | migrations.AddField( |
543 | 575 | model_name='album', | ... | ... |