mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
refs #6301 - add new subscribers table with tests - add permissions for subscribers endpoint - minor improvments to test code
16 lines
460 B
JavaScript
16 lines
460 B
JavaScript
var commands = require('../../schema').commands,
|
|
db = require('../../db'),
|
|
|
|
table = 'subscribers',
|
|
message = 'Creating table: ' + table;
|
|
|
|
module.exports = function addSubscribersTable(logger) {
|
|
return db.knex.schema.hasTable(table).then(function (exists) {
|
|
if (!exists) {
|
|
logger.info(message);
|
|
return commands.createTable(table);
|
|
} else {
|
|
logger.warn(message);
|
|
}
|
|
});
|
|
};
|