Skip to content

Commit

Permalink
[fix]: wrong company image placeholder url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VineeTagarwaL-code committed Oct 16, 2024
1 parent 5b24e29 commit aee51e6
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
42 changes: 42 additions & 0 deletions prisma/migrations/20241014172510_job_upate/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-- AlterEnum
ALTER TYPE "Role" ADD VALUE 'HR';

-- 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;
31 changes: 31 additions & 0 deletions prisma/migrations/20241016110618_expiry_job/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Warnings:
- You are about to drop the column `onBoard` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `resume` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `skills` on the `User` table. All the data in the column will be lost.
- You are about to drop the `Experience` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `Project` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "Experience" DROP CONSTRAINT "Experience_userId_fkey";

-- DropForeignKey
ALTER TABLE "Project" DROP CONSTRAINT "Project_userId_fkey";

-- AlterTable
ALTER TABLE "Job" ADD COLUMN "expired" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "expiryDate" TIMESTAMP(3),
ADD COLUMN "has_expiry_date" BOOLEAN NOT NULL DEFAULT false;

-- AlterTable
ALTER TABLE "User" DROP COLUMN "onBoard",
DROP COLUMN "resume",
DROP COLUMN "skills";

-- DropTable
DROP TABLE "Experience";

-- DropTable
DROP TABLE "Project";
2 changes: 1 addition & 1 deletion src/components/job-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const PostJobForm = () => {

const handleFormSubmit = async (data: JobPostSchemaType) => {
try {
data.companyLogo = (await submitImage(file)) ?? 'https://www.example.com';
data.companyLogo = (await submitImage(file)) ?? '/main.svg';
const response = await createJob(data);

if (!response.status) {
Expand Down

0 comments on commit aee51e6

Please sign in to comment.