/*
  Warnings:

  - You are about to drop the `User_Qualifications_Jurisdictions` table. If the table is not empty, all the data it contains will be lost.

*/
-- DropForeignKey
ALTER TABLE `User_Qualifications_Jurisdictions` DROP FOREIGN KEY `User_Qualifications_Jurisdictions_country_id_fkey`;

-- DropForeignKey
ALTER TABLE `User_Qualifications_Jurisdictions` DROP FOREIGN KEY `User_Qualifications_Jurisdictions_educational_qualification_fkey`;

-- DropForeignKey
ALTER TABLE `User_Qualifications_Jurisdictions` DROP FOREIGN KEY `User_Qualifications_Jurisdictions_professional_qualificatio_fkey`;

-- DropTable
DROP TABLE `User_Qualifications_Jurisdictions`;

-- CreateTable
CREATE TABLE `Professional_Qualifications_Jurisdictions` (
    `professional_qualification_jurisdiction_id` VARCHAR(191) NOT NULL,
    `country_id` VARCHAR(191) NOT NULL,
    `professional_qualification_id` VARCHAR(191) NOT NULL,

    PRIMARY KEY (`professional_qualification_jurisdiction_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Educational_Qualifications_Jurisdictions` (
    `educational_qualifications_jurisdiction_id` VARCHAR(191) NOT NULL,
    `country_id` VARCHAR(191) NOT NULL,
    `educational_qualification_id` VARCHAR(191) NOT NULL,

    PRIMARY KEY (`educational_qualifications_jurisdiction_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `Professional_Qualifications_Jurisdictions` ADD CONSTRAINT `Professional_Qualifications_Jurisdictions_country_id_fkey` FOREIGN KEY (`country_id`) REFERENCES `Country`(`country_id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Professional_Qualifications_Jurisdictions` ADD CONSTRAINT `Professional_Qualifications_Jurisdictions_professional_qual_fkey` FOREIGN KEY (`professional_qualification_id`) REFERENCES `Professional_Qualifications`(`pro_qualification_id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Educational_Qualifications_Jurisdictions` ADD CONSTRAINT `Educational_Qualifications_Jurisdictions_country_id_fkey` FOREIGN KEY (`country_id`) REFERENCES `Country`(`country_id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Educational_Qualifications_Jurisdictions` ADD CONSTRAINT `Educational_Qualifications_Jurisdictions_educational_qualif_fkey` FOREIGN KEY (`educational_qualification_id`) REFERENCES `Educational_Qualifications`(`edu_qualification_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
