Update to use yoga and pothos
This commit is contained in:
@ -2,6 +2,10 @@ generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
generator pothos {
|
||||
provider = "prisma-pothos-types"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = env("DATABASE_URL")
|
||||
|
17
prisma/seed.ts
Normal file
17
prisma/seed.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { database } from '@/lib/database';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
const main = async () => {
|
||||
let game = await database.game.findFirst({ where: { title: 'Pokemon Crystal Version' } });
|
||||
if(!game) {
|
||||
game = await database.game.create({
|
||||
data: {
|
||||
system: 'gbc',
|
||||
title: 'Pokemon Crystal Version',
|
||||
uuid: uuidv4()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
Reference in New Issue
Block a user