mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
c4fa34224f
refs #7489 - add independent migratio runner - add init script - this is not connected to Ghost yet, but next PR will
14 lines
489 B
JavaScript
14 lines
489 B
JavaScript
var Promise = require('bluebird'),
|
|
commands = require('../../schema').commands,
|
|
logging = require('../../../logging'),
|
|
schema = require('../../schema').tables,
|
|
schemaTables = Object.keys(schema);
|
|
|
|
module.exports = function createTables(options) {
|
|
var database = options.database;
|
|
|
|
return Promise.mapSeries(schemaTables, function createTable(table) {
|
|
logging.info('Creating table: ' + table);
|
|
return commands.createTable(table, database);
|
|
});
|
|
};
|