Skip to content

Instantly share code, notes, and snippets.

@emhoracek
Created October 9, 2015 14:04
Show Gist options
  • Save emhoracek/c53b9a2f55be4b1763bc to your computer and use it in GitHub Desktop.
Save emhoracek/c53b9a2f55be4b1763bc to your computer and use it in GitHub Desktop.
yeslets-schema
DROP TABLE users CASCADE;
CREATE TABLE users (
id serial primary key,
name text,
email text,
password text,
created_at timestamptz );
DROP TABLE signals CASCADE;
CREATE TABLE signals (
id serial primary key,
user_id integer references users(id),
action text,
topic text,
created_at timestamptz );
DROP TABLE yesletses CASCADE;
CREATE TABLE yesletses (
id serial primary key,
signal_id integer references signals(id),
user_id integer references users(id),
created_at timestamptz);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment