Skip to content

Commit 21d6d85

Browse files
committed
Fix Bugs
1 parent 5c844ff commit 21d6d85

File tree

9 files changed

+65
-58
lines changed

9 files changed

+65
-58
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
DATABASE_URL="mysql://ram:rambpandey238@localhost:3306/myspy"
1+
DATABASE_URL="postgres://postgres.xsrbyosoklzsusoxzzbc:rambpandey238@[email protected]:5432/postgres"
22
NEXTAUTH_URL = "http://localhost:3000"
33
NEXTAUTH_SECRET = "f1urvflDizvxJnLQhtb2veGtC46Lg4Pmm5xYqE/2LiM="

prisma/migrations/20240127045032_/migration.sql

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
-- CreateTable
2+
CREATE TABLE "User" (
3+
"id" TEXT NOT NULL,
4+
"name" TEXT,
5+
"password" TEXT NOT NULL,
6+
"emailId" TEXT NOT NULL,
7+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
8+
9+
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
10+
);
11+
12+
-- CreateTable
13+
CREATE TABLE "Persona" (
14+
"id" TEXT NOT NULL,
15+
"persona" TEXT NOT NULL,
16+
"userId" TEXT NOT NULL,
17+
18+
CONSTRAINT "Persona_pkey" PRIMARY KEY ("id")
19+
);
20+
21+
-- CreateTable
22+
CREATE TABLE "Project" (
23+
"id" TEXT NOT NULL,
24+
"personaId" TEXT NOT NULL,
25+
"projectName" TEXT NOT NULL,
26+
"minDesc" TEXT NOT NULL,
27+
"desc" TEXT NOT NULL,
28+
"hrefto" TEXT NOT NULL,
29+
30+
CONSTRAINT "Project_pkey" PRIMARY KEY ("id")
31+
);
32+
33+
-- CreateTable
34+
CREATE TABLE "Mails" (
35+
"id" TEXT NOT NULL,
36+
"userId" TEXT NOT NULL,
37+
"emailId" TEXT NOT NULL,
38+
"name" TEXT NOT NULL,
39+
40+
CONSTRAINT "Mails_pkey" PRIMARY KEY ("id")
41+
);
42+
43+
-- CreateIndex
44+
CREATE UNIQUE INDEX "User_emailId_key" ON "User"("emailId");
45+
46+
-- AddForeignKey
47+
ALTER TABLE "Persona" ADD CONSTRAINT "Persona_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
48+
49+
-- AddForeignKey
50+
ALTER TABLE "Project" ADD CONSTRAINT "Project_personaId_fkey" FOREIGN KEY ("personaId") REFERENCES "Persona"("id") ON DELETE CASCADE ON UPDATE CASCADE;
51+
52+
-- AddForeignKey
53+
ALTER TABLE "Mails" ADD CONSTRAINT "Mails_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

prisma/migrations/migration_lock.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Please do not edit this file manually
22
# It should be added in your version-control system (i.e. Git)
3-
provider = "mysql"
3+
provider = "postgresql"

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ generator client {
66
}
77

88
datasource db {
9-
provider = "mysql"
9+
provider = "postgresql"
1010
url = env("DATABASE_URL")
1111
}
1212

pushData.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const bcryptjs = require("bcryptjs");
77
data: {
88
name: "admin",
99
emailId: "[email protected]",
10-
password: bcryptjs.hashSync("admin", bcryptjs.genSaltSync(10)),
10+
password: bcryptjs.hashSync(
11+
"rambpandey238@madhusudhan",
12+
bcryptjs.genSaltSync(10)
13+
),
1114
},
1215
});
1316
})();

src/app/myComponents/ViewPersona.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function DialogDemo({ data, updater }) {
6767
<DialogHeader>
6868
<DialogTitle>Edit profile</DialogTitle>
6969
<DialogDescription>
70-
Make changes to your profile here. Click save when you're done.
70+
Make changes to your profile here. Click save when {"you're"} done.
7171
</DialogDescription>
7272
</DialogHeader>
7373
<div className="grid gap-4 py-4">

src/app/myComponents/ViewProjects.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function DialogDemo({ data, updater }) {
6363
<DialogHeader>
6464
<DialogTitle>Edit profile</DialogTitle>
6565
<DialogDescription>
66-
Make changes to your profile here. Click save when you're done.
66+
Make changes to your profile here. Click save when {"you're"} done.
6767
</DialogDescription>
6868
</DialogHeader>
6969
<form onSubmit={handleSubmit}>

src/app/myComponents/discoveries.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default function Discoveries({ header, desc, childDesc, hrefTo }) {
2222
<CardFooter className="flex justify-center">
2323
<Button>
2424
{" "}
25-
<Link href={hrefTo}>Read More</Link>{" "}
25+
<a href={hrefTo} target="_blank">
26+
Read More
27+
</a>{" "}
2628
</Button>
2729
</CardFooter>
2830
</Card>

0 commit comments

Comments
 (0)