Knex pass over db FK constraints when I try to insert values into my FKs in the DB Browser for SQLite I get the constraints error, but when I run the seeders with knex (npm package) it pass over the FK constraints and it inserts when it should return an error.
I had before my knexfile.js like this:

    var knex = require('knex')({
    dialect: 'sqlite3',
    connection: {
      filename: './database'
    },
    useNullAsDefault: true
  });


It was needed to activate here the PRAGMA for foreign_keys. To do it change it to:

    var knex = require('knex')({
    dialect: 'sqlite3',
    connection: {
      filename: './database'
    },
    pool: {
      afterCreate: function (conn, cb) {
        conn.run('PRAGMA foreign_keys = ON', cb)
      }
    },
    useNullAsDefault: true
  });