because I got bored of customising my CV for every job
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(server): add database migrations for applications, vacancies, and enhancements

+132
+3
apps/server/prisma/migrations/20251026160424_rename_user_organizations_to_memberships/migration.sql
··· 1 + -- AlterTable: Rename user_organizations table to memberships 2 + ALTER TABLE "user_organizations" RENAME TO "memberships"; 3 +
+41
apps/server/prisma/migrations/20251026203330_refactor_cv_and_vacancy_entities/migration.sql
··· 1 + /* 2 + Warnings: 3 + 4 + - You are about to drop the column `company` on the `vacancies` table. All the data in the column will be lost. 5 + - You are about to drop the column `jobType` on the `vacancies` table. All the data in the column will be lost. 6 + - Added the required column `companyId` to the `vacancies` table without a default value. This is not possible if the table is not empty. 7 + - Added the required column `roleId` to the `vacancies` table without a default value. This is not possible if the table is not empty. 8 + 9 + */ 10 + -- AlterTable 11 + ALTER TABLE "vacancies" DROP COLUMN "company", 12 + DROP COLUMN "jobType", 13 + ADD COLUMN "companyId" TEXT NOT NULL, 14 + ADD COLUMN "levelId" TEXT, 15 + ADD COLUMN "roleId" TEXT NOT NULL; 16 + 17 + -- CreateTable 18 + CREATE TABLE "_SkillToVacancy" ( 19 + "A" TEXT NOT NULL, 20 + "B" TEXT NOT NULL, 21 + 22 + CONSTRAINT "_SkillToVacancy_AB_pkey" PRIMARY KEY ("A","B") 23 + ); 24 + 25 + -- CreateIndex 26 + CREATE INDEX "_SkillToVacancy_B_index" ON "_SkillToVacancy"("B"); 27 + 28 + -- AddForeignKey 29 + ALTER TABLE "vacancies" ADD CONSTRAINT "vacancies_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "companies"("id") ON DELETE CASCADE ON UPDATE CASCADE; 30 + 31 + -- AddForeignKey 32 + ALTER TABLE "vacancies" ADD CONSTRAINT "vacancies_roleId_fkey" FOREIGN KEY ("roleId") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE CASCADE; 33 + 34 + -- AddForeignKey 35 + ALTER TABLE "vacancies" ADD CONSTRAINT "vacancies_levelId_fkey" FOREIGN KEY ("levelId") REFERENCES "levels"("id") ON DELETE CASCADE ON UPDATE CASCADE; 36 + 37 + -- AddForeignKey 38 + ALTER TABLE "_SkillToVacancy" ADD CONSTRAINT "_SkillToVacancy_A_fkey" FOREIGN KEY ("A") REFERENCES "skills"("id") ON DELETE CASCADE ON UPDATE CASCADE; 39 + 40 + -- AddForeignKey 41 + ALTER TABLE "_SkillToVacancy" ADD CONSTRAINT "_SkillToVacancy_B_fkey" FOREIGN KEY ("B") REFERENCES "vacancies"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+19
apps/server/prisma/migrations/20251026203431_add_job_type_entity/migration.sql
··· 1 + -- AlterTable 2 + ALTER TABLE "vacancies" ADD COLUMN "jobTypeId" TEXT; 3 + 4 + -- CreateTable 5 + CREATE TABLE "job_types" ( 6 + "id" TEXT NOT NULL, 7 + "name" TEXT NOT NULL, 8 + "description" TEXT, 9 + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 10 + "updatedAt" TIMESTAMP(3) NOT NULL, 11 + 12 + CONSTRAINT "job_types_pkey" PRIMARY KEY ("id") 13 + ); 14 + 15 + -- CreateIndex 16 + CREATE UNIQUE INDEX "job_types_name_key" ON "job_types"("name"); 17 + 18 + -- AddForeignKey 19 + ALTER TABLE "vacancies" ADD CONSTRAINT "vacancies_jobTypeId_fkey" FOREIGN KEY ("jobTypeId") REFERENCES "job_types"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+12
apps/server/prisma/migrations/20251026203550_add_vacancy_owner_and_public/migration.sql
··· 1 + /* 2 + Warnings: 3 + 4 + - Added the required column `ownerId` to the `vacancies` table without a default value. This is not possible if the table is not empty. 5 + 6 + */ 7 + -- AlterTable 8 + ALTER TABLE "vacancies" ADD COLUMN "isPublic" BOOLEAN NOT NULL DEFAULT false, 9 + ADD COLUMN "ownerId" TEXT NOT NULL; 10 + 11 + -- AddForeignKey 12 + ALTER TABLE "vacancies" ADD CONSTRAINT "vacancies_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+11
apps/server/prisma/migrations/20251026204357_remove_userid_from_vacancy/migration.sql
··· 1 + /* 2 + Warnings: 3 + 4 + - You are about to drop the column `userId` on the `vacancies` table. All the data in the column will be lost. 5 + 6 + */ 7 + -- DropForeignKey 8 + ALTER TABLE "public"."vacancies" DROP CONSTRAINT "vacancies_userId_fkey"; 9 + 10 + -- AlterTable 11 + ALTER TABLE "vacancies" DROP COLUMN "userId";
+12
apps/server/prisma/migrations/20251026204432_add_application_status_enum/migration.sql
··· 1 + /* 2 + Warnings: 3 + 4 + - The `status` column on the `applications` table would be dropped and recreated. This will lead to data loss if there is data in the column. 5 + 6 + */ 7 + -- CreateEnum 8 + CREATE TYPE "ApplicationStatus" AS ENUM ('PENDING', 'ACCEPTED', 'REJECTED', 'WITHDRAWN'); 9 + 10 + -- AlterTable 11 + ALTER TABLE "applications" DROP COLUMN "status", 12 + ADD COLUMN "status" "ApplicationStatus" NOT NULL DEFAULT 'PENDING';
+30
apps/server/prisma/migrations/20251026204631_add_application_status_entity/migration.sql
··· 1 + /* 2 + Warnings: 3 + 4 + - You are about to drop the column `status` on the `applications` table. All the data in the column will be lost. 5 + - Added the required column `statusId` to the `applications` table without a default value. This is not possible if the table is not empty. 6 + 7 + */ 8 + -- AlterTable 9 + ALTER TABLE "applications" DROP COLUMN "status", 10 + ADD COLUMN "statusId" TEXT NOT NULL; 11 + 12 + -- DropEnum 13 + DROP TYPE "public"."ApplicationStatus"; 14 + 15 + -- CreateTable 16 + CREATE TABLE "application_statuses" ( 17 + "id" TEXT NOT NULL, 18 + "name" TEXT NOT NULL, 19 + "description" TEXT, 20 + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 21 + "updatedAt" TIMESTAMP(3) NOT NULL, 22 + 23 + CONSTRAINT "application_statuses_pkey" PRIMARY KEY ("id") 24 + ); 25 + 26 + -- CreateIndex 27 + CREATE UNIQUE INDEX "application_statuses_name_key" ON "application_statuses"("name"); 28 + 29 + -- AddForeignKey 30 + ALTER TABLE "applications" ADD CONSTRAINT "applications_statusId_fkey" FOREIGN KEY ("statusId") REFERENCES "application_statuses"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
+2
apps/server/prisma/migrations/20251029130211_add_min_max_salary/migration.sql
··· 1 + ALTER TABLE "vacancies" ADD COLUMN "minSalary" INTEGER; 2 + ALTER TABLE "vacancies" ADD COLUMN "maxSalary" INTEGER;
+2
apps/server/prisma/migrations/20251029135936_migrate_salary_to_min_max/migration.sql
··· 1 + -- Drop the salary column since we now use minSalary and maxSalary 2 + ALTER TABLE "vacancies" DROP COLUMN "salary";