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.

21 lines
504 B

  1. exports.up = knex => {
  2. const dbCompat = {
  3. blobLength: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`)
  4. }
  5. return knex.schema
  6. .table('assetData', table => {
  7. if (dbCompat.blobLength) {
  8. table.dropColumn('data')
  9. }
  10. })
  11. .table('assetData', table => {
  12. if (dbCompat.blobLength) {
  13. table.specificType('data', 'LONGBLOB').notNullable()
  14. }
  15. })
  16. }
  17. exports.down = knex => {
  18. return knex.schema
  19. .table('assetData', table => {})
  20. }