Skip to content

Instantly share code, notes, and snippets.

@afarber
Created March 2, 2018 14:40
Show Gist options
  • Save afarber/06cc37114ff8dd14f05077f312904361 to your computer and use it in GitHub Desktop.
Save afarber/06cc37114ff8dd14f05077f312904361 to your computer and use it in GitHub Desktop.
words_moves.sql
CREATE TABLE words_moves (
mid BIGSERIAL PRIMARY KEY,
action text NOT NULL,
gid integer NOT NULL REFERENCES words_games ON DELETE CASCADE,
uid integer NOT NULL REFERENCES words_users ON DELETE CASCADE,
played timestamptz NOT NULL,
tiles jsonb,
score integer CHECK(score >= 0)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment