feat: add Prisma ORM #5

Open
nerdychara wants to merge 3 commits from feat/add-prisma into main
6 changed files with 10 additions and 10 deletions
Showing only changes of commit 1e25328711 - Show all commits
+1 -1
View File
@@ -1,4 +1,4 @@
node_modules
prod
/generated/prisma
src/generated/prisma
Review

Prisma should not be creating this at all.

Prisma should not be creating this at all.
-5
View File
@@ -1,5 +0,0 @@
import { PrismaClient } from "../generated/prisma/client";
const prisma = new PrismaClient();
export { prisma };
+1 -1
View File
@@ -5,8 +5,8 @@
*/
import { Client, Events, GatewayIntentBits } from "discord.js";
import { scheduleJob } from "node-schedule";
import { prisma } from "../lib/prisma.js";
import { channels } from "./config/channels.js";
import { prisma } from "./lib/prisma.js";
import { standup } from "./modules/standup.js";
import { logger } from "./utils/logger.js";
1
+5
View File
@@ -0,0 +1,5 @@
import { PrismaClient } from "../generated/prisma/client.js";
const prisma = new PrismaClient();
export { prisma };
+2 -2
View File
@@ -1,8 +1,8 @@
import { defineConfig, env } from "prisma/config";
import { defineConfig } from "prisma/config";
Review

We should not need a config file at all. The schema handles all of the config we need.

We should not need a config file at all. The schema handles all of the config we need.
export default defineConfig({
datasource: {
url: env("DATABASE_URL"),
url: process.env.DATABASE_URL ?? "",
},
engine: "classic",
migrations: {
+1 -1
View File
@@ -1,7 +1,7 @@
{
Review

These changes are incorrect and should be reverted.

These changes are incorrect and should be reverted.
"include": ["**/*.ts"],
"extends": "@nhcarrigan/typescript-config",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./prod"
},
"exclude": ["test/**/*.ts", "vitest.config.ts"]