-- DropForeignKey
ALTER TABLE `Lincense_Juridiction` DROP FOREIGN KEY `Lincense_Juridiction_lincense_id_fkey`;

-- DropForeignKey
ALTER TABLE `User_Installer_Types` DROP FOREIGN KEY `User_Installer_Types_type_id_fkey`;

-- DropForeignKey
ALTER TABLE `User_Installer_Types` DROP FOREIGN KEY `User_Installer_Types_user_id_fkey`;

-- AddForeignKey
ALTER TABLE `Lincense_Juridiction` ADD CONSTRAINT `Lincense_Juridiction_lincense_id_fkey` FOREIGN KEY (`lincense_id`) REFERENCES `Lincenses`(`lincense_id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `User_Installer_Types` ADD CONSTRAINT `User_Installer_Types_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `Users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `User_Installer_Types` ADD CONSTRAINT `User_Installer_Types_type_id_fkey` FOREIGN KEY (`type_id`) REFERENCES `Installer_Types`(`installer_type_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
