From 347a30b2024f603b92de0c322ab593963a7ff53d Mon Sep 17 00:00:00 2001 From: Joakim Carlstein Date: Wed, 8 Jan 2020 10:44:15 +0100 Subject: [PATCH] build: simplify/fix db config --- docker-compose.yml | 4 ++-- migrations/20191219123300_fourth.js | 4 ---- package.json | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8305bbe..8377186 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: image: postgres:12-alpine environment: POSTGRES_PASSWORD: '' - POSTGRES_DB: immigration_postgres + POSTGRES_DB: postgres POSTGRES_USER: postgres immigration: @@ -19,4 +19,4 @@ services: PGHOST: postgres PGUSER: postgres PGPASSWORD: '' - PGDATABASE: immigration_postgres + PGDATABASE: postgres diff --git a/migrations/20191219123300_fourth.js b/migrations/20191219123300_fourth.js index dc55419..fc2c018 100644 --- a/migrations/20191219123300_fourth.js +++ b/migrations/20191219123300_fourth.js @@ -7,10 +7,6 @@ exports.up = async () => { await pool.query(` DROP TABLE immigration_postgres; `); - const {rows} = await pool.query(`SELECT * FROM migrations`); - console.log( - rows.map(row => `${row.name} - ${row.status} - ${row.date.toISOString()}`).join('\n') - ); }; exports.down = () => {}; diff --git a/package.json b/package.json index 751aeda..67f2630 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test:docker": "docker-compose up --exit-code-from immigration", "posttest:docker": "docker-compose down", "release": "standard-version", - "immigration": "immigration --use [./ --table migrations --user postgres --database immigration_postgres] -d migrations up --new", + "immigration": "immigration --use [./ --table migrations] -d migrations up --new", "semantic-release": "semantic-release" }, "repository": {