diff --git a/prisma/seed.ts b/prisma/seed.ts new file mode 100644 index 0000000..cae2eb9 --- /dev/null +++ b/prisma/seed.ts @@ -0,0 +1,30 @@ +import Prisma, { PrismaClient } from "../generated/prisma"; + +const client = new PrismaClient(); + +async function createManyFeeds() { + const records: any = { data: [] }; + + for (let i = 0; i < 35; i++) { + records.data.push({ + name: `News Network ${i}`, + url: `https://news-network-${i}.com/rss`, + guild_id: "1204426362794811453", + active: true + }); + } + + await client.feed.createMany(records); +} + +async function main() { + await createManyFeeds(); +} + +main() + .then(async () => { await client.$disconnect() }) + .catch(async (error: unknown) => { + console.log(error); + await client.$disconnect(); + process.exit(1); + }); \ No newline at end of file