knex-cleaner
knex-cleaner copied to clipboard
Requesting Drop option
check out this commit, literally just asking you to plop these three lines into ur code as it is in this diff.
https://github.com/yeya/knex-cleaner/commit/fbaf1acc8b76b3d2867387d001673abbc07a9a5c
@steven-ferguson Would you mind to help publish this change with the drop option?
Happy to take a look at a PR if someone can make one.
let knexTables = require('knex-cleaner/lib/knex_tables')
knexTables.getTableNames(knex)
.then((tables) => {
tables = tables.map((table) => {
return `"${table}"`
})
return knexTables.getDropTables(knex, tables)
})
.then(() => {
return knex.migrate.latest()
})