/*
  Warnings:

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

*/
-- DropIndex
DROP INDEX `leads_origin_id_fkey` ON `leads`;

-- CreateIndex
CREATE UNIQUE INDEX `origins_name_key` ON `origins`(`name`);

-- AddForeignKey
ALTER TABLE `leads` ADD CONSTRAINT `leads_origin_id_fkey` FOREIGN KEY (`origin_id`) REFERENCES `origins`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
