Add functions to commission form
This commit is contained in:
24
prisma/migrations/20260101072430_com_3/migration.sql
Normal file
24
prisma/migrations/20260101072430_com_3/migration.sql
Normal file
@ -0,0 +1,24 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "CommissionRequest" ADD COLUMN "customFields" JSONB,
|
||||
ADD COLUMN "customerSocials" TEXT,
|
||||
ADD COLUMN "ipAddress" TEXT,
|
||||
ADD COLUMN "status" TEXT NOT NULL DEFAULT 'NEW',
|
||||
ADD COLUMN "userAgent" TEXT;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "CommissionRequestFile" (
|
||||
"id" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
"sortIndex" INTEGER NOT NULL DEFAULT 0,
|
||||
"objectKey" TEXT NOT NULL,
|
||||
"originalName" TEXT NOT NULL,
|
||||
"mimeType" TEXT NOT NULL,
|
||||
"sizeBytes" INTEGER NOT NULL,
|
||||
"requestId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "CommissionRequestFile_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CommissionRequestFile" ADD CONSTRAINT "CommissionRequestFile_requestId_fkey" FOREIGN KEY ("requestId") REFERENCES "CommissionRequest"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
30
prisma/migrations/20260101072657_com_4/migration.sql
Normal file
30
prisma/migrations/20260101072657_com_4/migration.sql
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `mimeType` on the `CommissionRequestFile` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `objectKey` on the `CommissionRequestFile` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `originalName` on the `CommissionRequestFile` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `sizeBytes` on the `CommissionRequestFile` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `sortIndex` on the `CommissionRequestFile` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[fileKey]` on the table `CommissionRequestFile` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `fileKey` to the `CommissionRequestFile` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `fileSize` to the `CommissionRequestFile` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `fileType` to the `CommissionRequestFile` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `originalFile` to the `CommissionRequestFile` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `uploadDate` to the `CommissionRequestFile` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "CommissionRequestFile" DROP COLUMN "mimeType",
|
||||
DROP COLUMN "objectKey",
|
||||
DROP COLUMN "originalName",
|
||||
DROP COLUMN "sizeBytes",
|
||||
DROP COLUMN "sortIndex",
|
||||
ADD COLUMN "fileKey" TEXT NOT NULL,
|
||||
ADD COLUMN "fileSize" INTEGER NOT NULL,
|
||||
ADD COLUMN "fileType" TEXT NOT NULL,
|
||||
ADD COLUMN "originalFile" TEXT NOT NULL,
|
||||
ADD COLUMN "uploadDate" TIMESTAMP(3) NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "CommissionRequestFile_fileKey_key" ON "CommissionRequestFile"("fileKey");
|
||||
Reference in New Issue
Block a user