Youtube handle try, not working, user input for it.

This commit is contained in:
EdiFarcas
2025-04-28 15:26:52 +03:00
parent 7f744e1e9f
commit 7c4707d677
6 changed files with 158 additions and 18 deletions
@@ -0,0 +1,16 @@
/*
Warnings:
- You are about to drop the column `youtubeId` on the `User` table. All the data in the column will be lost.
- A unique constraint covering the columns `[youtubeUsername]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- DropIndex
DROP INDEX "User_youtubeId_key";
-- AlterTable
ALTER TABLE "User" DROP COLUMN "youtubeId",
ADD COLUMN "youtubeUsername" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "User_youtubeUsername_key" ON "User"("youtubeUsername");
@@ -0,0 +1,16 @@
/*
Warnings:
- A unique constraint covering the columns `[youtubeHandle]` on the table `User` will be added. If there are existing duplicate values, this will fail.
- A unique constraint covering the columns `[youtubeChannelId]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- AlterTable
ALTER TABLE "User" ADD COLUMN "youtubeChannelId" TEXT,
ADD COLUMN "youtubeHandle" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "User_youtubeHandle_key" ON "User"("youtubeHandle");
-- CreateIndex
CREATE UNIQUE INDEX "User_youtubeChannelId_key" ON "User"("youtubeChannelId");
+12 -10
View File
@@ -8,16 +8,18 @@ generator client {
}
model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
accounts Account[]
sessions Session[]
youtubeId String? @unique
coins Int @default(0)
entries Entry[]
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
accounts Account[]
sessions Session[]
youtubeUsername String? @unique
youtubeHandle String? @unique
youtubeChannelId String? @unique
coins Int @default(0)
entries Entry[]
}
model Account {