'use strict';

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.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