1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00

fix: default to empty object for metadata

This commit is contained in:
Fredrik Oseberg 2022-08-16 15:32:29 +02:00
parent f05be210dd
commit 083686fe95

View File

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