mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
2a54ace005
* Add description to PAT * Add tests
21 lines
581 B
JavaScript
21 lines
581 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
CREATE TABLE personal_access_tokens (
|
|
secret text not null primary key,
|
|
description text,
|
|
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);
|
|
};
|