0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/server/data/migration/004/04-add-clienttrusteddomains-table.js

17 lines
480 B
JavaScript
Raw Normal View History

var commands = require('../../schema').commands,
db = require('../../db'),
table = 'client_trusted_domains',
message = 'Creating table: ' + table;
module.exports = function addClientTrustedDomainsTable(logger) {
return db.knex.schema.hasTable(table).then(function (exists) {
if (!exists) {
logger.info(message);
return commands.createTable(table);
} else {
logger.warn(message);
}
});
};