/*
  Warnings:

  - You are about to alter the column `close` on the `Slot` table. The data in that column could be lost. The data in that column will be cast from `VarChar` to `VarChar(1)`.
  - You are about to alter the column `open` on the `Slot` table. The data in that column could be lost. The data in that column will be cast from `VarChar` to `VarChar(1)`.

*/
-- DropForeignKey
ALTER TABLE "Slot" DROP CONSTRAINT "Slot_tenantId_fkey";

-- AlterTable
ALTER TABLE "Slot" ADD COLUMN     "userId" INTEGER,
ALTER COLUMN "tenantId" DROP NOT NULL,
ALTER COLUMN "close" SET DATA TYPE VARCHAR(5),
ALTER COLUMN "open" SET DATA TYPE VARCHAR(5);

-- AddForeignKey
ALTER TABLE "Slot" ADD CONSTRAINT "Slot_tenantId_fkey" FOREIGN KEY ("tenantId") REFERENCES "Tenant"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Slot" ADD CONSTRAINT "Slot_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
