-- DropForeignKey
ALTER TABLE `licenses` DROP FOREIGN KEY `licenses_partner_id_fkey`;

-- DropIndex
DROP INDEX `licenses_partner_id_fkey` ON `licenses`;

-- AlterTable
ALTER TABLE `consumers` ADD COLUMN `license_id` VARCHAR(191) NULL;

-- AlterTable
ALTER TABLE `licenses` MODIFY `partner_id` VARCHAR(191) NULL;

-- AddForeignKey
ALTER TABLE `consumers` ADD CONSTRAINT `consumers_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
