drop Posts table (#46)
This commit is contained in:
parent
5b125d22c8
commit
bff55596c6
5 changed files with 11 additions and 126 deletions
11
prisma/migrations/20250105023121_drop_posts/migration.sql
Normal file
11
prisma/migrations/20250105023121_drop_posts/migration.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `Post` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "Post" DROP CONSTRAINT "Post_authorId_fkey";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "Post";
|
||||
|
|
@ -20,20 +20,6 @@ model User {
|
|||
|
||||
email String?
|
||||
name String
|
||||
posts Post[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
}
|
||||
|
||||
model Post {
|
||||
id String @id @default(uuid())
|
||||
|
||||
title String
|
||||
content String
|
||||
published Boolean? @default(false)
|
||||
author User @relation(references: [id], fields: [authorId])
|
||||
authorId String
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue