1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/migrations/20220816121136-add-metadata-to-api-keys.js

13 lines
281 B
JavaScript
Raw Normal View History

'use strict';
exports.up = function (db, cb) {
db.runSql(
`ALTER TABLE api_tokens ADD COLUMN metadata JSONB NOT NULL DEFAULT '{}'::jsonb;`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql('ALTER TABLE api_tokens DROP COLUMN metadata;', cb);
};