Browse Source

fix: sqlite assets hash - set default value (#835)

pull/861/head
庄表伟 5 years ago
committed by Nicolas Giard
parent
commit
c2fe9621b9
1 changed files with 2 additions and 2 deletions
  1. 4
      server/db/migrations-sqlite/2.0.0-beta.127.js

4
server/db/migrations-sqlite/2.0.0-beta.127.js

@ -2,7 +2,7 @@ exports.up = knex => {
return knex.schema return knex.schema
.table('assets', table => { .table('assets', table => {
table.dropColumn('basename') table.dropColumn('basename')
table.string('hash').notNullable()
table.string('hash').notNullable().defaultTo('')
}) })
} }
@ -10,6 +10,6 @@ exports.down = knex => {
return knex.schema return knex.schema
.table('assets', table => { .table('assets', table => {
table.dropColumn('hash') table.dropColumn('hash')
table.string('basename').notNullable()
table.string('basename').notNullable().defaultTo('')
}) })
} }
Loading…
Cancel
Save