-- AlterTable ALTER TABLE "atendimentos" ADD COLUMN "atendimentoInicialId" UUID; -- CreateIndex CREATE INDEX "atendimentos_atendimentoInicialId_idx" ON "atendimentos"("atendimentoInicialId"); -- AddForeignKey ALTER TABLE "atendimentos" ADD CONSTRAINT "atendimentos_atendimentoInicialId_fkey" FOREIGN KEY ("atendimentoInicialId") REFERENCES "atendimentos"("id") ON DELETE SET NULL ON UPDATE CASCADE;