botpress
Version:
The world's first CMS for bots. Easily create, manage and extend chatbots.
28 lines (24 loc) • 929 B
JavaScript
;
var _helpers = require('./helpers');
var _helpers2 = _interopRequireDefault(_helpers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = knex => {
const h = (0, _helpers2.default)(knex);
return h.createTableIfNotExists('ghost_content', table => {
table.increments('id');
table.string('folder');
table.string('file');
table.unique(['folder', 'file']);
table.text('content');
table.timestamp('modified_on').defaultTo(knex.fn.now());
}).then(() => h.createTableIfNotExists('ghost_revisions', table => {
table.increments('id');
table.integer('content_id').references('ghost_content.id');
table.string('revision');
table.timestamp('created_on').defaultTo(knex.fn.now());
table.string('created_by');
}));
}; /*
Tables storing ghost content and its revisions
*/
//# sourceMappingURL=ghost.js.map