Browse Source

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

庄表伟 6 năm trước cách đây
mục cha
commit
c2fe9621b9
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      server/db/migrations-sqlite/2.0.0-beta.127.js

+ 2 - 2
server/db/migrations-sqlite/2.0.0-beta.127.js

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