From 48a60c896d86de9bf76806ca60da35ef9f77259e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 5 Feb 2020 11:55:43 +0200 Subject: Add prod env --- backend/knexfile.js | 16 ++++++++++++++++ backend/migrations/20200201145548_password-salt.js | 11 ----------- backend/migrations/20200201154548_password-salt.js | 11 +++++++++++ 3 files changed, 27 insertions(+), 11 deletions(-) delete mode 100644 backend/migrations/20200201145548_password-salt.js create mode 100644 backend/migrations/20200201154548_password-salt.js (limited to 'backend') diff --git a/backend/knexfile.js b/backend/knexfile.js index 73d0a10..4984c40 100644 --- a/backend/knexfile.js +++ b/backend/knexfile.js @@ -17,4 +17,20 @@ module.exports = { tableName: 'knex_migrations', }, }, + production: { + client: 'postgresql', + connection: { + host: process.env.DATABASE_HOST, + database: process.env.DATABASE_DB, + user: process.env.DATABASE_USER, + password: process.env.DATABASE_PASSWORD, + }, + pool: { + min: 2, + max: 10, + }, + migrations: { + tableName: 'knex_migrations', + }, + }, }; diff --git a/backend/migrations/20200201145548_password-salt.js b/backend/migrations/20200201145548_password-salt.js deleted file mode 100644 index 217b02b..0000000 --- a/backend/migrations/20200201145548_password-salt.js +++ /dev/null @@ -1,11 +0,0 @@ -exports.up = function(knex) { - return knex.schema.table('users', function(table) { - table.string('salt').notNullable(); - }); -}; - -exports.down = function(knex) { - return knex.schema.table('users', function(table) { - table.dropColumn('salt'); - }); -}; diff --git a/backend/migrations/20200201154548_password-salt.js b/backend/migrations/20200201154548_password-salt.js new file mode 100644 index 0000000..217b02b --- /dev/null +++ b/backend/migrations/20200201154548_password-salt.js @@ -0,0 +1,11 @@ +exports.up = function(knex) { + return knex.schema.table('users', function(table) { + table.string('salt').notNullable(); + }); +}; + +exports.down = function(knex) { + return knex.schema.table('users', function(table) { + table.dropColumn('salt'); + }); +}; -- cgit v1.3