You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.5 KiB
74 lines
1.5 KiB
// Update with your config settings.
|
|
import 'dotenv/config'
|
|
import { dirname } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
/**
|
|
* @type { Object.<string, import("knex").Knex.Config> }
|
|
*/
|
|
export default {
|
|
development: {
|
|
client: 'sqlite3',
|
|
connection: {
|
|
filename: './db/development.db'
|
|
},
|
|
migrations: {
|
|
directory: __dirname + '/db/migrations'
|
|
},
|
|
seeds: {
|
|
directory: __dirname + '/db/seeds'
|
|
}
|
|
},
|
|
|
|
test: {
|
|
client: 'sqlite3',
|
|
useNullAsDefault: true,
|
|
connection: {
|
|
filename: './db/testing.db'
|
|
},
|
|
migrations: {
|
|
directory: __dirname + '/db/migrations'
|
|
},
|
|
seeds: {
|
|
directory: __dirname + '/db/seeds'
|
|
}
|
|
},
|
|
|
|
staging: {
|
|
client: 'pg',
|
|
connection: {
|
|
database: process.env.DB_NAME,
|
|
user: process.env.DB_USER,
|
|
password: process.env.DB_PASS,
|
|
host: process.env.DB_HOST,
|
|
port: process.env.DB_PORT
|
|
},
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
tableName: 'knex_migrations'
|
|
}
|
|
},
|
|
|
|
production: {
|
|
client: 'pg',
|
|
connection: {
|
|
database: process.env.DB_NAME,
|
|
user: process.env.DB_USER,
|
|
password: process.env.DB_PASS,
|
|
host: process.env.DB_HOST,
|
|
port: process.env.DB_PORT
|
|
},
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
tableName: 'knex_migrations'
|
|
}
|
|
}
|
|
}
|
|
|