Initial commit

This commit is contained in:
2026-06-24 23:47:55 -07:00
commit d134b480a0
297 changed files with 30726 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { logger } from "@/utils/logger"
import dbMigrationClient from "@/db/db-migration-client"
import { User } from "@/models"
export async function runSeeds(): Promise<void> {
if (process.env.SKIP_SEEDING_UNLESS_EMPTY === "true") {
const count = await User.count({ logging: false })
if (count > 0) {
logger.warn("Skipping seeding as SKIP_SEEDING_UNLESS_EMPTY set, and data already seeded.")
return
}
}
try {
await dbMigrationClient.seed.run()
} catch (error) {
logger.error(`Error running seeds: ${error}`, { error })
throw error
}
return
}
export default runSeeds