daphnis/prisma/migrations/20240624150915_auth/migration.sql

17 lines
631 B
MySQL
Raw Normal View History

2024-06-29 05:22:22 +00:00
/*
Warnings:
- You are about to drop the column `userId` on the `session` table. All the data in the column will be lost.
- Added the required column `InvitedBy` to the `Session` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE `session` DROP FOREIGN KEY `Session_userId_fkey`;
-- AlterTable
ALTER TABLE `session` DROP COLUMN `userId`,
ADD COLUMN `InvitedBy` VARCHAR(191) NOT NULL;
-- AddForeignKey
ALTER TABLE `Session` ADD CONSTRAINT `Session_InvitedBy_fkey` FOREIGN KEY (`InvitedBy`) REFERENCES `User`(`username`) ON DELETE CASCADE ON UPDATE CASCADE;