mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-09 07:28:55 -07:00
19 lines
No EOL
388 B
SQL
19 lines
No EOL
388 B
SQL
-- +goose Up
|
|
-- +goose StatementBegin
|
|
|
|
CREATE TABLE sessions (
|
|
id UUID PRIMARY KEY,
|
|
user_id INT NOT NULL REFERENCES users(id),
|
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
expires_at TIMESTAMP NOT NULL,
|
|
persistent BOOLEAN NOT NULL DEFAULT false
|
|
);
|
|
|
|
-- +goose StatementEnd
|
|
|
|
-- +goose Down
|
|
-- +goose StatementBegin
|
|
|
|
DROP TABLE IF EXISTS sessions;
|
|
|
|
-- +goose StatementEnd |