-- DropIndex
DROP INDEX `bagmons_categoryId_fkey` ON `bagmons`;

-- DropIndex
DROP INDEX `bagmons_type1Id_fkey` ON `bagmons`;

-- DropIndex
DROP INDEX `bagmons_type2Id_fkey` ON `bagmons`;

-- DropIndex
DROP INDEX `users_regionId_fkey` ON `users`;

-- AlterTable
ALTER TABLE `users` MODIFY `picture` VARCHAR(382) NOT NULL;

-- AddForeignKey
ALTER TABLE `users` ADD CONSTRAINT `users_regionId_fkey` FOREIGN KEY (`regionId`) REFERENCES `Region`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `credentials` ADD CONSTRAINT `credentials_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Data` ADD CONSTRAINT `Data_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `bagmons` ADD CONSTRAINT `bagmons_type1Id_fkey` FOREIGN KEY (`type1Id`) REFERENCES `Type`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `bagmons` ADD CONSTRAINT `bagmons_type2Id_fkey` FOREIGN KEY (`type2Id`) REFERENCES `Type`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `bagmons` ADD CONSTRAINT `bagmons_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Category`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

