ch15.2
This commit is contained in:
1
migrations/000005_create_tokens_table.down.sql
Normal file
1
migrations/000005_create_tokens_table.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS tokens;
|
||||
6
migrations/000005_create_tokens_table.up.sql
Normal file
6
migrations/000005_create_tokens_table.up.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS tokens {
|
||||
hash bytea PRIMARY KEY,
|
||||
user_id bigint NOT NULL REFERENCES users ON DELETE CASCADE,
|
||||
expiry timestamp(0) with time zone NOT NULL,
|
||||
scope text NOT NULL
|
||||
};
|
||||
Reference in New Issue
Block a user