x
This commit is contained in:
1 parent
c2269ea090
commit
14d3282a81
8 files changed
+226
-39
No files matched your search
@@ -0,0 +1,7 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Product" ADD COLUMN IF NOT EXISTS "isDeleted" BOOLEAN NOT NULL DEFAULT false;
|
||||
ALTER TABLE "Product" ADD COLUMN IF NOT EXISTS "deletedAt" TIMESTAMP(3);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "Product_isDeleted_idx" ON "Product"("isDeleted");
|
||||
CREATE INDEX IF NOT EXISTS "Product_categoryId_isDeleted_idx" ON "Product"("categoryId", "isDeleted");
|
||||
@@ -72,8 +72,13 @@ model Product {
|
||||
reviews Review[]
|
||||
detailSections ProductDetailSection[]
|
||||
translations ProductTranslation[]
|
||||
isDeleted Boolean @default(false)
|
||||
deletedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([isDeleted])
|
||||
@@index([categoryId, isDeleted])
|
||||
}
|
||||
|
||||
model ProductTranslation {
|
||||
|
||||
Reference in new issue
Block a user