mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Remove duplicate seed script - use /api/bootstrap endpoint instead
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
"db:generate": "prisma generate --schema=../shared/prisma/schema.prisma",
|
||||
"db:push": "prisma db push --schema=../shared/prisma/schema.prisma",
|
||||
"db:migrate": "prisma migrate deploy --schema=../shared/prisma/schema.prisma",
|
||||
"db:studio": "prisma studio --schema=../shared/prisma/schema.prisma",
|
||||
"db:seed": "tsx ../shared/seeds/load-and-apply.ts"
|
||||
"db:studio": "prisma studio --schema=../shared/prisma/schema.prisma"
|
||||
},
|
||||
"keywords": [
|
||||
"database",
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* @file seeds/load-and-apply.ts
|
||||
* @description Seed script entry point
|
||||
*
|
||||
* Loads and applies seed data from /dbal/shared/seeds/ folder.
|
||||
* Run via: npm --prefix dbal/development run db:seed
|
||||
*/
|
||||
|
||||
// Load environment variables first
|
||||
import 'dotenv/config'
|
||||
|
||||
import { getDBALClient, seedDatabase } from '../../../dbal/development/dist/index.js'
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
console.log('📦 Loading seed data...')
|
||||
const client = getDBALClient()
|
||||
await seedDatabase(client)
|
||||
console.log('✅ Database seeded successfully')
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error('❌ Seed failed:', error instanceof Error ? error.message : error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user