Social handles CRUD (admin side, nothing user-facing)
This commit is contained in:
12
api/db/migrations/20240819213158_social/migration.sql
Normal file
12
api/db/migrations/20240819213158_social/migration.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "Handle" AS ENUM ('x', 'threads', 'instagram', 'facebook', 'tiktok', 'youtube', 'linkedin', 'github', 'email', 'custom');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Social" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"type" "Handle" NOT NULL,
|
||||
"username" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "Social_pkey" PRIMARY KEY ("id")
|
||||
);
|
@ -14,6 +14,19 @@ generator client {
|
||||
binaryTargets = "native"
|
||||
}
|
||||
|
||||
enum Handle {
|
||||
x
|
||||
threads
|
||||
instagram
|
||||
facebook
|
||||
tiktok
|
||||
youtube
|
||||
linkedin
|
||||
github
|
||||
email
|
||||
custom
|
||||
}
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
username String @unique
|
||||
@ -23,3 +36,10 @@ model User {
|
||||
resetToken String?
|
||||
resetTokenExpiresAt DateTime?
|
||||
}
|
||||
|
||||
model Social {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
type Handle
|
||||
username String
|
||||
}
|
||||
|
Reference in New Issue
Block a user