diff --git a/prisma/migrations/20230427033108_make_username_unique/migration.sql b/prisma/migrations/20230427033108_make_username_unique/migration.sql new file mode 100644 index 0000000..54942a5 --- /dev/null +++ b/prisma/migrations/20230427033108_make_username_unique/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - A unique constraint covering the columns `[username]` on the table `User` will be added. If there are existing duplicate values, this will fail. + +*/ +-- CreateIndex +CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6699e0c..fcf95a9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -18,7 +18,7 @@ model AuthTicket { model User { id Int @id @default(autoincrement()) - username String? + username String? @unique authTicket AuthTicket? discordAuth DiscordAuth? diff --git a/src/app/me/AboutMe.tsx b/src/app/me/AboutMe.tsx index 85df785..b921c5f 100644 --- a/src/app/me/AboutMe.tsx +++ b/src/app/me/AboutMe.tsx @@ -226,6 +226,14 @@ export default function AboutMe({ info }: { info: UserInfo }) { )} + +
discord: {info.discordId}
+github: {info.githubId}
+