diff --git a/prisma/migrations/20241015192257_added_cascading_job/migration.sql b/prisma/migrations/20241015192257_added_cascading_job/migration.sql index 5eb5dd5e..11394917 100644 --- a/prisma/migrations/20241015192257_added_cascading_job/migration.sql +++ b/prisma/migrations/20241015192257_added_cascading_job/migration.sql @@ -1,5 +1,3 @@ --- AlterEnum -ALTER TYPE "Role" ADD VALUE 'HR'; -- DropForeignKey ALTER TABLE "Job" DROP CONSTRAINT "Job_userId_fkey"; diff --git a/prisma/migrations/20241019174425_add_onboar_field/migration.sql b/prisma/migrations/20241019174425_add_onboar_field/migration.sql new file mode 100644 index 00000000..f904d07a --- /dev/null +++ b/prisma/migrations/20241019174425_add_onboar_field/migration.sql @@ -0,0 +1,39 @@ +-- AlterTable +ALTER TABLE "User" ADD COLUMN "onBoard" BOOLEAN NOT NULL DEFAULT false, +ADD COLUMN "resume" TEXT, +ADD COLUMN "skills" TEXT[]; + +-- CreateTable +CREATE TABLE "Experience" ( + "id" SERIAL NOT NULL, + "companyName" TEXT NOT NULL, + "designation" TEXT NOT NULL, + "EmploymentType" "EmployementType" NOT NULL, + "address" TEXT NOT NULL, + "workMode" "WorkMode" NOT NULL, + "currentWorkStatus" BOOLEAN NOT NULL, + "startDate" TIMESTAMP(3) NOT NULL, + "endDate" TIMESTAMP(3), + "description" TEXT NOT NULL, + "userId" TEXT NOT NULL, + + CONSTRAINT "Experience_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Project" ( + "id" SERIAL NOT NULL, + "projectName" TEXT NOT NULL, + "projectSummary" TEXT NOT NULL, + "projectLiveLink" TEXT, + "projectGithub" TEXT NOT NULL, + "userId" TEXT NOT NULL, + + CONSTRAINT "Project_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "Experience" ADD CONSTRAINT "Experience_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Project" ADD CONSTRAINT "Project_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/src/app/create-profile/page.tsx b/src/app/create-profile/page.tsx index 9dbc412a..420c20e8 100644 --- a/src/app/create-profile/page.tsx +++ b/src/app/create-profile/page.tsx @@ -9,7 +9,7 @@ export default async function Home() { if (session.user.onBoard === true) redirect('/jobs'); return (