-- AlterTable
ALTER TABLE `Publisher` MODIFY `role` ENUM('ADMIN', 'POWERUSER', 'USER', 'EXTERNAL') NOT NULL DEFAULT 'USER';

-- CreateTable
CREATE TABLE `Report` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `date` DATETIME(3) NOT NULL,
    `publisherId` VARCHAR(191) NOT NULL,
    `assignmentId` INTEGER NOT NULL,
    `placementCount` INTEGER NOT NULL,
    `videoCount` INTEGER NOT NULL,
    `returnVisitInfoCount` INTEGER NOT NULL,
    `conversationCount` INTEGER NOT NULL,
    `experienceInfo` VARCHAR(191) NOT NULL,

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

-- AddForeignKey
ALTER TABLE `Report` ADD CONSTRAINT `Report_publisherId_fkey` FOREIGN KEY (`publisherId`) REFERENCES `Publisher`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Report` ADD CONSTRAINT `Report_assignmentId_fkey` FOREIGN KEY (`assignmentId`) REFERENCES `Assignment`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
