galaeth-draft/Galaeth.DAL/Migrations/2024-11-16.01-refreshTokens.sql

12 lines
354 B
MySQL
Raw Permalink Normal View History

2024-11-17 10:31:01 +01:00
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
);