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
422 B

  1. exports.up = knex => {
  2. const dbCompat = {
  3. charset: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`)
  4. }
  5. return knex.schema
  6. .createTable('assetData', table => {
  7. if (dbCompat.charset) { table.charset('utf8mb4') }
  8. table.integer('id').primary()
  9. table.binary('data').notNullable()
  10. })
  11. }
  12. exports.down = knex => {
  13. return knex.schema
  14. .dropTableIfExists('assetData')
  15. }