You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
469 B

  1. /* global WIKI */
  2. exports.up = knex => {
  3. const dbCompat = {
  4. charset: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`)
  5. }
  6. return knex.schema
  7. .createTable('commentProviders', table => {
  8. if (dbCompat.charset) { table.charset('utf8mb4') }
  9. table.string('key').notNullable().primary()
  10. table.boolean('isEnabled').notNullable().defaultTo(false)
  11. table.json('config').notNullable()
  12. })
  13. }
  14. exports.down = knex => { }