-
Notifications
You must be signed in to change notification settings - Fork 19
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 #276 from biocore/daklapack_orders
Daklapack orders, step 1
- Loading branch information
Showing
8 changed files
with
608 additions
and
0 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 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 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 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 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,24 @@ | ||
-- create tables to record daklapack orders | ||
|
||
CREATE TABLE barcodes.daklapack_order | ||
( | ||
dak_order_id uuid DEFAULT uuid_generate_v4() NOT NULL, | ||
submitter_acct_id uuid NOT NULL, | ||
description varchar, | ||
fulfillment_hold_msg varchar, | ||
order_json JSONB NOT NULL, | ||
creation_timestamp timestamptz, | ||
last_polling_timestamp timestamptz, | ||
last_polling_status varchar, | ||
CONSTRAINT dak_order_pkey PRIMARY KEY (dak_order_id), | ||
CONSTRAINT fk_acct_id FOREIGN KEY ( submitter_acct_id ) REFERENCES ag.account( id ) | ||
); | ||
|
||
CREATE TABLE barcodes.daklapack_order_to_project | ||
( | ||
dak_order_id uuid NOT NULL, | ||
project_id bigint NOT NULL, | ||
CONSTRAINT dak_order_to_project_pkey PRIMARY KEY ( dak_order_id, project_id ), | ||
CONSTRAINT fk_dak_order_id FOREIGN KEY ( dak_order_id ) REFERENCES barcodes.daklapack_order( dak_order_id ), | ||
CONSTRAINT fk_project_id FOREIGN KEY ( project_id ) REFERENCES barcodes.project( project_id ) | ||
); |
Oops, something went wrong.