2
0

2.0.0-beta.148.js 504 B

123456789101112131415161718192021
  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. }