fix: don't always synchronize, use TYPEORM_SYNCHRONIZE env

This commit is contained in:
Alex Mikhalev 2018-09-03 03:58:26 -06:00
parent bc2f97c56d
commit cbf1285d5d
3 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ services:
- TYPEORM_DATABASE=postgres
- TYPEORM_USERNAME=postgres
- TYPEORM_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
- TYPEORM_SYNCHRONIZE=true
- MQTT_URL=tcp://mosquitto:1883
# Must specify JWT_SECRET and MQTT_URL

View File

@ -16,6 +16,7 @@ services:
- TYPEORM_DATABASE=postgres
- TYPEORM_USERNAME=postgres
- TYPEORM_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
- TYPEORM_SYNCHRONIZE=true
# Must specify JWT_SECRET and MQTT_URL
database:

View File

@ -38,7 +38,6 @@ export class Database {
}
async createAll() {
await this.conn.synchronize();
if (process.env.INSERT_TEST_DATA) {
await this.insertData();
}