···11+/*
22+ Warnings:
33+44+ - You are about to drop the column `name` on the `educations` table. All the data in the column will be lost.
55+ - You are about to drop the `user_educations` table. If the table is not empty, all the data it contains will be lost.
66+ - Added the required column `degree` to the `educations` table without a default value. This is not possible if the table is not empty.
77+ - Added the required column `institutionId` to the `educations` table without a default value. This is not possible if the table is not empty.
88+ - Added the required column `startDate` to the `educations` table without a default value. This is not possible if the table is not empty.
99+ - Added the required column `userId` to the `educations` table without a default value. This is not possible if the table is not empty.
1010+1111+*/
1212+-- DropForeignKey
1313+ALTER TABLE "public"."user_educations" DROP CONSTRAINT "user_educations_cvId_fkey";
1414+1515+-- DropForeignKey
1616+ALTER TABLE "public"."user_educations" DROP CONSTRAINT "user_educations_institutionId_fkey";
1717+1818+-- DropForeignKey
1919+ALTER TABLE "public"."user_educations" DROP CONSTRAINT "user_educations_userId_fkey";
2020+2121+-- DropIndex
2222+DROP INDEX "public"."educations_name_key";
2323+2424+-- AlterTable
2525+ALTER TABLE "educations" DROP COLUMN "name",
2626+ADD COLUMN "cvId" TEXT,
2727+ADD COLUMN "degree" TEXT NOT NULL,
2828+ADD COLUMN "endDate" TIMESTAMP(3),
2929+ADD COLUMN "fieldOfStudy" TEXT,
3030+ADD COLUMN "institutionId" TEXT NOT NULL,
3131+ADD COLUMN "startDate" TIMESTAMP(3) NOT NULL,
3232+ADD COLUMN "userId" TEXT NOT NULL;
3333+3434+-- DropTable
3535+DROP TABLE "public"."user_educations";
3636+3737+-- CreateTable
3838+CREATE TABLE "institutions" (
3939+ "id" TEXT NOT NULL,
4040+ "name" TEXT NOT NULL,
4141+ "description" TEXT,
4242+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
4343+ "updatedAt" TIMESTAMP(3) NOT NULL,
4444+4545+ CONSTRAINT "institutions_pkey" PRIMARY KEY ("id")
4646+);
4747+4848+-- CreateIndex
4949+CREATE UNIQUE INDEX "institutions_name_key" ON "institutions"("name");
5050+5151+-- AddForeignKey
5252+ALTER TABLE "educations" ADD CONSTRAINT "educations_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
5353+5454+-- AddForeignKey
5555+ALTER TABLE "educations" ADD CONSTRAINT "educations_cvId_fkey" FOREIGN KEY ("cvId") REFERENCES "cvs"("id") ON DELETE CASCADE ON UPDATE CASCADE;
5656+5757+-- AddForeignKey
5858+ALTER TABLE "educations" ADD CONSTRAINT "educations_institutionId_fkey" FOREIGN KEY ("institutionId") REFERENCES "institutions"("id") ON DELETE CASCADE ON UPDATE CASCADE;
···11+/*
22+ Warnings:
33+44+ - You are about to drop the column `cvId` on the `educations` table. All the data in the column will be lost.
55+66+*/
77+-- DropForeignKey
88+ALTER TABLE "public"."educations" DROP CONSTRAINT "educations_cvId_fkey";
99+1010+-- AlterTable
1111+ALTER TABLE "educations" DROP COLUMN "cvId";