-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from c3g/regenerate-migrations
Delete all migrations and regenerate new migrations
- Loading branch information
Showing
67 changed files
with
628 additions
and
3,374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Generated by Django 2.2.13 on 2020-07-06 14:55 | ||
|
||
import chord_metadata_service.chord.models | ||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('resources', '0001_v1_0_0'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Dataset', | ||
fields=[ | ||
('identifier', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('title', models.CharField(max_length=200, unique=True)), | ||
('description', models.TextField(blank=True)), | ||
('contact_info', models.TextField(blank=True)), | ||
('data_use', django.contrib.postgres.fields.jsonb.JSONField()), | ||
('linked_field_sets', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='Data type fields which are linked together.')), | ||
('alternate_identifiers', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='Alternate identifiers for the dataset.')), | ||
('related_identifiers', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='Related identifiers for the dataset.')), | ||
('dates', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.')), | ||
('stored_in', django.contrib.postgres.fields.jsonb.JSONField(blank=True, help_text='The data repository hosting the dataset.', null=True)), | ||
('spatial_coverage', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The geographical extension and span covered by the dataset and its measured dimensions/variables.')), | ||
('types', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.')), | ||
('availability', models.CharField(blank=True, help_text='A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).', max_length=200)), | ||
('refinement', models.CharField(blank=True, help_text='A qualifier to describe the level of data processing of the dataset and its distributions.', max_length=200)), | ||
('aggregation', models.CharField(blank=True, help_text="A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", max_length=200)), | ||
('privacy', models.CharField(blank=True, help_text='A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.', max_length=200)), | ||
('distributions', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The distribution(s) by which datasets are made available (for example: mySQL dump).')), | ||
('dimensions', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The different dimensions (granular components) making up a dataset.')), | ||
('primary_publications', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The primary publication(s) associated with the dataset, usually describing how the dataset was produced.')), | ||
('citations', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The publication(s) that cite this dataset.')), | ||
('citation_count', models.IntegerField(blank=True, help_text='The number of publications that cite this dataset (enumerated in the citations property).', null=True)), | ||
('produced_by', django.contrib.postgres.fields.jsonb.JSONField(blank=True, help_text='A study process which generated a given dataset, if any.', null=True)), | ||
('creators', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The person(s) or organization(s) which contributed to the creation of the dataset.')), | ||
('licenses', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The terms of use of the dataset.')), | ||
('acknowledges', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='The grant(s) which funded and supported the work reported by the dataset.')), | ||
('keywords', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list, help_text='Tags associated with the dataset, which will help in its discovery.')), | ||
('version', models.CharField(blank=True, default=chord_metadata_service.chord.models.version_default, help_text='A release point for the dataset when applicable.', max_length=200)), | ||
('extra_properties', django.contrib.postgres.fields.jsonb.JSONField(blank=True, help_text='Extra properties that do not fit in the previous specified attributes.', null=True)), | ||
('created', models.DateTimeField(auto_now_add=True)), | ||
('updated', models.DateTimeField(auto_now=True)), | ||
('additional_resources', models.ManyToManyField(blank=True, help_text="Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", to='resources.Resource')), | ||
('has_part', models.ManyToManyField(blank=True, help_text="A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", related_name='_dataset_has_part_+', to='chord.Dataset')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Project', | ||
fields=[ | ||
('identifier', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('title', models.CharField(max_length=200, unique=True)), | ||
('description', models.TextField(blank=True)), | ||
('created', models.DateTimeField(auto_now_add=True)), | ||
('updated', models.DateTimeField(auto_now=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='TableOwnership', | ||
fields=[ | ||
('table_id', models.CharField(max_length=200, primary_key=True, serialize=False)), | ||
('service_id', models.CharField(max_length=200)), | ||
('service_artifact', models.CharField(default='', max_length=200)), | ||
('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='table_ownership', to='chord.Dataset')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Table', | ||
fields=[ | ||
('ownership_record', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='chord.TableOwnership')), | ||
('name', models.CharField(max_length=200, unique=True)), | ||
('data_type', models.CharField(choices=[('experiment', 'experiment'), ('phenopacket', 'phenopacket')], max_length=30)), | ||
('created', models.DateTimeField(auto_now_add=True)), | ||
('updated', models.DateTimeField(auto_now=True)), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='dataset', | ||
name='project', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='datasets', to='chord.Project'), | ||
), | ||
] |
32 changes: 0 additions & 32 deletions
32
chord_metadata_service/chord/migrations/0002_auto_20191210_2104.py
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
chord_metadata_service/chord/migrations/0003_dataset_field_links.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
chord_metadata_service/chord/migrations/0004_auto_20200123_2126.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
chord_metadata_service/chord/migrations/0005_auto_20200123_2144.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
chord_metadata_service/chord/migrations/0006_dataset_contact_info.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.