fix: don't always synchronize, use TYPEORM_SYNCHRONIZE env
This commit is contained in:
parent
bc2f97c56d
commit
cbf1285d5d
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -38,7 +38,6 @@ export class Database {
|
||||
}
|
||||
|
||||
async createAll() {
|
||||
await this.conn.synchronize();
|
||||
if (process.env.INSERT_TEST_DATA) {
|
||||
await this.insertData();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user