galaeth-draft/Galaeth.DAL/Migrations/2024-11-16.01-refreshTokens.sql
2024-11-17 09:31:01 +00:00

12 lines
354 B
SQL

CREATE TABLE refreshTokens
(
token TEXT UNIQUE PRIMARY KEY NOT NULL,
tokenContext SMALLINT NOT NULL,
userId UUID REFERENCES users(id) ON DELETE CASCADE,
userAgent TEXT NOT NULL,
userAgentType SMALLINT NOT NULL,
ipAddress TEXT NOT NULL,
expires TIMESTAMP NOT NULL,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);