2.4.13.js 658 Bytes
Newer Older
1 2
/* global WIKI */

3 4 5
exports.up = knex => {
  return knex.schema
    .alterTable('pages', table => {
6 7 8 9 10
      if (WIKI.config.db.type === 'mysql') {
        table.json('extra')
      } else {
        table.json('extra').notNullable().defaultTo('{}')
      }
11 12
    })
    .alterTable('pageHistory', table => {
13 14 15 16 17
      if (WIKI.config.db.type === 'mysql') {
        table.json('extra')
      } else {
        table.json('extra').notNullable().defaultTo('{}')
      }
18 19 20 21 22 23 24 25
    })
    .alterTable('users', table => {
      table.string('dateFormat').notNullable().defaultTo('')
      table.string('appearance').notNullable().defaultTo('')
    })
}

exports.down = knex => { }