mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
revert schema reset for each migration
This commit is contained in:
parent
6d6f862bd1
commit
c8746b85f7
@ -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",
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user