mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
ff7be7696c
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
22 lines
566 B
JavaScript
22 lines
566 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`CREATE TABLE IF NOT EXISTS api_tokens
|
|
(
|
|
secret text not null PRIMARY KEY,
|
|
username text not null,
|
|
type text not null,
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
|
|
expires_at TIMESTAMP WITH TIME ZONE,
|
|
seen_at TIMESTAMP WITH TIME ZONE
|
|
);
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql('DROP TABLE IF EXISTS api_tokens;', cb);
|
|
};
|