mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
84f387785a
refs #6301 - fix messages that joined with comma and therefore missed outputting version no - change `logInfo` to `logger` that has both an info and a warn method - add new warn method to errors - add a warn message everytime a migration (data or fixture) gets skipped over - update logger everywhere, including tests - update tests to check logger.warn gets called
16 lines
480 B
JavaScript
16 lines
480 B
JavaScript
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);
|
|
}
|
|
});
|
|
};
|