1
|
|
|
# Generated by Django 2.2.9 on 2020-01-27 15:15 |
2
|
|
|
|
3
|
|
|
import django.contrib.postgres.fields.jsonb |
4
|
|
|
from django.db import migrations, models |
5
|
|
|
import django.db.models.deletion |
6
|
|
|
|
7
|
|
|
|
8
|
|
|
class Migration(migrations.Migration): |
9
|
|
|
|
10
|
|
|
dependencies = [ |
11
|
|
|
('biosample', '0003_orphansample'), |
12
|
|
|
] |
13
|
|
|
|
14
|
|
|
operations = [ |
15
|
|
|
migrations.CreateModel( |
16
|
|
|
name='OrphanSubmission', |
17
|
|
|
fields=[ |
18
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
19
|
|
|
('usi_submission_name', models.CharField(blank=True, db_index=True, help_text='USI submission name', max_length=255, null=True, unique=True)), |
20
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)), |
21
|
|
|
('updated_at', models.DateTimeField(auto_now=True)), |
22
|
|
|
('message', models.TextField(blank=True, null=True)), |
23
|
|
|
('status', models.SmallIntegerField(choices=[(0, 'Waiting'), (1, 'Loaded'), (2, 'Submitted'), (3, 'Error'), (4, 'Need Revision'), (5, 'Ready'), (6, 'Completed')], default=0, help_text='example: Waiting')), |
24
|
|
|
('samples_count', models.PositiveIntegerField(default=0)), |
25
|
|
|
('samples_status', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), |
26
|
|
|
], |
27
|
|
|
options={ |
28
|
|
|
'abstract': False, |
29
|
|
|
}, |
30
|
|
|
), |
31
|
|
|
migrations.AddField( |
32
|
|
|
model_name='orphansample', |
33
|
|
|
name='team', |
34
|
|
|
field=models.ForeignKey(default=1, help_text='Your AAP Team', on_delete=django.db.models.deletion.CASCADE, to='biosample.ManagedTeam'), |
35
|
|
|
preserve_default=False, |
36
|
|
|
), |
37
|
|
|
migrations.AddField( |
38
|
|
|
model_name='orphansample', |
39
|
|
|
name='submission', |
40
|
|
|
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='submission_data', to='biosample.OrphanSubmission'), |
41
|
|
|
), |
42
|
|
|
] |
43
|
|
|
|