chore: rename new created_at column (#31)

This commit is contained in:
Riccardo Senica
2025-01-18 11:48:40 +01:00
committed by GitHub
parent 2616728128
commit 2752045c16
3 changed files with 4 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
const validation = UnsubscribeFormSchema.safeParse(body);
if (!validation.success) {
return formatApiResponse(STATUS_BAD_REQUEST, BAD_REQUEST);
}

View File

@@ -0,0 +1,2 @@
-- Rename the column without dropping it
ALTER TABLE news RENAME COLUMN created_at TO "createdAt";

View File

@@ -29,7 +29,7 @@ model News {
time Float
url String?
score Float
createdAt DateTime @default(now()) @map(name: "created_at")
createdAt DateTime @default(now())
@@map(name: "news")
}