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.

18 lines
441 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('assetData', table => {
  8. if (dbCompat.charset) { table.charset('utf8mb4') }
  9. table.integer('id').primary()
  10. table.binary('data').notNullable()
  11. })
  12. }
  13. exports.down = knex => {
  14. return knex.schema
  15. .dropTableIfExists('assetData')
  16. }