-- DropForeignKey
ALTER TABLE "public"."projects" DROP CONSTRAINT "projects_pocId_fkey";

-- DropForeignKey
ALTER TABLE "public"."approvals" DROP CONSTRAINT "approvals_requestedById_fkey";

-- DropForeignKey
ALTER TABLE "public"."activities" DROP CONSTRAINT "activities_userId_fkey";

-- DropForeignKey
ALTER TABLE "public"."notifications" DROP CONSTRAINT "notifications_userId_fkey";

-- AlterTable
ALTER TABLE "public"."projects" ALTER COLUMN "pocId" SET NOT NULL;

-- AlterTable
ALTER TABLE "public"."notifications" ALTER COLUMN "userId" SET NOT NULL;

-- AddForeignKey
ALTER TABLE "public"."activities" ADD CONSTRAINT "activities_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "public"."approvals" ADD CONSTRAINT "approvals_requestedById_fkey" FOREIGN KEY ("requestedById") REFERENCES "public"."users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "public"."projects" ADD CONSTRAINT "projects_pocId_fkey" FOREIGN KEY ("pocId") REFERENCES "public"."users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

