Skip to content

Instantly share code, notes, and snippets.

@tdubs42
Last active September 16, 2021 20:41
Show Gist options
  • Save tdubs42/b74e109ce8d6fece6160dae8e232cd34 to your computer and use it in GitHub Desktop.
Save tdubs42/b74e109ce8d6fece6160dae8e232cd34 to your computer and use it in GitHub Desktop.
// always use as first seed file to clean db
const cleaner = require('knex-cleaner')
exports.seed = function (knex) {
return cleaner.clean(knex, {
mode: 'truncate', // resets ids
ignoreTables: [
'knex_migrations',
'knex_migrations_lock'
],
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment