Implement backend constant 'PRODUCTION_DB_CLEAN_ALLOW' to enable cleaning of database for staging, a start

This commit is contained in:
Wolfgang Huß 2022-07-19 18:51:50 +02:00
parent 794b8b29e1
commit 7c78474cee

View File

@ -1,7 +1,7 @@
import { cleanDatabase } from '../db/factories'
import CONFIG from '../config'
if (CONFIG.PRODUCTION) {
if (CONFIG.PRODUCTION && !CONFIG.PRODUCTION_DB_CLEAN_ALLOW) {
throw new Error(`You cannot clean the database in production environment!`)
}