Disallow database seeding in non-staging and real production environments

This commit is contained in:
Wolfgang Huß 2022-07-20 07:56:43 +02:00
parent 7c78474cee
commit 16812e0966

View File

@ -6,6 +6,10 @@ import Factory from '../db/factories'
import { getNeode, getDriver } from '../db/neo4j'
import { gql } from '../helpers/jest'
if (CONFIG.PRODUCTION && !CONFIG.PRODUCTION_DB_CLEAN_ALLOW) {
throw new Error(`You cannot seed the database in a non-staging and real production environment!`)
}
const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
/* eslint-disable no-multi-spaces */