feat: 增加能力插件启停与审计
This commit is contained in:
1 parent
0fb96bdea3
commit
8a02d09e2d
6 files changed
+147
-1
No files matched your search
@@ -0,0 +1,35 @@
|
||||
-- DropIndex
|
||||
DROP INDEX "Booking_brandId_offeringId_idx";
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "BookingItem_offeringId_idx";
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "InquirySubmission_offeringId_idx";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "BrandTemplateInstallation" ALTER COLUMN "configSnapshot" DROP DEFAULT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "InquirySubmission" ALTER COLUMN "updatedAt" DROP DEFAULT;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "CapabilityAuditLog" (
|
||||
"id" TEXT NOT NULL,
|
||||
"brandId" TEXT NOT NULL,
|
||||
"capabilityKey" TEXT NOT NULL,
|
||||
"actorId" TEXT NOT NULL,
|
||||
"action" TEXT NOT NULL,
|
||||
"fromStatus" TEXT,
|
||||
"toStatus" TEXT NOT NULL,
|
||||
"config" JSONB,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "CapabilityAuditLog_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "CapabilityAuditLog_brandId_capabilityKey_createdAt_idx" ON "CapabilityAuditLog"("brandId", "capabilityKey", "createdAt");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CapabilityAuditLog" ADD CONSTRAINT "CapabilityAuditLog_brandId_fkey" FOREIGN KEY ("brandId") REFERENCES "BrandProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in new issue
Block a user