diff --git a/knexfile.js b/knexfile.js index 3a691362..4d12083d 100644 --- a/knexfile.js +++ b/knexfile.js @@ -1,26 +1,31 @@ import * as Environment from "~/node_common/environment"; -module.exports = { - development: { - client: "pg", - connection: { - ssl: true, - port: 5432, - host: Environment.POSTGRES_HOSTNAME, - database: Environment.POSTGRES_DATABASE, - user: Environment.POSTGRES_ADMIN_USERNAME, - password: Environment.POSTGRES_ADMIN_PASSWORD, - }, - }, - production: { - client: "pg", - connection: { - ssl: true, - port: 5432, - host: Environment.POSTGRES_HOSTNAME, - database: Environment.POSTGRES_DATABASE, - user: Environment.POSTGRES_ADMIN_USERNAME, - password: Environment.POSTGRES_ADMIN_PASSWORD, - }, +const developmentConfig = { + client: "pg", + connection: { + ssl: true, + port: 5432, + host: Environment.POSTGRES_HOSTNAME, + database: Environment.POSTGRES_DATABASE, + user: Environment.POSTGRES_ADMIN_USERNAME, + password: Environment.POSTGRES_ADMIN_PASSWORD, }, }; + +const productionConfig = { + client: "pg", + connection: { + ssl: true, + port: 5432, + host: Environment.POSTGRES_HOSTNAME, + database: Environment.POSTGRES_DATABASE, + user: Environment.POSTGRES_ADMIN_USERNAME, + password: Environment.POSTGRES_ADMIN_PASSWORD, + }, +}; + +module.exports = { + development: developmentConfig, + staging: productionConfig, + production: productionConfig, +};