Skip to content

Instantly share code, notes, and snippets.

@s1monj
Created February 14, 2022 04:29
Show Gist options
  • Save s1monj/05e374c6865a4095e314a6fc07257721 to your computer and use it in GitHub Desktop.
Save s1monj/05e374c6865a4095e314a6fc07257721 to your computer and use it in GitHub Desktop.
CREATE USER hasurauser WITH PASSWORD 'hasurapwd';
-- for demo purposes, see below for production:
-- https://hasura.io/docs/latest/graphql/core/deployment/postgres-requirements.html
ALTER USER hasurauser WITH SUPERUSER;
CREATE DATABASE pipelinedemo WITH OWNER hasurauser;
\c pipelinedemo
CREATE TABLE samples (
id INT PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE runs (
id INT PRIMARY KEY,
started_at TIMESTAMP NOT NULL
);
CREATE TABLE sample_runs (
sample_id INT REFERENCES samples(id),
run_id INT REFERENCES runs(id),
qc_score INT,
duplication_rate REAL,
PRIMARY KEY(sample_id,run_id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment