remove seed command

This commit is contained in:
Moriz Wahl 2022-04-19 09:10:11 +02:00
parent 085e8e7e82
commit 097e76fed0

View File

@ -1,14 +1,7 @@
import 'reflect-metadata'
import prepare from './prepare'
import connection from './typeorm/connection'
import { CreatePeterLustigSeed } from './seeds/users/peter-lustig.admin.seed'
import { CreateBibiBloxbergSeed } from './seeds/users/bibi-bloxberg.seed'
import { CreateRaeuberHotzenplotzSeed } from './seeds/users/raeuber-hotzenplotz.seed'
import { CreateBobBaumeisterSeed } from './seeds/users/bob-baumeister.seed'
import { CreateStephenHawkingSeed } from './seeds/users/stephen-hawking.seed'
import { CreateGarrickOllivanderSeed } from './seeds/users/garrick-ollivander.seed'
import { CreateUserSeed } from './seeds/create-user.seed'
import { resetDB, pool, migration, runSeeds } from './helpers'
import { resetDB, pool, migration } from './helpers'
const run = async (command: string) => {
// Database actions not supported by our migration library
@ -34,19 +27,6 @@ const run = async (command: string) => {
// TODO protect from production
await resetDB() // use for resetting database
break
case 'seed':
// TODO protect from production
// await runSeeder(CreatePeterLustigSeed)
await runSeeds([
CreatePeterLustigSeed,
CreateBibiBloxbergSeed,
CreateRaeuberHotzenplotzSeed,
CreateBobBaumeisterSeed,
CreateStephenHawkingSeed,
CreateGarrickOllivanderSeed,
...Array(96).fill(CreateUserSeed),
])
break
default:
throw new Error(`Unsupported command ${command}`)
}