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.

23 lines
523 B

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