-- CreateTable
CREATE TABLE `BlockedNumber` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `number` VARCHAR(191) NOT NULL,
    `reason` VARCHAR(191) NULL,
    `blockedBy` INTEGER NOT NULL,
    `blockedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),

    UNIQUE INDEX `BlockedNumber_number_key`(`number`),
    INDEX `BlockedNumber_number_idx`(`number`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `BlockedNumber` ADD CONSTRAINT `BlockedNumber_blockedBy_fkey` FOREIGN KEY (`blockedBy`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
