File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3'
22import { subMonths } from 'date-fns'
33import { PrismaClient } from '#app/utils/prisma-generated.server/client.ts'
4+ import { getPasswordHash } from '#app/utils/password.server.ts'
45
56import 'dotenv/config'
67
@@ -13,14 +14,24 @@ const prisma = new PrismaClient({
1314} )
1415
1516async function main ( ) {
17+ const kentPasswordHash = await getPasswordHash ( 'iliketwix' )
18+
1619 const kent = await prisma . user . upsert ( {
1720 where : { email : 'me@kentcdodds.com' } ,
18- update : { } ,
21+ update : {
22+ password : {
23+ upsert : {
24+ create : { hash : kentPasswordHash } ,
25+ update : { hash : kentPasswordHash } ,
26+ } ,
27+ } ,
28+ } ,
1929 create : {
2030 email : `me@kentcdodds.com` ,
2131 firstName : 'Kent' ,
2232 team : 'BLUE' ,
2333 role : 'ADMIN' ,
34+ password : { create : { hash : kentPasswordHash } } ,
2435 } ,
2536 } )
2637
You can’t perform that action at this time.
0 commit comments