12345678910111213141516171819 |
- -- CreateTable
- CREATE TABLE "executives_histories" (
- "id" TEXT NOT NULL,
- "hospital_id" TEXT NOT NULL,
- "executive_name" TEXT,
- "contact" TEXT,
- "status" TEXT,
- "start_term" TIMESTAMP(3),
- "end_term" TIMESTAMP(3),
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
- "updatedAt" TIMESTAMP(3) NOT NULL,
- "deletedAt" TIMESTAMP(3),
- CONSTRAINT "executives_histories_pkey" PRIMARY KEY ("id")
- );
- -- AddForeignKey
- ALTER TABLE "executives_histories" ADD CONSTRAINT "executives_histories_hospital_id_fkey" FOREIGN KEY ("hospital_id") REFERENCES "hospitals"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|