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