Skip to content

Instantly share code, notes, and snippets.

@mvodep
Last active May 2, 2021 12:16
Show Gist options
  • Save mvodep/30449aef33a280a2b89a2752442fb19c to your computer and use it in GitHub Desktop.
Save mvodep/30449aef33a280a2b89a2752442fb19c to your computer and use it in GitHub Desktop.
CREATE SCHEMA IF NOT EXISTS playground;
DROP TABLE IF EXISTS playground.edges;
DROP TABLE IF EXISTS playground.nodes;
CREATE TABLE playground.nodes
(
id SERIAL PRIMARY KEY,
node_name VARCHAR(10) NOT NULL
);
CREATE TABLE playground.edges
(
id SERIAL PRIMARY KEY,
from_node_id INTEGER NOT NULL REFERENCES playground.nodes(id),
to_node_id INTEGER NOT NULL REFERENCES playground.nodes(id),
type VARCHAR(20) NOT NULL
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment