mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove seed command
This commit is contained in:
parent
085e8e7e82
commit
097e76fed0
@ -1,14 +1,7 @@
|
|||||||
import 'reflect-metadata'
|
import 'reflect-metadata'
|
||||||
import prepare from './prepare'
|
import prepare from './prepare'
|
||||||
import connection from './typeorm/connection'
|
import connection from './typeorm/connection'
|
||||||
import { CreatePeterLustigSeed } from './seeds/users/peter-lustig.admin.seed'
|
import { resetDB, pool, migration } from './helpers'
|
||||||
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'
|
|
||||||
|
|
||||||
const run = async (command: string) => {
|
const run = async (command: string) => {
|
||||||
// Database actions not supported by our migration library
|
// Database actions not supported by our migration library
|
||||||
@ -34,19 +27,6 @@ const run = async (command: string) => {
|
|||||||
// TODO protect from production
|
// TODO protect from production
|
||||||
await resetDB() // use for resetting database
|
await resetDB() // use for resetting database
|
||||||
break
|
break
|
||||||
case 'seed':
|
|
||||||
// TODO protect from production
|
|
||||||
// await runSeeder(CreatePeterLustigSeed)
|
|
||||||
await runSeeds([
|
|
||||||
CreatePeterLustigSeed,
|
|
||||||
CreateBibiBloxbergSeed,
|
|
||||||
CreateRaeuberHotzenplotzSeed,
|
|
||||||
CreateBobBaumeisterSeed,
|
|
||||||
CreateStephenHawkingSeed,
|
|
||||||
CreateGarrickOllivanderSeed,
|
|
||||||
...Array(96).fill(CreateUserSeed),
|
|
||||||
])
|
|
||||||
break
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported command ${command}`)
|
throw new Error(`Unsupported command ${command}`)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user