-- AlterTable
ALTER TABLE `MobileContractDetails` ADD COLUMN `requiresMultisim` BOOLEAN NOT NULL DEFAULT false;

-- CreateTable
CREATE TABLE `SimCard` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `mobileDetailsId` INTEGER NOT NULL,
    `phoneNumber` VARCHAR(191) NULL,
    `simCardNumber` VARCHAR(191) NULL,
    `pin` VARCHAR(191) NULL,
    `puk` VARCHAR(191) NULL,
    `isMultisim` BOOLEAN NOT NULL DEFAULT false,
    `isMain` BOOLEAN NOT NULL DEFAULT false,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

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

-- AddForeignKey
ALTER TABLE `SimCard` ADD CONSTRAINT `SimCard_mobileDetailsId_fkey` FOREIGN KEY (`mobileDetailsId`) REFERENCES `MobileContractDetails`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
