diff options
author | Frederick Muriuki Muriithi | 2023-02-21 16:21:23 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-02-21 16:24:30 +0300 |
commit | a5f83724d3075680e6d200086e3400ac938cc525 (patch) | |
tree | 4bc983fef56554708b333dcbbafe78ea7a6dcd1e /migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py | |
parent | 08e8e36e256d1893967c98b366395279b39c1e72 (diff) | |
download | genenetwork3-a5f83724d3075680e6d200086e3400ac938cc525.tar.gz |
auth: resources: Attach resource data and list unlinked data.
Load the data that is attached to a particular resource together with the
resource.
List any unlinked data: useful when linking data to resources.
Diffstat (limited to 'migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py')
-rw-r--r-- | migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py b/migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py index b54942c..890eeef 100644 --- a/migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py +++ b/migrations/auth/20230216_01_dgWjv-create-linked-group-data-table.py @@ -11,13 +11,15 @@ steps = [ """ CREATE TABLE IF NOT EXISTS linked_group_data( group_id TEXT NOT NULL, + dataset_type TEXT NOT NULL, dataset_or_trait_id TEXT NOT NULL, - name TEXT NOT NULL, - type TEXT NOT NULL, - PRIMARY KEY(group_id, dataset_or_trait_id), + dataset_name TEXT NOT NULL, + dataset_fullname TEXT NOT NULL, + accession_id TEXT DEFAULT NULL, + PRIMARY KEY(group_id, dataset_type, dataset_or_trait_id), FOREIGN KEY (group_id) REFERENCES groups(group_id) ON UPDATE CASCADE ON DELETE RESTRICT, - CHECK (type IN ('mRNA', 'Genotype', 'Phenotype')) + CHECK (dataset_type IN ('mRNA', 'Genotype', 'Phenotype')) ) WITHOUT ROWID """, "DROP TABLE IF EXISTS linked_group_data") |