Created
February 17, 2020 11:28
-
-
Save pratikagashe/c47ef564e2c3dd429c9437c150ca10cc to your computer and use it in GitHub Desktop.
Knex migration config file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('dotenv').config() | |
| const { CLIENT, DATABASE, PG_USER, PASSWORD, HOST, PG_PORT } = process.env | |
| module.exports = { | |
| development: { | |
| client: CLIENT, | |
| connection: { | |
| database: DATABASE, | |
| user: PG_USER, | |
| password: PASSWORD, | |
| host: HOST, | |
| port: PG_PORT, | |
| }, | |
| migrations: { | |
| directory: __dirname + '/db/migrations', | |
| }, | |
| seeds: { | |
| directory: __dirname + '/db/seeds', | |
| }, | |
| }, | |
| staging: { | |
| client: 'postgresql', | |
| connection: { | |
| database: 'my_db', | |
| user: 'username', | |
| password: 'password', | |
| }, | |
| pool: { | |
| min: 2, | |
| max: 10, | |
| }, | |
| migrations: { | |
| tableName: 'knex_migrations', | |
| }, | |
| }, | |
| production: { | |
| client: 'postgresql', | |
| connection: { | |
| database: 'my_db', | |
| user: 'username', | |
| password: 'password', | |
| }, | |
| pool: { | |
| min: 2, | |
| max: 10, | |
| }, | |
| migrations: { | |
| tableName: 'knex_migrations', | |
| }, | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment