feat: initialize prisma with Stock model

This commit is contained in:
2026-05-14 09:55:24 +02:00
parent 0fdd8432a0
commit f40eec1420
5 changed files with 44 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// This file was generated by Prisma, and assumes you have installed the following:
// npm install --save-dev prisma dotenv
import "dotenv/config";
import { defineConfig } from "prisma/config";
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
},
datasource: {
url: "file:./prisma/dev.db",
},
});
BIN
View File
Binary file not shown.
@@ -0,0 +1,11 @@
-- CreateTable
CREATE TABLE "Stock" (
"id" TEXT NOT NULL PRIMARY KEY,
"ticker" TEXT NOT NULL,
"notes" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "Stock_ticker_key" ON "Stock"("ticker");
+3
View File
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"
+16
View File
@@ -0,0 +1,16 @@
generator client {
provider = "prisma-client-js"
output = "../node_modules/.prisma/client"
}
datasource db {
provider = "sqlite"
}
model Stock {
id String @id @default(cuid())
ticker String @unique
notes String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}