14 lines
476 B
SQL
14 lines
476 B
SQL
CREATE TABLE user_sessions(
|
|
"id" uuid default gen_random_uuid() primary key not null,
|
|
"index_id" bigserial not null,
|
|
"email" varchar not null references "users"("email") not null,
|
|
"refresh_token" varchar not null,
|
|
"user_agent" varchar not null,
|
|
"client_ip" varchar not null,
|
|
"is_blocked" boolean not null default false,
|
|
"expires_at" timestamp not null,
|
|
"created_at" timestamp default(now())
|
|
);
|
|
|
|
CREATE INDEX ON "user_sessions"("index_id");
|