import { PrismaClient } from '@prisma/client'; import * as bcrypt from 'bcryptjs'; const prisma = new PrismaClient(); async function main() { const email = 'admin@prosapp.co'; const password = process.argv[2] || 'Admin2024!'; const password_hash = await bcrypt.hash(password, 10); const user = await prisma.users.upsert({ where: { email }, create: { email, password_hash, name: 'Admin', }, update: { password_hash, }, }); console.log(`✓ Admin listo: ${user.email} | password: ${password}`); } main() .catch(console.error) .finally(() => prisma.$disconnect());