Skip to content

Commit

Permalink
knex setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Diandra Ryan-Mas authored and Diandra Ryan-Mas committed Jul 13, 2019
1 parent f5b22d1 commit d17f98a
Show file tree
Hide file tree
Showing 3 changed files with 2,131 additions and 0 deletions.
25 changes: 25 additions & 0 deletions knexfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Update with your config settings.

module.exports = {

development: {
client: 'sqlite3',
useNullAsDefault: true, // needed for sqlite
connection: {
filename: './data/schemes.db3',
},
migrations: {
directory: './data/migrations'
},
seeds: {
directory: './data/seeds'
},
// add the following
pool: {
afterCreate: (conn, done) => {
// runs after a connection is made to the sqlite engine
conn.run('PRAGMA foreign_keys = ON', done); // turn on FK enforcement
},
},
},
};
Loading

0 comments on commit d17f98a

Please sign in to comment.