crablog/migrations/2018-11-21-070343_add token table/up.sql
2018-11-21 18:27:23 +08:00

9 lines
325 B
SQL

-- Your SQL goes here
-- Table Definition ----------------------------------------------
CREATE TABLE tokens (
id SERIAL NOT NULL PRIMARY KEY,
user_id integer NOT NULL REFERENCES users(id),
value text NOT NULL,
expire_at timestamp without time zone NOT NULL DEFAULT (CURRENT_TIMESTAMP + '1 day'::interval)
);