123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- Warnings:
- - You are about to drop the column `simrs_type` on the `hospitals` table. All the data in the column will be lost.
- - You are about to drop the `vendor_histories` table. If the table is not empty, all the data it contains will be lost.
- */
- -- DropForeignKey
- ALTER TABLE "vendor_histories" DROP CONSTRAINT "vendor_histories_hospital_id_fkey";
- -- DropForeignKey
- ALTER TABLE "vendor_histories" DROP CONSTRAINT "vendor_histories_vendor_id_fkey";
- -- AlterTable
- ALTER TABLE "hospitals" DROP COLUMN "simrs_type";
- -- DropTable
- DROP TABLE "vendor_histories";
- -- CreateTable
- CREATE TABLE "vendor_experiences" (
- "id" TEXT NOT NULL,
- "hospital_id" TEXT NOT NULL,
- "vendor_id" TEXT,
- "status" TEXT,
- "contract_start_date" TIMESTAMP(3),
- "contract_expired_date" TIMESTAMP(3),
- "contract_value_min" BIGINT,
- "contract_value_max" BIGINT,
- "positive_notes" TEXT,
- "negative_notes" TEXT,
- "simrs_type" TEXT NOT NULL,
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
- "updatedAt" TIMESTAMP(3) NOT NULL,
- "deletedAt" TIMESTAMP(3),
- CONSTRAINT "vendor_experiences_pkey" PRIMARY KEY ("id")
- );
- -- AddForeignKey
- ALTER TABLE "vendor_experiences" ADD CONSTRAINT "vendor_experiences_hospital_id_fkey" FOREIGN KEY ("hospital_id") REFERENCES "hospitals"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
- -- AddForeignKey
- ALTER TABLE "vendor_experiences" ADD CONSTRAINT "vendor_experiences_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|