fix migration for empty counters table
This commit is contained in:
parent
fcc7956b4d
commit
ef08ef020b
|
@ -19,7 +19,7 @@ exports.up = async function(knex) {
|
|||
|
||||
// awfulllllllllllllll
|
||||
const rows = await knex('counters').select('*');
|
||||
await knex('counters_').insert(rows);
|
||||
if (rows.length > 0) await knex('counters_').insert(rows);
|
||||
|
||||
await knex.schema
|
||||
.dropTable('counters')
|
||||
|
|
Loading…
Reference in New Issue