knexfile.js
// Update with your config settings.
require('dotenv').config();
module.exports = {
development: {
client: 'pg',
connection: process.env.DB_DEV,
migrations: {
directory: './data/migrations',
},
seeds: {
directory: './data/seeds',
},
useNullAsDefault: true,
},
test: {
client: 'pg',
connection: process.env.DB_TEST,
migrations: {
directory: './data/migrations',
},
seeds: {
directory: './data/seeds',
},
useNullAsDefault: true,
},
staging: {
client: 'pg',
connection: process.env.DATABASE_URL,
migrations: {
directory: './data/migrations',
},
seeds: {
directory: './data/seeds',
},
pool: {
min: 2,
max: 10,
},
},
production: {
client: 'pg',
connection: process.env.DATABASE_URL,
migrations: {
directory: './data/migrations',
},
seeds: {
directory: './data/seeds',
},
},
};