Split up files and did some consistency work.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE refresh_tokens (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
|
||||
access_token_id UUID NOT NULL UNIQUE CONSTRAINT fk_refresh_tokens_access_token REFERENCES access_tokens (id) ON DELETE CASCADE,
|
||||
secret_hash BYTEA NOT NULL UNIQUE CHECK (
|
||||
octet_length(secret_hash) = 32
|
||||
),
|
||||
expires_at TIMESTAMPTZ NOT NULL,
|
||||
issued_at TIMESTAMPTZ NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user