12 lines
354 B
MySQL
12 lines
354 B
MySQL
|
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
|
||
|
);
|