17 lines
408 B
TypeScript
17 lines
408 B
TypeScript
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); |