From cbf3db459709f045eb4156869cac58a64ed52329 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Sun, 13 Nov 2016 16:14:51 +0100 Subject: [PATCH] revert schema reset for each migration --- package.json | 2 +- test/e2e/util/test-helper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f4d54dfacb..af9e52e2a3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "test:pg-virtualenv": "pg_virtualenv npm run test:pg-virtualenv-chai", "test:pg-virtualenv-chain": "export TEST_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@localhost:$PGPORT/postgres ; npm run db-migrate-testdb && npm test", "test:coverage": "nyc npm run test", - "test:coverage-report": "nyc report --reporter=text-lcov | coveralls && rm -rf ./coverage" + "test:coverage-report": "nyc report --reporter=text-lcov | coveralls" }, "dependencies": { "body-parser": "1.15.2", diff --git a/test/e2e/util/test-helper.js b/test/e2e/util/test-helper.js index 221eed0c36..ca5b2347c3 100644 --- a/test/e2e/util/test-helper.js +++ b/test/e2e/util/test-helper.js @@ -20,7 +20,7 @@ function createApp (databaseSchema = 'test') { }; const db = createDb({ databaseUri: options.databaseUri, minPool: 0, maxPool: 0 }); - return db.raw(`DROP SCHEMA IF EXISTS ${options.databaseSchema} CASCADE; CREATE SCHEMA ${options.databaseSchema}`) + return db.raw(`CREATE SCHEMA IF NOT EXISTS ${options.databaseSchema}`) .then(() => migrator(options)) .then(() => { db.destroy();