mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
|
'use strict';
|
||
|
|
||
|
exports.up = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
CREATE TABLE personal_access_tokens (
|
||
|
secret text not null primary key,
|
||
|
user_id integer not null references users (id) ON DELETE CASCADE,
|
||
|
expires_at timestamp with time zone NOT NULL,
|
||
|
seen_at timestamp with time zone,
|
||
|
created_at timestamp with time zone not null DEFAULT now()
|
||
|
);`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, cb) {
|
||
|
db.runSql(`drop table personal_access_tokens`, cb);
|
||
|
};
|