auth-server/migrations/2020-03-01-122646_create_to.../up.sql

9 lines
230 B
SQL

-- Your SQL goes here
CREATE TABLE tokens (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users (id),
token VARCHAR(255) UNIQUE,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT NULL
);