/*
  Warnings:

  - A unique constraint covering the columns `[email]` on the table `subscription` will be added. If there are existing duplicate values, this will fail.

*/
-- DropForeignKey
ALTER TABLE `subscription` DROP FOREIGN KEY `subscription_studentId_fkey`;

-- AlterTable
ALTER TABLE `subscription` ADD COLUMN `email` VARCHAR(191) NULL,
    MODIFY `studentId` VARCHAR(191) NULL;

-- CreateIndex
CREATE UNIQUE INDEX `subscription_email_key` ON `subscription`(`email`);

-- AddForeignKey
ALTER TABLE `subscription` ADD CONSTRAINT `subscription_studentId_fkey` FOREIGN KEY (`studentId`) REFERENCES `student`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
