/*
  Warnings:

  - You are about to drop the `Alert` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `Club` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `Feedback` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `LeaveRequest` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `Message` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `Resource` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `Survey` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `SurveyOption` table. If the table is not empty, all the data it contains will be lost.
  - A unique constraint covering the columns `[name,gradeId]` on the table `Class` will be added. If there are existing duplicate values, this will fail.

*/
-- DropForeignKey
ALTER TABLE "LeaveRequest" DROP CONSTRAINT "LeaveRequest_studentId_fkey";

-- DropForeignKey
ALTER TABLE "LeaveRequest" DROP CONSTRAINT "LeaveRequest_teacherId_fkey";

-- DropForeignKey
ALTER TABLE "Resource" DROP CONSTRAINT "Resource_subjectId_fkey";

-- DropForeignKey
ALTER TABLE "Resource" DROP CONSTRAINT "Resource_teacherId_fkey";

-- DropForeignKey
ALTER TABLE "SurveyOption" DROP CONSTRAINT "SurveyOption_surveyId_fkey";

-- DropIndex
DROP INDEX "Class_name_key";

-- DropTable
DROP TABLE "Alert";

-- DropTable
DROP TABLE "Club";

-- DropTable
DROP TABLE "Feedback";

-- DropTable
DROP TABLE "LeaveRequest";

-- DropTable
DROP TABLE "Message";

-- DropTable
DROP TABLE "Resource";

-- DropTable
DROP TABLE "Survey";

-- DropTable
DROP TABLE "SurveyOption";

-- DropEnum
DROP TYPE "LeaveStatus";

-- CreateIndex
CREATE UNIQUE INDEX "Class_name_gradeId_key" ON "Class"("name", "gradeId");
