aboutsummaryrefslogtreecommitdiffstats
path: root/schema.sql
blob: b533685b43a398e9b7d1d4b5825197376a994f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
CREATE TABLE users(
       id serial PRIMARY KEY,
       name text,
       password text);

CREATE TABLE sessions(
       id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
       created_at timestamp DEFAULT now(),
       expire timestamp,
       user_id integer REFERENCES users(id) ON DELETE CASCADE
);