-- CreateTable
CREATE TABLE "remittance_payments" (
    "id" TEXT NOT NULL,
    "remittanceId" TEXT NOT NULL,
    "paymentId" TEXT NOT NULL,

    CONSTRAINT "remittance_payments_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "remittance_payments_remittanceId_paymentId_key" ON "remittance_payments"("remittanceId", "paymentId");

-- AddForeignKey
ALTER TABLE "remittance_payments" ADD CONSTRAINT "remittance_payments_remittanceId_fkey" FOREIGN KEY ("remittanceId") REFERENCES "remittances"("id") ON DELETE CASCADE ON UPDATE CASCADE;
