-- CreateTable
CREATE TABLE `vacancy_benefits` (
    `id` VARCHAR(191) NOT NULL,
    `id_vacancy` VARCHAR(191) NOT NULL,
    `id_benefit` VARCHAR(191) NOT NULL,

    UNIQUE INDEX `vacancy_benefits_id_vacancy_id_benefit_key`(`id_vacancy`, `id_benefit`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `vacancy_benefits` ADD CONSTRAINT `vacancy_benefits_id_vacancy_fkey` FOREIGN KEY (`id_vacancy`) REFERENCES `vacancies`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `vacancy_benefits` ADD CONSTRAINT `vacancy_benefits_id_benefit_fkey` FOREIGN KEY (`id_benefit`) REFERENCES `benefits`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
