/*
  Warnings:

  - A unique constraint covering the columns `[ad_id,user_id]` on the table `AdsReach` will be added. If there are existing duplicate values, this will fail.

*/
-- DropIndex
DROP INDEX "AdsReach_user_id_key";

-- CreateIndex
CREATE UNIQUE INDEX "AdsReach_ad_id_user_id_key" ON "AdsReach"("ad_id", "user_id");

-- AddForeignKey
ALTER TABLE "AdsReach" ADD CONSTRAINT "AdsReach_ad_id_fkey" FOREIGN KEY ("ad_id") REFERENCES "Ads"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
