chore: rename new created_at column (#31)
This commit is contained in:
@@ -17,7 +17,7 @@ export async function POST(request: NextRequest) {
|
|||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
|
|
||||||
const validation = UnsubscribeFormSchema.safeParse(body);
|
const validation = UnsubscribeFormSchema.safeParse(body);
|
||||||
|
|
||||||
if (!validation.success) {
|
if (!validation.success) {
|
||||||
return formatApiResponse(STATUS_BAD_REQUEST, BAD_REQUEST);
|
return formatApiResponse(STATUS_BAD_REQUEST, BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- Rename the column without dropping it
|
||||||
|
ALTER TABLE news RENAME COLUMN created_at TO "createdAt";
|
||||||
@@ -29,7 +29,7 @@ model News {
|
|||||||
time Float
|
time Float
|
||||||
url String?
|
url String?
|
||||||
score Float
|
score Float
|
||||||
createdAt DateTime @default(now()) @map(name: "created_at")
|
createdAt DateTime @default(now())
|
||||||
|
|
||||||
@@map(name: "news")
|
@@map(name: "news")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user