From c754e7f03976537feb83ca440861177216a63dec Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 26 Apr 2026 12:00:00 +0700 Subject: [PATCH 01/42] =?UTF-8?q?=F0=9F=92=A5=20breaking:=20remove=20old?= =?UTF-8?q?=20prisma=20schema=20for=20new=20database=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 730 ------------------------------------------- 1 file changed, 730 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 808fddf..a02ff9d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -9,733 +9,3 @@ generator dbml { datasource db { provider = "postgresql" } - -model Media { - id String @id @db.Uuid - title String - titleAlternative Json - slug String @unique - malId Int? @unique - pictureMedium String - pictureLarge String - country Country @default(JP) - score Decimal @default(0.00) @db.Decimal(4, 2) - status String - startAiring DateTime? - endAiring DateTime? - synopsis String - ageRating String - mediaType MediaType - source String? - onDraft Boolean @default(true) - season Season? - yearReleased Int @db.SmallInt - uploadedBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - inCollections CollectionMedia[] @relation("CollectionMedia") - episodes Episode[] @relation("MediaEpisodes") - bannerPromotion HeroBanner[] @relation("MediaBannerPromotion") - logs MediaLog[] @relation("MediaLogs") - uploader User @relation("UserUploadedMedias", fields: [uploadedBy], references: [id]) - reviews MediaReview[] @relation("MediaReviews") - characters Character[] @relation("MediaCharacters") - genres Genre[] @relation("MediaGenres") - studios Studio[] @relation("MediaStudios") - - @@index([status, onDraft, deletedAt]) - @@index([mediaType]) - @@index([uploadedBy]) - @@index([createdAt]) - @@map("medias") -} - -model MediaLog { - id String @id @db.Uuid - status MediaOperation - approval Boolean @default(false) - proposedBy String @db.Uuid - approvedBy String @db.Uuid - mediaId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - approver User @relation("UserApprovedMedias", fields: [approvedBy], references: [id]) - media Media @relation("MediaLogs", fields: [mediaId], references: [id]) - proposer User @relation("UserProposedMedias", fields: [proposedBy], references: [id]) - - @@map("media_logs") -} - -model Genre { - id String @id @db.Uuid - name String @db.VarChar(255) - slug String @unique @db.VarChar(255) - malId Int @unique - malUrl String @db.VarChar(255) - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserCreatedGenres", fields: [createdBy], references: [id]) - medias Media[] @relation("MediaGenres") - user_favourite_genres UserPreference[] @relation("UserFavoriteGenres") - - @@map("genres") -} - -model Studio { - id String @id @db.Uuid - name String @db.VarChar(255) - slug String @unique @db.VarChar(255) - linkAbout String - malId Int @unique - logoUrl String? - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserCreatedStudios", fields: [createdBy], references: [id]) - medias Media[] @relation("MediaStudios") - - @@map("studios") -} - -model Character { - id String @id @db.Uuid - malId Int @unique - name String - role CharacterRole - favorites Int @default(0) - imageUrl String? - smallImageUrl String? - creatorId String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - createdBy User @relation("UserCreatedCharacters", fields: [creatorId], references: [id]) - voice_actors LangVAChar[] @relation("CharVALanguage") - medias Media[] @relation("MediaCharacters") - - @@map("characters") -} - -model VoiceActor { - id String @id @db.Uuid - malId Int @unique - name String - birthday DateTime? - description String? - aboutUrl String? - imageUrl String? - websiteUrl String? - creatorId String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - characters LangVAChar[] @relation("VACharLanguage") - createdBy User @relation("UserCreatedVoiceActors", fields: [creatorId], references: [id]) - - @@map("voice_actors") -} - -model LangVAChar { - id String @id @db.Uuid - language String - vaId String @db.Uuid - charId String @db.Uuid - creatorId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - character Character @relation("CharVALanguage", fields: [charId], references: [id]) - createdBy User @relation("UserCreatedLangVAChar", fields: [creatorId], references: [id]) - voiceActor VoiceActor @relation("VACharLanguage", fields: [vaId], references: [id]) - - @@unique([language, vaId, charId]) - @@map("lang_va_char") -} - -model Episode { - id String @id @db.Uuid - mediaId String @db.Uuid - episode Int - name String @db.VarChar(255) - score Decimal @default(0.00) @db.Decimal(4, 2) - pictureThumbnail String? - viewed BigInt @default(0) - likes BigInt @default(0) - dislikes BigInt @default(0) - pendingUpload Boolean @default(true) - uploadedBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - comments Comment[] @relation("EpisodeComments") - user_likes EpisodeLike[] @relation("EpisodeLikes") - media Media @relation("MediaEpisodes", fields: [mediaId], references: [id]) - uploader User @relation("UserEpisodes", fields: [uploadedBy], references: [id]) - videos Video[] @relation("EpisodeVideos") - user_histories WatchHistory? @relation("EpisodeWatchHistories") - - @@unique([mediaId, episode]) - @@map("episodes") -} - -model EpisodeLike { - id String @id @db.Uuid - userId String @db.Uuid - sessionId String @db.Uuid - episodeId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - episode Episode @relation("EpisodeLikes", fields: [episodeId], references: [id]) - session UserSession @relation("SessionEpisodeLikes", fields: [sessionId], references: [id]) - user User @relation("UserEpisodeLikes", fields: [userId], references: [id]) - - @@map("episode_likes") -} - -model Video { - id String @id @db.Uuid - episodeId String @db.Uuid - serviceId String @db.Uuid - videoCode String @db.VarChar(255) - thumbnailCode String? - pendingUpload Boolean @default(true) - uploadedBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - episode Episode @relation("EpisodeVideos", fields: [episodeId], references: [id]) - service VideoService @relation("VideoServices", fields: [serviceId], references: [id]) - uploader User @relation("UserVideos", fields: [uploadedBy], references: [id]) - - @@unique([serviceId, videoCode]) - @@map("videos") -} - -model VideoService { - id String @id @db.Uuid - name String @unique @db.VarChar(255) - domain String @db.VarChar(255) - logo String? - hexColor String @db.VarChar(10) - endpointVideo String - endpointThumbnail String? - endpointDownload String? - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - user_preferences UserPreference[] @relation("UserServiceDefault") - creator User @relation("UserVideoServices", fields: [createdBy], references: [id]) - videos Video[] @relation("VideoServices") - - @@map("video_services") -} - -model User { - id String @id @db.Uuid - name String @db.VarChar(255) - username String @unique @db.VarChar(255) - email String @unique - password String - birthDate DateTime? @db.Date - gender UserGender? - phoneCC Int? - phoneNumber Int? - bioProfile String? - avatar String? - commentBackground String? - provider String? @db.VarChar(255) - providerId String? @unique @db.VarChar(255) - providerToken String? - providerPayload Json? @db.Json - verifiedAt DateTime? - disabledAt DateTime? - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - characters Character[] @relation("UserCreatedCharacters") - collections Collection[] @relation("UserCollections") - liked_comments CommentLike[] @relation("UserCommentLikes") - approved_comments CommentReport[] @relation("ApprovedReportComments") - reported_comments CommentReport[] @relation("UserReportComments") - comments Comment[] @relation("UserComments") - user_create_email EmailSystemAccount[] @relation("UserCreateSystemAccount") - user_emails EmailSystemHistory[] @relation("UserEmails") - episode_likes EpisodeLike[] @relation("UserEpisodeLikes") - episodes Episode[] @relation("UserEpisodes") - genres Genre[] @relation("UserCreatedGenres") - user_hero_banner HeroBanner[] @relation("UserHeroBanner") - lang_va_char LangVAChar[] @relation("UserCreatedLangVAChar") - create_languages Language[] @relation("UserCreateLanguages") - media_approveds MediaLog[] @relation("UserApprovedMedias") - media_proposeds MediaLog[] @relation("UserProposedMedias") - medias Media[] @relation("UserUploadedMedias") - media_reviews MediaReview[] @relation("UserMediaReviews") - studios Studio[] @relation("UserCreatedStudios") - sys_logs SystemLog[] @relation("UserSystemLogs") - sys_notifications SystemNotification[] @relation("UserCreatorSystemNotifications") - logs UserLog[] @relation("UserLogs") - notifications UserNotification[] @relation("UserNotifications") - preference UserPreference? - assignedRoles UserRoleAssignment[] - create_roles UserRole[] @relation("UserCreateRoles") - sessions UserSession[] @relation("UserSession") - video_services VideoService[] @relation("UserVideoServices") - videos Video[] @relation("UserVideos") - voice_actor VoiceActor[] @relation("UserCreatedVoiceActors") - watch_histories WatchHistory[] @relation("UserWatchHistories") - allowed_collections Collection[] @relation("UserSelectedSharingCollention") - - @@map("users") -} - -model UserPreference { - id String @id @db.Uuid - userId String @unique @db.Uuid - langPreference String? - adultFiltering AdultFiltering @default(hide) - adultAlert AdultAlert @default(show) - videoQuality VideoQuality @default(Q1080) - serviceDefaultId String? @db.Uuid - hideContries Country[] - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - lang Language? @relation("UserPreferenceLang", fields: [langPreference], references: [code]) - serviceDefault VideoService? @relation("UserServiceDefault", fields: [serviceDefaultId], references: [id]) - user User @relation(fields: [userId], references: [id]) - favoriteGenres Genre[] @relation("UserFavoriteGenres") - - @@map("user_preferences") -} - -model UserRole { - id String @id @db.Uuid - name String @unique @db.VarChar(255) - description String? - primaryColor String? @db.VarChar(10) - secondaryColor String? @db.VarChar(10) - pictureImage String? - badgeImage String? - isSuperadmin Boolean @default(false) - canEditMedia Boolean @default(false) - canManageMedia Boolean @default(false) - canEditEpisodes Boolean @default(false) - canManageEpisodes Boolean @default(false) - canEditComment Boolean @default(false) - canManageComment Boolean @default(false) - canEditUser Boolean @default(false) - canManageUser Boolean @default(false) - canEditSystem Boolean @default(false) - canManageSystem Boolean @default(false) - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - assignedUser UserRoleAssignment[] - creator User @relation("UserCreateRoles", fields: [createdBy], references: [id]) - - @@map("user_roles") -} - -model UserRoleAssignment { - userId String @db.Uuid - roleId String @db.Uuid - assignmentAt DateTime @default(now()) - role UserRole @relation(fields: [roleId], references: [id]) - user User @relation(fields: [userId], references: [id]) - - @@id([userId, roleId]) - @@map("user_role_assignments") -} - -model UserNotification { - id String @id @db.Uuid - title String @db.VarChar(255) - content String - picture String - state UserNotificationState - ctaLink String - userId String @db.Uuid - isReaded Boolean @default(false) - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - user User @relation("UserNotifications", fields: [userId], references: [id]) - - @@map("user_notifications") -} - -model UserSession { - id String @id @db.Uuid - isAuthenticated Boolean @default(false) - userId String @db.Uuid - deviceType String @db.VarChar(255) - deviceOs String @db.VarChar(255) - deviceIp String @db.VarChar(255) - browser String @db.VarChar(255) - isOnline Boolean @default(false) - lastOnline DateTime @default(now()) - validUntil DateTime - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - episode_likes EpisodeLike[] @relation("SessionEpisodeLikes") - logs UserLog[] @relation("UserSessionLogs") - user User @relation("UserSession", fields: [userId], references: [id]) - watch_histories WatchHistory[] @relation("SessionWatchHistories") - - @@index([userId, isAuthenticated, deletedAt]) - @@map("user_sessions") -} - -model UserLog { - id String @id @db.Uuid - title String @db.VarChar(255) - notes String - userId String @db.Uuid - sessionId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - session UserSession @relation("UserSessionLogs", fields: [sessionId], references: [id]) - user User @relation("UserLogs", fields: [userId], references: [id]) - - @@map("user_logs") -} - -model Collection { - id String @id @db.Uuid - name String @db.VarChar(115) - ownerId String @db.Uuid - accessStatus AccessStatus @default(private) - password String? @db.VarChar(255) - accessScope AccessScope @default(viewer) - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - slug String @db.VarChar(115) - media_saved CollectionMedia[] @relation("CollectionMedia") - owner User @relation("UserCollections", fields: [ownerId], references: [id]) - usersAllowed User[] @relation("UserSelectedSharingCollention") - - @@unique([slug, ownerId]) - @@map("collections") -} - -model CollectionMedia { - id String @id @db.Uuid - collectionId String @db.Uuid - mediaId String @db.Uuid - savedAt DateTime @default(now()) - collection Collection @relation("CollectionMedia", fields: [collectionId], references: [id]) - media Media @relation("CollectionMedia", fields: [mediaId], references: [id]) - - @@unique([collectionId, mediaId]) -} - -model WatchHistory { - id String @id @db.Uuid - episodeId String @db.Uuid - userId String @db.Uuid - sessionId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - episode Episode @relation("EpisodeWatchHistories", fields: [id], references: [id]) - session UserSession @relation("SessionWatchHistories", fields: [sessionId], references: [id]) - user User @relation("UserWatchHistories", fields: [userId], references: [id]) - - @@map("watch_histories") -} - -model MediaReview { - id String @id @db.Uuid - mediaId String @db.Uuid - rating Int - title String @db.VarChar(255) - text String - reaction MediaReviewReaction - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserMediaReviews", fields: [createdBy], references: [id]) - media Media @relation("MediaReviews", fields: [mediaId], references: [id]) - - @@map("movie_reviews") -} - -model Comment { - id String @id @db.Uuid - episodeId String @db.Uuid - text String - isParent Boolean @default(false) - parentId String? @db.Uuid - userId String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - likes CommentLike[] @relation("CommentLikes") - episode Episode @relation("EpisodeComments", fields: [episodeId], references: [id]) - parent Comment? @relation("ParentReplyComments", fields: [parentId], references: [id]) - replies Comment[] @relation("ParentReplyComments") - user User @relation("UserComments", fields: [userId], references: [id]) - - @@map("comments") -} - -model CommentLike { - id String @id @db.Uuid - commentId String @db.Uuid - userLiked String @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - comment Comment @relation("CommentLikes", fields: [commentId], references: [id]) - user User @relation("UserCommentLikes", fields: [userLiked], references: [id]) - - @@map("comment_likes") -} - -model CommentReport { - id String @id @db.Uuid - userReporter String @db.Uuid - commentReported String @db.Uuid - isSupervisorReport Boolean @default(false) - reason ReportReason - status ReportStatus - description String @db.VarChar(255) - approvedBy String? @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - approver User? @relation("ApprovedReportComments", fields: [approvedBy], references: [id]) - reporter User @relation("UserReportComments", fields: [userReporter], references: [id]) - - @@map("comment_reports") -} - -model Language { - id String @id @db.Uuid - name String @db.VarChar(255) - code String @unique @db.VarChar(5) - countryFlag String @db.VarChar(10) - fileLocation String - craetedBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserCreateLanguages", fields: [craetedBy], references: [id]) - user_used UserPreference[] @relation("UserPreferenceLang") - - @@map("languages") -} - -model EmailSystemAccount { - id String @id @db.Uuid - name String @unique - host String @db.VarChar(255) - port Int - secure Boolean - email String @unique @db.VarChar(255) - username String @unique @db.VarChar(255) - password String @db.VarChar(255) - purpose EmailPorpose - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserCreateSystemAccount", fields: [createdBy], references: [id]) - - @@map("email_system_accounts") -} - -model EmailSystemHistory { - id String @id @db.Uuid - purpose EmailPorpose - fromEmail String - toEmail String - userRelated String @db.Uuid - title String @db.VarChar(255) - htmlContent String - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - user User @relation("UserEmails", fields: [userRelated], references: [id]) - - @@map("email_system_histories") -} - -model HeroBanner { - id String @id @db.Uuid - orderPriority Int? @unique - imageUrl String? - startDate DateTime - endDate DateTime - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creatorId String @db.Uuid - mediaId String @db.Uuid - createdBy User @relation("UserHeroBanner", fields: [creatorId], references: [id]) - media Media @relation("MediaBannerPromotion", fields: [mediaId], references: [id]) - - @@map("hero_banner") -} - -model SystemPreference { - id String @id @db.Uuid - key String @unique @db.VarChar(225) - value String @db.VarChar(225) - description String - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - - @@map("system_preferences") -} - -model SystemNotification { - id String @id @db.Uuid - type TypeSystemNotification - componentName String? @db.VarChar(255) - popupImage String? - titleToast String? @db.VarChar(255) - contentToast String? - createdBy String @db.Uuid - deletedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - creator User @relation("UserCreatorSystemNotifications", fields: [createdBy], references: [id]) - - @@map("system_notifications") -} - -model SystemLog { - id String @id @db.Uuid - title String @db.VarChar(255) - notes String - relatedUser String? @db.Uuid - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - user User? @relation("UserSystemLogs", fields: [relatedUser], references: [id]) - - @@map("system_logs") -} - -enum MediaType { - TV - ONA - OVA - Movie - Special - Music -} - -enum Country { - JP @map("Japanese") - EN @map("English") - ID @map("Indonesia") - KR @map("Korea") -} - -enum Season { - winter - spring - summer - fall -} - -enum CharacterRole { - Main - Supporting -} - -enum MediaOperation { - create - update - delete -} - -enum UserGender { - male - female -} - -enum AdultFiltering { - hide - show - explicit -} - -enum AdultAlert { - hide - show -} - -enum VideoQuality { - Q2160 - Q1440 - Q1080 - Q720 - Q480 - Q360 - Q240 - Q144 -} - -enum UserNotificationState { - info - warning - danger -} - -enum ReportStatus { - pending - resolved - rejected -} - -enum ReportReason { - sexualize - violent - explicit - hateful - political - racist - spam - other -} - -enum AccessStatus { - private - selected - protected - public -} - -enum AccessScope { - viewer - editor -} - -enum MediaReviewReaction { - angry - sad - awesome - happy - sleepy - annoyed - disgusting - disappointed -} - -enum EmailPorpose { - forgot_password - account_activation - account_notification - subscribtion -} - -enum TypeSystemNotification { - component - popup - toast -} From 953530a119aa059c8a2985dda462a72628b656b7 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 27 Apr 2026 12:00:00 +0700 Subject: [PATCH 02/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20database=20d?= =?UTF-8?q?iagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 prisma/diagram.json diff --git a/prisma/diagram.json b/prisma/diagram.json new file mode 100644 index 0000000..e69de29 From 1e34793d08becd58b65b7cea6babedbfb1967207 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 28 Apr 2026 12:00:00 +0700 Subject: [PATCH 03/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20=20db:=20remove?= =?UTF-8?q?=20old=20migration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/000_baseline_v2/migration.sql | 903 ------------------ .../migration.sql | 14 - prisma/migrations/migration_lock.toml | 3 - 3 files changed, 920 deletions(-) delete mode 100644 prisma/migrations/000_baseline_v2/migration.sql delete mode 100644 prisma/migrations/20260422050909_change_enum_season/migration.sql delete mode 100644 prisma/migrations/migration_lock.toml diff --git a/prisma/migrations/000_baseline_v2/migration.sql b/prisma/migrations/000_baseline_v2/migration.sql deleted file mode 100644 index 52c20b1..0000000 --- a/prisma/migrations/000_baseline_v2/migration.sql +++ /dev/null @@ -1,903 +0,0 @@ --- CreateSchema -CREATE SCHEMA IF NOT EXISTS "public"; - --- CreateEnum -CREATE TYPE "MediaType" AS ENUM ('TV', 'ONA', 'OVA', 'Movie', 'Special', 'Music'); - --- CreateEnum -CREATE TYPE "Country" AS ENUM ('Japanese', 'English', 'Indonesia', 'Korea'); - --- CreateEnum -CREATE TYPE "Season" AS ENUM ('Winter', 'Spring', 'Summer', 'Fall'); - --- CreateEnum -CREATE TYPE "CharacterRole" AS ENUM ('Main', 'Supporting'); - --- CreateEnum -CREATE TYPE "MediaOperation" AS ENUM ('create', 'update', 'delete'); - --- CreateEnum -CREATE TYPE "UserGender" AS ENUM ('male', 'female'); - --- CreateEnum -CREATE TYPE "AdultFiltering" AS ENUM ('hide', 'show', 'explicit'); - --- CreateEnum -CREATE TYPE "AdultAlert" AS ENUM ('hide', 'show'); - --- CreateEnum -CREATE TYPE "VideoQuality" AS ENUM ('Q2160', 'Q1440', 'Q1080', 'Q720', 'Q480', 'Q360', 'Q240', 'Q144'); - --- CreateEnum -CREATE TYPE "UserNotificationState" AS ENUM ('info', 'warning', 'danger'); - --- CreateEnum -CREATE TYPE "ReportStatus" AS ENUM ('pending', 'resolved', 'rejected'); - --- CreateEnum -CREATE TYPE "ReportReason" AS ENUM ('sexualize', 'violent', 'explicit', 'hateful', 'political', 'racist', 'spam', 'other'); - --- CreateEnum -CREATE TYPE "AccessStatus" AS ENUM ('private', 'selected', 'protected', 'public'); - --- CreateEnum -CREATE TYPE "AccessScope" AS ENUM ('viewer', 'editor'); - --- CreateEnum -CREATE TYPE "MediaReviewReaction" AS ENUM ('angry', 'sad', 'awesome', 'happy', 'sleepy', 'annoyed', 'disgusting', 'disappointed'); - --- CreateEnum -CREATE TYPE "EmailPorpose" AS ENUM ('forgot_password', 'account_activation', 'account_notification', 'subscribtion'); - --- CreateEnum -CREATE TYPE "TypeSystemNotification" AS ENUM ('component', 'popup', 'toast'); - --- CreateTable -CREATE TABLE "medias" ( - "id" UUID NOT NULL, - "title" TEXT NOT NULL, - "titleAlternative" JSONB NOT NULL, - "slug" TEXT NOT NULL, - "malId" INTEGER, - "pictureMedium" TEXT NOT NULL, - "pictureLarge" TEXT NOT NULL, - "country" "Country" NOT NULL DEFAULT 'Japanese', - "score" DECIMAL(4,2) NOT NULL DEFAULT 0.00, - "status" TEXT NOT NULL, - "startAiring" TIMESTAMP(3), - "endAiring" TIMESTAMP(3), - "synopsis" TEXT NOT NULL, - "ageRating" TEXT NOT NULL, - "mediaType" "MediaType" NOT NULL, - "source" TEXT, - "onDraft" BOOLEAN NOT NULL DEFAULT true, - "uploadedBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "season" "Season", - "yearReleased" SMALLINT NOT NULL, - - CONSTRAINT "medias_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "media_logs" ( - "id" UUID NOT NULL, - "status" "MediaOperation" NOT NULL, - "approval" BOOLEAN NOT NULL DEFAULT false, - "proposedBy" UUID NOT NULL, - "approvedBy" UUID NOT NULL, - "mediaId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "media_logs_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "genres" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "slug" VARCHAR(255) NOT NULL, - "malId" INTEGER NOT NULL, - "malUrl" VARCHAR(255) NOT NULL, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "genres_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "studios" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "slug" VARCHAR(255) NOT NULL, - "linkAbout" TEXT NOT NULL, - "malId" INTEGER NOT NULL, - "logoUrl" TEXT, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "studios_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "characters" ( - "id" UUID NOT NULL, - "malId" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "role" "CharacterRole" NOT NULL, - "favorites" INTEGER NOT NULL DEFAULT 0, - "imageUrl" TEXT, - "smallImageUrl" TEXT, - "creatorId" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "characters_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "voice_actors" ( - "id" UUID NOT NULL, - "malId" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "birthday" TIMESTAMP(3), - "description" TEXT, - "aboutUrl" TEXT, - "imageUrl" TEXT, - "websiteUrl" TEXT, - "creatorId" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "voice_actors_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "lang_va_char" ( - "id" UUID NOT NULL, - "language" TEXT NOT NULL, - "vaId" UUID NOT NULL, - "charId" UUID NOT NULL, - "creatorId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "lang_va_char_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "episodes" ( - "id" UUID NOT NULL, - "mediaId" UUID NOT NULL, - "episode" INTEGER NOT NULL, - "name" VARCHAR(255) NOT NULL, - "score" DECIMAL(4,2) NOT NULL DEFAULT 0.00, - "pictureThumbnail" TEXT, - "viewed" BIGINT NOT NULL DEFAULT 0, - "likes" BIGINT NOT NULL DEFAULT 0, - "dislikes" BIGINT NOT NULL DEFAULT 0, - "pendingUpload" BOOLEAN NOT NULL DEFAULT true, - "uploadedBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "episodes_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "episode_likes" ( - "id" UUID NOT NULL, - "userId" UUID NOT NULL, - "sessionId" UUID NOT NULL, - "episodeId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "episode_likes_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "videos" ( - "id" UUID NOT NULL, - "episodeId" UUID NOT NULL, - "serviceId" UUID NOT NULL, - "videoCode" VARCHAR(255) NOT NULL, - "thumbnailCode" TEXT, - "pendingUpload" BOOLEAN NOT NULL DEFAULT true, - "uploadedBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "videos_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "video_services" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "domain" VARCHAR(255) NOT NULL, - "logo" TEXT, - "hexColor" VARCHAR(10) NOT NULL, - "endpointVideo" TEXT NOT NULL, - "endpointThumbnail" TEXT, - "endpointDownload" TEXT, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "video_services_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "username" VARCHAR(255) NOT NULL, - "email" TEXT NOT NULL, - "password" TEXT NOT NULL, - "birthDate" DATE, - "gender" "UserGender", - "phoneCC" INTEGER, - "phoneNumber" INTEGER, - "bioProfile" TEXT, - "avatar" TEXT, - "commentBackground" TEXT, - "provider" VARCHAR(255), - "providerId" VARCHAR(255), - "providerToken" TEXT, - "providerPayload" JSON, - "verifiedAt" TIMESTAMP(3), - "disabledAt" TIMESTAMP(3), - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_preferences" ( - "id" UUID NOT NULL, - "userId" UUID NOT NULL, - "langPreference" TEXT, - "adultFiltering" "AdultFiltering" NOT NULL DEFAULT 'hide', - "adultAlert" "AdultAlert" NOT NULL DEFAULT 'show', - "videoQuality" "VideoQuality" NOT NULL DEFAULT 'Q1080', - "serviceDefaultId" UUID, - "hideContries" "Country"[], - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_preferences_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_roles" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "description" TEXT, - "primaryColor" VARCHAR(10), - "secondaryColor" VARCHAR(10), - "pictureImage" TEXT, - "badgeImage" TEXT, - "isSuperadmin" BOOLEAN NOT NULL DEFAULT false, - "canEditMedia" BOOLEAN NOT NULL DEFAULT false, - "canManageMedia" BOOLEAN NOT NULL DEFAULT false, - "canEditEpisodes" BOOLEAN NOT NULL DEFAULT false, - "canManageEpisodes" BOOLEAN NOT NULL DEFAULT false, - "canEditComment" BOOLEAN NOT NULL DEFAULT false, - "canManageComment" BOOLEAN NOT NULL DEFAULT false, - "canEditUser" BOOLEAN NOT NULL DEFAULT false, - "canManageUser" BOOLEAN NOT NULL DEFAULT false, - "canEditSystem" BOOLEAN NOT NULL DEFAULT false, - "canManageSystem" BOOLEAN NOT NULL DEFAULT false, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_roles_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_role_assignments" ( - "userId" UUID NOT NULL, - "roleId" UUID NOT NULL, - "assignmentAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_role_assignments_pkey" PRIMARY KEY ("userId","roleId") -); - --- CreateTable -CREATE TABLE "user_notifications" ( - "id" UUID NOT NULL, - "title" VARCHAR(255) NOT NULL, - "content" TEXT NOT NULL, - "picture" TEXT NOT NULL, - "state" "UserNotificationState" NOT NULL, - "ctaLink" TEXT NOT NULL, - "userId" UUID NOT NULL, - "isReaded" BOOLEAN NOT NULL DEFAULT false, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_notifications_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_sessions" ( - "id" UUID NOT NULL, - "isAuthenticated" BOOLEAN NOT NULL DEFAULT false, - "userId" UUID NOT NULL, - "deviceType" VARCHAR(255) NOT NULL, - "deviceOs" VARCHAR(255) NOT NULL, - "deviceIp" VARCHAR(255) NOT NULL, - "browser" VARCHAR(255) NOT NULL, - "isOnline" BOOLEAN NOT NULL DEFAULT false, - "lastOnline" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "validUntil" TIMESTAMP(3) NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_sessions_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_logs" ( - "id" UUID NOT NULL, - "title" VARCHAR(255) NOT NULL, - "notes" TEXT NOT NULL, - "userId" UUID NOT NULL, - "sessionId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "user_logs_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "collections" ( - "id" UUID NOT NULL, - "name" VARCHAR(115) NOT NULL, - "ownerId" UUID NOT NULL, - "accessStatus" "AccessStatus" NOT NULL DEFAULT 'private', - "password" VARCHAR(255), - "accessScope" "AccessScope" NOT NULL DEFAULT 'viewer', - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "slug" VARCHAR(115) NOT NULL, - - CONSTRAINT "collections_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "CollectionMedia" ( - "id" UUID NOT NULL, - "collectionId" UUID NOT NULL, - "mediaId" UUID NOT NULL, - "savedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "CollectionMedia_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "watch_histories" ( - "id" UUID NOT NULL, - "episodeId" UUID NOT NULL, - "userId" UUID NOT NULL, - "sessionId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "watch_histories_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "movie_reviews" ( - "id" UUID NOT NULL, - "mediaId" UUID NOT NULL, - "rating" INTEGER NOT NULL, - "title" VARCHAR(255) NOT NULL, - "text" TEXT NOT NULL, - "reaction" "MediaReviewReaction" NOT NULL, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "movie_reviews_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "comments" ( - "id" UUID NOT NULL, - "episodeId" UUID NOT NULL, - "text" TEXT NOT NULL, - "isParent" BOOLEAN NOT NULL DEFAULT false, - "parentId" UUID, - "userId" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "comments_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "comment_likes" ( - "id" UUID NOT NULL, - "commentId" UUID NOT NULL, - "userLiked" UUID NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "comment_likes_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "comment_reports" ( - "id" UUID NOT NULL, - "userReporter" UUID NOT NULL, - "commentReported" UUID NOT NULL, - "isSupervisorReport" BOOLEAN NOT NULL DEFAULT false, - "reason" "ReportReason" NOT NULL, - "status" "ReportStatus" NOT NULL, - "description" VARCHAR(255) NOT NULL, - "approvedBy" UUID, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "comment_reports_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "languages" ( - "id" UUID NOT NULL, - "name" VARCHAR(255) NOT NULL, - "code" VARCHAR(5) NOT NULL, - "countryFlag" VARCHAR(10) NOT NULL, - "fileLocation" TEXT NOT NULL, - "craetedBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "languages_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "email_system_accounts" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "host" VARCHAR(255) NOT NULL, - "port" INTEGER NOT NULL, - "secure" BOOLEAN NOT NULL, - "email" VARCHAR(255) NOT NULL, - "username" VARCHAR(255) NOT NULL, - "password" VARCHAR(255) NOT NULL, - "purpose" "EmailPorpose" NOT NULL, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "email_system_accounts_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "email_system_histories" ( - "id" UUID NOT NULL, - "purpose" "EmailPorpose" NOT NULL, - "fromEmail" TEXT NOT NULL, - "toEmail" TEXT NOT NULL, - "userRelated" UUID NOT NULL, - "title" VARCHAR(255) NOT NULL, - "htmlContent" TEXT NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "email_system_histories_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "hero_banner" ( - "id" UUID NOT NULL, - "orderPriority" INTEGER, - "imageUrl" TEXT, - "startDate" TIMESTAMP(3) NOT NULL, - "endDate" TIMESTAMP(3) NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "creatorId" UUID NOT NULL, - "mediaId" UUID NOT NULL, - - CONSTRAINT "hero_banner_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "system_preferences" ( - "id" UUID NOT NULL, - "key" VARCHAR(225) NOT NULL, - "value" VARCHAR(225) NOT NULL, - "description" TEXT NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "system_preferences_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "system_notifications" ( - "id" UUID NOT NULL, - "type" "TypeSystemNotification" NOT NULL, - "componentName" VARCHAR(255), - "popupImage" TEXT, - "titleToast" VARCHAR(255), - "contentToast" TEXT, - "createdBy" UUID NOT NULL, - "deletedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "system_notifications_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "system_logs" ( - "id" UUID NOT NULL, - "title" VARCHAR(255) NOT NULL, - "notes" TEXT NOT NULL, - "relatedUser" UUID, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "system_logs_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "_MediaStudios" ( - "A" UUID NOT NULL, - "B" UUID NOT NULL, - - CONSTRAINT "_MediaStudios_AB_pkey" PRIMARY KEY ("A","B") -); - --- CreateTable -CREATE TABLE "_MediaGenres" ( - "A" UUID NOT NULL, - "B" UUID NOT NULL, - - CONSTRAINT "_MediaGenres_AB_pkey" PRIMARY KEY ("A","B") -); - --- CreateTable -CREATE TABLE "_UserFavoriteGenres" ( - "A" UUID NOT NULL, - "B" UUID NOT NULL, - - CONSTRAINT "_UserFavoriteGenres_AB_pkey" PRIMARY KEY ("A","B") -); - --- CreateTable -CREATE TABLE "_MediaCharacters" ( - "A" UUID NOT NULL, - "B" UUID NOT NULL, - - CONSTRAINT "_MediaCharacters_AB_pkey" PRIMARY KEY ("A","B") -); - --- CreateTable -CREATE TABLE "_UserSelectedSharingCollention" ( - "A" UUID NOT NULL, - "B" UUID NOT NULL, - - CONSTRAINT "_UserSelectedSharingCollention_AB_pkey" PRIMARY KEY ("A","B") -); - --- CreateIndex -CREATE UNIQUE INDEX "medias_slug_key" ON "medias"("slug"); - --- CreateIndex -CREATE UNIQUE INDEX "medias_malId_key" ON "medias"("malId"); - --- CreateIndex -CREATE INDEX "medias_status_onDraft_deletedAt_idx" ON "medias"("status", "onDraft", "deletedAt"); - --- CreateIndex -CREATE INDEX "medias_mediaType_idx" ON "medias"("mediaType"); - --- CreateIndex -CREATE INDEX "medias_uploadedBy_idx" ON "medias"("uploadedBy"); - --- CreateIndex -CREATE INDEX "medias_createdAt_idx" ON "medias"("createdAt"); - --- CreateIndex -CREATE UNIQUE INDEX "genres_slug_key" ON "genres"("slug"); - --- CreateIndex -CREATE UNIQUE INDEX "genres_malId_key" ON "genres"("malId"); - --- CreateIndex -CREATE UNIQUE INDEX "studios_slug_key" ON "studios"("slug"); - --- CreateIndex -CREATE UNIQUE INDEX "studios_malId_key" ON "studios"("malId"); - --- CreateIndex -CREATE UNIQUE INDEX "characters_malId_key" ON "characters"("malId"); - --- CreateIndex -CREATE UNIQUE INDEX "voice_actors_malId_key" ON "voice_actors"("malId"); - --- CreateIndex -CREATE UNIQUE INDEX "lang_va_char_language_vaId_charId_key" ON "lang_va_char"("language", "vaId", "charId"); - --- CreateIndex -CREATE UNIQUE INDEX "episodes_mediaId_episode_key" ON "episodes"("mediaId", "episode"); - --- CreateIndex -CREATE UNIQUE INDEX "videos_serviceId_videoCode_key" ON "videos"("serviceId", "videoCode"); - --- CreateIndex -CREATE UNIQUE INDEX "video_services_name_key" ON "video_services"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "users_username_key" ON "users"("username"); - --- CreateIndex -CREATE UNIQUE INDEX "users_email_key" ON "users"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "users_providerId_key" ON "users"("providerId"); - --- CreateIndex -CREATE UNIQUE INDEX "user_preferences_userId_key" ON "user_preferences"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "user_roles_name_key" ON "user_roles"("name"); - --- CreateIndex -CREATE INDEX "user_sessions_userId_isAuthenticated_deletedAt_idx" ON "user_sessions"("userId", "isAuthenticated", "deletedAt"); - --- CreateIndex -CREATE UNIQUE INDEX "collections_slug_ownerId_key" ON "collections"("slug", "ownerId"); - --- CreateIndex -CREATE UNIQUE INDEX "CollectionMedia_collectionId_mediaId_key" ON "CollectionMedia"("collectionId", "mediaId"); - --- CreateIndex -CREATE UNIQUE INDEX "languages_code_key" ON "languages"("code"); - --- CreateIndex -CREATE UNIQUE INDEX "email_system_accounts_name_key" ON "email_system_accounts"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "email_system_accounts_email_key" ON "email_system_accounts"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "email_system_accounts_username_key" ON "email_system_accounts"("username"); - --- CreateIndex -CREATE UNIQUE INDEX "hero_banner_orderPriority_key" ON "hero_banner"("orderPriority"); - --- CreateIndex -CREATE UNIQUE INDEX "system_preferences_key_key" ON "system_preferences"("key"); - --- CreateIndex -CREATE INDEX "_MediaStudios_B_index" ON "_MediaStudios"("B"); - --- CreateIndex -CREATE INDEX "_MediaGenres_B_index" ON "_MediaGenres"("B"); - --- CreateIndex -CREATE INDEX "_UserFavoriteGenres_B_index" ON "_UserFavoriteGenres"("B"); - --- CreateIndex -CREATE INDEX "_MediaCharacters_B_index" ON "_MediaCharacters"("B"); - --- CreateIndex -CREATE INDEX "_UserSelectedSharingCollention_B_index" ON "_UserSelectedSharingCollention"("B"); - --- AddForeignKey -ALTER TABLE "medias" ADD CONSTRAINT "medias_uploadedBy_fkey" FOREIGN KEY ("uploadedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "media_logs" ADD CONSTRAINT "media_logs_approvedBy_fkey" FOREIGN KEY ("approvedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "media_logs" ADD CONSTRAINT "media_logs_mediaId_fkey" FOREIGN KEY ("mediaId") REFERENCES "medias"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "media_logs" ADD CONSTRAINT "media_logs_proposedBy_fkey" FOREIGN KEY ("proposedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "genres" ADD CONSTRAINT "genres_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "studios" ADD CONSTRAINT "studios_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "characters" ADD CONSTRAINT "characters_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "voice_actors" ADD CONSTRAINT "voice_actors_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "lang_va_char" ADD CONSTRAINT "lang_va_char_charId_fkey" FOREIGN KEY ("charId") REFERENCES "characters"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "lang_va_char" ADD CONSTRAINT "lang_va_char_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "lang_va_char" ADD CONSTRAINT "lang_va_char_vaId_fkey" FOREIGN KEY ("vaId") REFERENCES "voice_actors"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "episodes" ADD CONSTRAINT "episodes_mediaId_fkey" FOREIGN KEY ("mediaId") REFERENCES "medias"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "episodes" ADD CONSTRAINT "episodes_uploadedBy_fkey" FOREIGN KEY ("uploadedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "episode_likes" ADD CONSTRAINT "episode_likes_episodeId_fkey" FOREIGN KEY ("episodeId") REFERENCES "episodes"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "episode_likes" ADD CONSTRAINT "episode_likes_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES "user_sessions"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "episode_likes" ADD CONSTRAINT "episode_likes_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "videos" ADD CONSTRAINT "videos_episodeId_fkey" FOREIGN KEY ("episodeId") REFERENCES "episodes"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "videos" ADD CONSTRAINT "videos_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "video_services"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "videos" ADD CONSTRAINT "videos_uploadedBy_fkey" FOREIGN KEY ("uploadedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "video_services" ADD CONSTRAINT "video_services_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_preferences" ADD CONSTRAINT "user_preferences_langPreference_fkey" FOREIGN KEY ("langPreference") REFERENCES "languages"("code") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_preferences" ADD CONSTRAINT "user_preferences_serviceDefaultId_fkey" FOREIGN KEY ("serviceDefaultId") REFERENCES "video_services"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_preferences" ADD CONSTRAINT "user_preferences_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_role_assignments" ADD CONSTRAINT "user_role_assignments_roleId_fkey" FOREIGN KEY ("roleId") REFERENCES "user_roles"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_role_assignments" ADD CONSTRAINT "user_role_assignments_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_notifications" ADD CONSTRAINT "user_notifications_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_sessions" ADD CONSTRAINT "user_sessions_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_logs" ADD CONSTRAINT "user_logs_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES "user_sessions"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_logs" ADD CONSTRAINT "user_logs_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "collections" ADD CONSTRAINT "collections_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CollectionMedia" ADD CONSTRAINT "CollectionMedia_collectionId_fkey" FOREIGN KEY ("collectionId") REFERENCES "collections"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CollectionMedia" ADD CONSTRAINT "CollectionMedia_mediaId_fkey" FOREIGN KEY ("mediaId") REFERENCES "medias"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "watch_histories" ADD CONSTRAINT "watch_histories_id_fkey" FOREIGN KEY ("id") REFERENCES "episodes"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "watch_histories" ADD CONSTRAINT "watch_histories_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES "user_sessions"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "watch_histories" ADD CONSTRAINT "watch_histories_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "movie_reviews" ADD CONSTRAINT "movie_reviews_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "movie_reviews" ADD CONSTRAINT "movie_reviews_mediaId_fkey" FOREIGN KEY ("mediaId") REFERENCES "medias"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comments" ADD CONSTRAINT "comments_episodeId_fkey" FOREIGN KEY ("episodeId") REFERENCES "episodes"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comments" ADD CONSTRAINT "comments_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "comments"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comments" ADD CONSTRAINT "comments_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comment_likes" ADD CONSTRAINT "comment_likes_commentId_fkey" FOREIGN KEY ("commentId") REFERENCES "comments"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comment_likes" ADD CONSTRAINT "comment_likes_userLiked_fkey" FOREIGN KEY ("userLiked") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comment_reports" ADD CONSTRAINT "comment_reports_approvedBy_fkey" FOREIGN KEY ("approvedBy") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "comment_reports" ADD CONSTRAINT "comment_reports_userReporter_fkey" FOREIGN KEY ("userReporter") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "languages" ADD CONSTRAINT "languages_craetedBy_fkey" FOREIGN KEY ("craetedBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "email_system_accounts" ADD CONSTRAINT "email_system_accounts_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "email_system_histories" ADD CONSTRAINT "email_system_histories_userRelated_fkey" FOREIGN KEY ("userRelated") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "hero_banner" ADD CONSTRAINT "hero_banner_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "hero_banner" ADD CONSTRAINT "hero_banner_mediaId_fkey" FOREIGN KEY ("mediaId") REFERENCES "medias"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "system_notifications" ADD CONSTRAINT "system_notifications_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "system_logs" ADD CONSTRAINT "system_logs_relatedUser_fkey" FOREIGN KEY ("relatedUser") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaStudios" ADD CONSTRAINT "_MediaStudios_A_fkey" FOREIGN KEY ("A") REFERENCES "medias"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaStudios" ADD CONSTRAINT "_MediaStudios_B_fkey" FOREIGN KEY ("B") REFERENCES "studios"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaGenres" ADD CONSTRAINT "_MediaGenres_A_fkey" FOREIGN KEY ("A") REFERENCES "genres"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaGenres" ADD CONSTRAINT "_MediaGenres_B_fkey" FOREIGN KEY ("B") REFERENCES "medias"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_UserFavoriteGenres" ADD CONSTRAINT "_UserFavoriteGenres_A_fkey" FOREIGN KEY ("A") REFERENCES "genres"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_UserFavoriteGenres" ADD CONSTRAINT "_UserFavoriteGenres_B_fkey" FOREIGN KEY ("B") REFERENCES "user_preferences"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaCharacters" ADD CONSTRAINT "_MediaCharacters_A_fkey" FOREIGN KEY ("A") REFERENCES "characters"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_MediaCharacters" ADD CONSTRAINT "_MediaCharacters_B_fkey" FOREIGN KEY ("B") REFERENCES "medias"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_UserSelectedSharingCollention" ADD CONSTRAINT "_UserSelectedSharingCollention_A_fkey" FOREIGN KEY ("A") REFERENCES "collections"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_UserSelectedSharingCollention" ADD CONSTRAINT "_UserSelectedSharingCollention_B_fkey" FOREIGN KEY ("B") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; - diff --git a/prisma/migrations/20260422050909_change_enum_season/migration.sql b/prisma/migrations/20260422050909_change_enum_season/migration.sql deleted file mode 100644 index 12f68f2..0000000 --- a/prisma/migrations/20260422050909_change_enum_season/migration.sql +++ /dev/null @@ -1,14 +0,0 @@ -/* - Warnings: - - - The values [Winter,Spring,Summer,Fall] on the enum `Season` will be removed. If these variants are still used in the database, this will fail. - -*/ --- AlterEnum -BEGIN; -CREATE TYPE "Season_new" AS ENUM ('winter', 'spring', 'summer', 'fall'); -ALTER TABLE "medias" ALTER COLUMN "season" TYPE "Season_new" USING ("season"::text::"Season_new"); -ALTER TYPE "Season" RENAME TO "Season_old"; -ALTER TYPE "Season_new" RENAME TO "Season"; -DROP TYPE "public"."Season_old"; -COMMIT; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index 044d57c..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (e.g., Git) -provider = "postgresql" From d0782710a5706e7ea93317fb3e0e889d8feec628 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Wed, 29 Apr 2026 21:00:00 +0700 Subject: [PATCH 04/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20database=20d?= =?UTF-8?q?iagram=20for=20schema=20visualization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 4577 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4577 insertions(+) diff --git a/prisma/diagram.json b/prisma/diagram.json index e69de29..38e5847 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -0,0 +1,4577 @@ +{ + "id": "0", + "name": "Main Diagram", + "createdAt": "2026-05-10T04:32:47.067Z", + "updatedAt": "2026-05-12T01:25:01.427Z", + "databaseType": "postgresql", + "tables": [ + { + "id": "1", + "name": "episodes", + "schema": "public", + "x": 196.42495741544377, + "y": 484.48992450910697, + "fields": [ + { + "id": "2", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "3", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "4", + "name": "episode", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "5", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "6", + "name": "mal_forum_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "7", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "8", + "name": "title_origin", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "9", + "name": "title_romanji", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "10", + "name": "aired", + "type": { + "id": "date", + "name": "date" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "11", + "name": "filler", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "false" + }, + { + "id": "12", + "name": "recap", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "false" + }, + { + "id": "13", + "name": "total_score", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777361135322 + }, + { + "id": "14", + "name": "scored_by", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777361233825 + }, + { + "id": "15", + "name": "videos", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "16", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "17", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "18", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "19", + "name": "", + "unique": true, + "fieldIds": [ + "2" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 9, + "expanded": true, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "20", + "name": "characters", + "schema": "public", + "x": -1034.1161796853148, + "y": 612.1533274157626, + "fields": [ + { + "id": "21", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "22", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "23", + "name": "image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "24", + "name": "small_image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "25", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "26", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "27", + "name": "liked", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "0" + }, + { + "id": "28", + "name": "connections", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "default": "0" + }, + { + "id": "29", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "30", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "31", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "32", + "name": "", + "unique": true, + "fieldIds": [ + "21" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 10, + "expanded": true, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "33", + "name": "medias", + "schema": "public", + "x": -335, + "y": -337.5, + "fields": [ + { + "id": "34", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "35", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "36", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "37", + "name": "title_secondary", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "38", + "name": "title_original", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "39", + "name": "title_synonyms", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255", + "comments": "This is Array" + }, + { + "id": "40", + "name": "trailers", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "41", + "name": "synopsis", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "42", + "name": "small_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "43", + "name": "medium_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "44", + "name": "large_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "45", + "name": "type", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "46", + "name": "source", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "47", + "name": "status", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "48", + "name": "airing", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "default": "false" + }, + { + "id": "49", + "name": "start_airing", + "type": { + "id": "date", + "name": "date" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "50", + "name": "end_airing", + "type": { + "id": "date", + "name": "date" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "51", + "name": "age_rating", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "52", + "name": "score", + "type": { + "id": "numeric", + "name": "numeric" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "precision": 2, + "scale": 2, + "default": "0" + }, + { + "id": "53", + "name": "score_total", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "default": "0" + }, + { + "id": "54", + "name": "scored_by", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "default": "0" + }, + { + "id": "55", + "name": "favourites", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "default": "0" + }, + { + "id": "56", + "name": "background", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "57", + "name": "season", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092, + "characterMaximumLength": "15", + "comments": "enum(winter, spring, summer, fall)" + }, + { + "id": "58", + "name": "year", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "59", + "name": "country", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777635858846 + }, + { + "id": "60", + "name": "broadcast_date", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "64" + }, + { + "id": "61", + "name": "producers", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "62", + "name": "licensors", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "63", + "name": "studios", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "64", + "name": "genres", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "65", + "name": "episodes", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "66", + "name": "explicit_genres", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "67", + "name": "themes", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "68", + "name": "demographics", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "69", + "name": "relations", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "70", + "name": "external_links", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "71", + "name": "characters", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "72", + "name": "approved", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "default": "false" + }, + { + "id": "73", + "name": "approved_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "74", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "75", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + }, + { + "id": "76", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "77", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + } + ], + "indexes": [ + { + "id": "78", + "name": "", + "unique": true, + "fieldIds": [ + "34" + ], + "createdAt": 1777282589092, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589092, + "width": 337, + "order": 0, + "expanded": true, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "79", + "name": "media_relations", + "schema": "public", + "x": 196.76101626573526, + "y": -96.79417551573586, + "fields": [ + { + "id": "80", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "81", + "name": "relation", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "16" + }, + { + "id": "82", + "name": "target_media", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + } + ], + "indexes": [ + { + "id": "83", + "name": "", + "unique": true, + "fieldIds": [ + "80" + ], + "createdAt": 1777282589092, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589092, + "order": 1, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "84", + "name": "media_sources", + "schema": "public", + "x": -680.0105470895069, + "y": 97.06852307742538, + "fields": [ + { + "id": "85", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "86", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "18" + } + ], + "indexes": [ + { + "id": "87", + "name": "", + "unique": true, + "fieldIds": [ + "85" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 5, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "88", + "name": "videos", + "schema": "public", + "x": 612.3480632351478, + "y": 523.768514660268, + "fields": [ + { + "id": "89", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "90", + "name": "service_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "91", + "name": "video_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "92", + "name": "short_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "93", + "name": "thumbnail_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "94", + "name": "download_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "95", + "name": "pending_upload", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "default": "true" + }, + { + "id": "96", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "97", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "98", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "99", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + } + ], + "indexes": [ + { + "id": "100", + "name": "", + "unique": true, + "fieldIds": [ + "89" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 15, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "101", + "name": "media_producers", + "schema": "public", + "x": 197.29835902390482, + "y": 69.49260163533236, + "fields": [ + { + "id": "102", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777360177611 + }, + { + "id": "103", + "name": "producer_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777360209223 + } + ], + "indexes": [ + { + "id": "104", + "name": "", + "unique": true, + "fieldIds": [ + "102", + "103" + ], + "createdAt": 1777360177611, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777360177611, + "order": 21, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "105", + "name": "media_age_ratings", + "schema": "public", + "x": -679.7484316247582, + "y": 342.88283833657397, + "fields": [ + { + "id": "106", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "107", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "64" + }, + { + "id": "108", + "name": "min_age", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "109", + "name": "", + "unique": true, + "fieldIds": [ + "106" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 7, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "110", + "name": "media_characters", + "schema": "public", + "x": -679.8245105809615, + "y": 896.9123102253633, + "fields": [ + { + "id": "111", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "112", + "name": "role", + "type": { + "id": "enum", + "name": "enum" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "comments": "main, supporting" + }, + { + "id": "113", + "name": "characters", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "114", + "name": "voice_actor", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "115", + "name": "", + "unique": true, + "fieldIds": [ + "111" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 8, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "116", + "name": "provisioned_users", + "x": 198.53800896575544, + "y": -1247.1936387119304, + "fields": [ + { + "id": "117", + "name": "provisioned_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778517368377 + }, + { + "id": "118", + "name": "provisioned_to", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778517463769 + }, + { + "id": "119", + "name": "provisioned_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778517476998 + }, + { + "id": "120", + "name": "reason", + "type": { + "id": "bigint", + "name": "bigint" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778517492646 + } + ], + "indexes": [], + "color": "#9ef07a", + "createdAt": 1778517368377, + "isView": false, + "order": 30, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "121", + "name": "system_country", + "x": -675.4825871206289, + "y": -936.5527418709639, + "fields": [ + { + "id": "122", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778401101216 + }, + { + "id": "123", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401175441, + "characterMaximumLength": "155" + }, + { + "id": "124", + "name": "slug", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401182473, + "characterMaximumLength": "165" + }, + { + "id": "125", + "name": "code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401186425, + "characterMaximumLength": "3" + }, + { + "id": "126", + "name": "flag", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778401191401, + "characterMaximumLength": "255" + }, + { + "id": "127", + "name": "banner", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778401286123, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "128", + "name": "", + "fieldIds": [ + "122" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778401101216 + } + ], + "color": "#b067e9", + "createdAt": 1778401101216, + "isView": false, + "order": 27, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "129", + "name": "media_explicit_genres", + "schema": "public", + "x": -681.3338818918861, + "y": 628.1224828360978, + "fields": [ + { + "id": "130", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777283776082 + }, + { + "id": "131", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777283808941 + } + ], + "indexes": [ + { + "id": "132", + "name": "", + "unique": true, + "fieldIds": [ + "130", + "131" + ], + "createdAt": 1777283776082, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777283776082, + "comments": "composite primary key = media_id + genre_id ", + "order": 19, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "133", + "name": "media_external_links", + "schema": "public", + "x": 196.86867462069478, + "y": -298.9741574566786, + "fields": [ + { + "id": "134", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "135", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "136", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "64" + }, + { + "id": "137", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "138", + "name": "", + "unique": true, + "fieldIds": [ + "134" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 3, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "139", + "name": "media_statuses", + "schema": "public", + "x": -679.4669719043579, + "y": 219.3548090436041, + "fields": [ + { + "id": "140", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "141", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "64" + } + ], + "indexes": [ + { + "id": "142", + "name": "", + "unique": true, + "fieldIds": [ + "140" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 6, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "143", + "name": "producers", + "schema": "public", + "x": 614.2665328827337, + "y": 137.7660218436568, + "fields": [ + { + "id": "144", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "145", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "146", + "name": "type", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "24" + }, + { + "id": "147", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + }, + { + "id": "148", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "149", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "150", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "151", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "152", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + } + ], + "indexes": [ + { + "id": "153", + "name": "", + "unique": true, + "fieldIds": [ + "144" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 13, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "154", + "name": "user_preferences", + "x": -675.7144111335546, + "y": -1493.2312805453928, + "fields": [ + { + "id": "155", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778517633815 + }, + { + "id": "156", + "name": "character_as_partner", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778518390023 + }, + { + "id": "157", + "name": "watch_history", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548806729, + "default": "true" + }, + { + "id": "158", + "name": "search_history", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548790804, + "default": "false" + }, + { + "id": "159", + "name": "private_account", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518216561, + "default": "false" + }, + { + "id": "160", + "name": "message_open", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518177601, + "default": "true" + }, + { + "id": "161", + "name": "birthday_open", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518242632, + "default": "false" + }, + { + "id": "162", + "name": "email_open", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518265111, + "default": "false" + }, + { + "id": "163", + "name": "number_open", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518273456, + "default": "false" + }, + { + "id": "164", + "name": "partner_open", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778518357114, + "default": "true" + } + ], + "indexes": [ + { + "id": "165", + "name": "", + "fieldIds": [ + "155" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778517633815 + } + ], + "color": "#4dee8a", + "createdAt": 1778517633815, + "isView": false, + "order": 31, + "schema": "public", + "expanded": true, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "166", + "name": "user_oauth_credentials", + "x": 196.34821847988283, + "y": -849.1992179045876, + "fields": [ + { + "id": "167", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778516299633 + }, + { + "id": "168", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778516366928 + }, + { + "id": "169", + "name": "oauth_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778516373206 + }, + { + "id": "170", + "name": "provider_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778516403942 + }, + { + "id": "171", + "name": "provider_sub", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778516761873 + }, + { + "id": "172", + "name": "last_action", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778516872367 + } + ], + "indexes": [ + { + "id": "173", + "name": "", + "fieldIds": [ + "167" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778516299633 + }, + { + "id": "174", + "name": "index_2", + "fieldIds": [ + "169", + "168" + ], + "unique": true, + "createdAt": 1778516903425 + } + ], + "color": "#4dee8a", + "createdAt": 1778516299633, + "isView": false, + "order": 29, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "175", + "name": "staff", + "schema": "public", + "x": -1353.8131838183044, + "y": 434.2501348320311, + "fields": [ + { + "id": "176", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "177", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "178", + "name": "image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "179", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "180", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "181", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "182", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "183", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "184", + "name": "", + "unique": true, + "fieldIds": [ + "176" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 12, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "185", + "name": "users", + "x": -333.07222985751173, + "y": -1032.6662184555098, + "fields": [ + { + "id": "186", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778390635628 + }, + { + "id": "187", + "name": "email", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778391266880 + }, + { + "id": "188", + "name": "password", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778391484055, + "characterMaximumLength": "255" + }, + { + "id": "189", + "name": "username", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778390646288, + "characterMaximumLength": "28" + }, + { + "id": "190", + "name": "fullname", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778390830584, + "characterMaximumLength": "32" + }, + { + "id": "191", + "name": "avatar", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778390861984, + "characterMaximumLength": "255" + }, + { + "id": "192", + "name": "bio", + "type": { + "id": "text", + "name": "text" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778390888222 + }, + { + "id": "193", + "name": "datebirth", + "type": { + "id": "date", + "name": "date" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778391007890 + }, + { + "id": "194", + "name": "sex", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778391031530, + "characterMaximumLength": "12" + }, + { + "id": "195", + "name": "phone_number", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778391449319, + "characterMaximumLength": "15" + }, + { + "id": "196", + "name": "address", + "type": { + "id": "address", + "name": "address" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778401066100 + }, + { + "id": "197", + "name": "country", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778401621258 + }, + { + "id": "198", + "name": "auth_provider", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778515919288, + "characterMaximumLength": "64" + }, + { + "id": "199", + "name": "provider_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778515934284, + "characterMaximumLength": "255" + }, + { + "id": "200", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778517117468, + "default": "now()" + }, + { + "id": "201", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778517127447 + }, + { + "id": "202", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778517147463 + } + ], + "indexes": [ + { + "id": "203", + "name": "", + "fieldIds": [ + "186" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778390635628 + }, + { + "id": "204", + "name": "index_2", + "fieldIds": [ + "189" + ], + "unique": true, + "createdAt": 1778401234711 + }, + { + "id": "205", + "name": "index_3", + "fieldIds": [ + "187" + ], + "unique": true, + "createdAt": 1778401248519 + } + ], + "color": "#4dee8a", + "createdAt": 1778390635628, + "isView": false, + "order": 26, + "schema": "public", + "expanded": true, + "checkConstraints": [], + "width": 337, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "206", + "name": "media_studios", + "schema": "public", + "x": 199.29817359050787, + "y": 347.7468004324893, + "fields": [ + { + "id": "207", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777360514222 + }, + { + "id": "208", + "name": "producer_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777360544975 + } + ], + "indexes": [ + { + "id": "209", + "name": "", + "unique": true, + "fieldIds": [ + "207", + "208" + ], + "createdAt": 1777360514222, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777360514222, + "order": 23, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "210", + "name": "media_licencors", + "schema": "public", + "x": 196.51843134292955, + "y": 207.07984381762645, + "fields": [ + { + "id": "211", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777360331507 + }, + { + "id": "212", + "name": "producer_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777360363236 + } + ], + "indexes": [ + { + "id": "213", + "name": "", + "unique": true, + "fieldIds": [ + "211", + "212" + ], + "createdAt": 1777360331507, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777360331507, + "order": 22, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "214", + "name": "genres", + "schema": "public", + "x": -1029.312729060423, + "y": 207.074167755134, + "fields": [ + { + "id": "215", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "216", + "name": "mal_id", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "217", + "name": "type", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "16" + }, + { + "id": "218", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "32" + }, + { + "id": "219", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + } + ], + "indexes": [ + { + "id": "220", + "name": "", + "unique": true, + "fieldIds": [ + "215" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 14, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "221", + "name": "voice_actors", + "schema": "public", + "x": -1034.2719335611268, + "y": 442.32720385328116, + "fields": [ + { + "id": "222", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "223", + "name": "language", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "115" + }, + { + "id": "224", + "name": "actor_staff", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "225", + "name": "", + "unique": true, + "fieldIds": [ + "222" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 11, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "226", + "name": "media_genres", + "schema": "public", + "x": -680.2926238134676, + "y": 498.7845736528544, + "fields": [ + { + "id": "227", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777283473368 + }, + { + "id": "228", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777283550230 + } + ], + "indexes": [ + { + "id": "229", + "name": "", + "unique": true, + "fieldIds": [ + "227", + "228" + ], + "createdAt": 1777283473368, + "isPrimaryKey": true + } + ], + "checkConstraints": [], + "color": "#ffe374", + "isView": false, + "createdAt": 1777283473368, + "comments": "composite primary key = media_id + genre_id ", + "order": 18, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "230", + "name": "video_services", + "schema": "public", + "x": 76.84794405482987, + "y": 1174.3220047083446, + "fields": [ + { + "id": "231", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "232", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + }, + { + "id": "233", + "name": "resolution", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "234", + "name": "domain", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "235", + "name": "image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "236", + "name": "hex_color", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "10" + }, + { + "id": "237", + "name": "endpoint_video", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "238", + "name": "endpoint_short", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "239", + "name": "endpoint_image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "240", + "name": "endpoint_download", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "241", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "242", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "243", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "244", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + } + ], + "indexes": [ + { + "id": "245", + "name": "", + "unique": true, + "fieldIds": [ + "231" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + }, + { + "id": "246", + "name": "idx_video_services_name_resolution", + "unique": true, + "fieldIds": [ + "232", + "233" + ], + "createdAt": 1777282589094 + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "width": 337, + "order": 16, + "expanded": true, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "247", + "name": "media_submissions", + "schema": "public", + "x": -677.2819917810897, + "y": -656.6674640748546, + "fields": [ + { + "id": "248", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777362610195 + }, + { + "id": "249", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "250", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "251", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "comments": "" + }, + { + "id": "252", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "253", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "254", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "255", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "256", + "name": "", + "unique": true, + "fieldIds": [ + "248" + ], + "createdAt": 1777362610195, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777362610195, + "order": 24, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "257", + "name": "video_service_submissions", + "schema": "public", + "x": -333.34786174583087, + "y": 1240.4231339730102, + "fields": [ + { + "id": "258", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777362610195 + }, + { + "id": "259", + "name": "video_service_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "260", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "261", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "default": "pending", + "comments": "" + }, + { + "id": "262", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "263", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "264", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "265", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "266", + "name": "", + "unique": true, + "fieldIds": [ + "258" + ], + "createdAt": 1777362610195, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777362610195, + "width": 337, + "order": 24, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "267", + "name": "media_trailers", + "schema": "public", + "x": -675.1193235825539, + "y": -319.10973511128714, + "fields": [ + { + "id": "268", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "269", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "270", + "name": "embed_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "271", + "name": "small_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "272", + "name": "medium_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "255" + }, + { + "id": "273", + "name": "large_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "274", + "name": "maximum_image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "275", + "name": "", + "unique": true, + "fieldIds": [ + "268" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 2, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "276", + "name": "media_types", + "schema": "public", + "x": -678.8247906473255, + "y": -28.0163584990978, + "fields": [ + { + "id": "277", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "278", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "18" + } + ], + "indexes": [ + { + "id": "279", + "name": "", + "unique": true, + "fieldIds": [ + "277" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 4, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "280", + "name": "user_follows", + "x": 196.81483126623533, + "y": -1028.2763104312094, + "fields": [ + { + "id": "281", + "name": "follower_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401701334 + }, + { + "id": "282", + "name": "following_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401722682 + }, + { + "id": "283", + "name": "followed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778401734762 + } + ], + "indexes": [ + { + "id": "284", + "name": "index_1", + "fieldIds": [ + "282", + "281" + ], + "unique": true, + "createdAt": 1778401874053 + } + ], + "color": "#9ef07a", + "createdAt": 1778401701334, + "isView": false, + "order": 28, + "schema": "public", + "checkConstraints": [ + { + "id": "jx7knny2zwx9u3pt9y2eowuoc", + "expression": "follower_id <> following_id", + "createdAt": 1778402111741 + } + ], + "width": 224, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "285", + "name": "media_themes", + "schema": "public", + "x": -681.5109900103016, + "y": 752.8680228454149, + "fields": [ + { + "id": "286", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777295294621 + }, + { + "id": "287", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777295323224 + } + ], + "indexes": [ + { + "id": "288", + "name": "", + "unique": true, + "fieldIds": [ + "286", + "287" + ], + "createdAt": 1777295294621, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777295294621, + "width": 224, + "order": 20, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "289", + "name": "user_genre_preferences", + "x": -1031.4466584554384, + "y": -1409.2323402083748, + "fields": [ + { + "id": "290", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548513047 + }, + { + "id": "291", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548529915 + }, + { + "id": "292", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548535529 + } + ], + "indexes": [ + { + "id": "293", + "name": "index_1", + "fieldIds": [ + "290", + "291" + ], + "unique": true, + "createdAt": 1778548614328 + } + ], + "color": "#4dee8a", + "createdAt": 1778548513047, + "isView": false, + "order": 31, + "schema": "public" + }, + { + "id": "294", + "name": "user_rating_preferences", + "x": -1031.8902110080458, + "y": -1219.5448311992495, + "fields": [ + { + "id": "295", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548671790 + }, + { + "id": "296", + "name": "rating_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548699069 + }, + { + "id": "297", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548704423 + } + ], + "indexes": [], + "color": "#4dee8a", + "createdAt": 1778548671790, + "isView": false, + "order": 32, + "schema": "public" + }, + { + "id": "298", + "name": "user_country_preferences", + "x": -1031.650470781881, + "y": -1037.213119188802, + "fields": [ + { + "id": "299", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548950226 + }, + { + "id": "300", + "name": "country_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548914423 + }, + { + "id": "301", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548957483 + } + ], + "indexes": [], + "color": "#4dee8a", + "createdAt": 1778548914423, + "isView": false, + "order": 33, + "schema": "public" + } + ], + "relationships": [ + { + "id": "302", + "name": "episodes_media_id_medias_id", + "sourceSchema": "public", + "sourceTableId": "1", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "3", + "targetFieldId": "34", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "303", + "name": "episodes_videos_videos_id", + "sourceSchema": "public", + "sourceTableId": "1", + "targetSchema": "public", + "targetTableId": "88", + "sourceFieldId": "15", + "targetFieldId": "89", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "304", + "name": "genres_id_fk", + "sourceSchema": "public", + "sourceTableId": "214", + "targetSchema": "public", + "targetTableId": "285", + "sourceFieldId": "215", + "targetFieldId": "287", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777295361546, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "305", + "name": "media_characters_characters_characters_id", + "sourceSchema": "public", + "sourceTableId": "110", + "targetSchema": "public", + "targetTableId": "20", + "sourceFieldId": "113", + "targetFieldId": "21", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "306", + "name": "media_characters_voice_actor_voice_actors_id", + "sourceSchema": "public", + "sourceTableId": "110", + "targetSchema": "public", + "targetTableId": "221", + "sourceFieldId": "114", + "targetFieldId": "222", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "307", + "name": "media_explicit_genres_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "214", + "targetSchema": "public", + "targetTableId": "129", + "sourceFieldId": "215", + "targetFieldId": "131", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283900006, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "308", + "name": "media_explicit_genres_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "129", + "sourceFieldId": "66", + "targetFieldId": "130", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283887322, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "309", + "name": "media_external_links_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "133", + "sourceFieldId": "34", + "targetFieldId": "135", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777299855251, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "310", + "name": "media_external_links_media_id_medias_id", + "sourceSchema": "public", + "sourceTableId": "133", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "135", + "targetFieldId": "34", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "311", + "name": "media_genres_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "214", + "targetSchema": "public", + "targetTableId": "226", + "sourceFieldId": "215", + "targetFieldId": "228", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283616203, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "312", + "name": "media_genres_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "226", + "sourceFieldId": "64", + "targetFieldId": "227", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283611719, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "313", + "name": "media_producers_producer_id_fk", + "sourceSchema": "public", + "sourceTableId": "143", + "targetSchema": "public", + "targetTableId": "101", + "sourceFieldId": "144", + "targetFieldId": "103", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360252829, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "314", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "79", + "sourceFieldId": "34", + "targetFieldId": "82", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777299808576, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "315", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "79", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "82", + "targetFieldId": "34", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777299795695, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "316", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "79", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "82", + "targetFieldId": "34", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777299804996, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "317", + "name": "media_relations_target_media_medias_id", + "sourceSchema": "public", + "sourceTableId": "79", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "82", + "targetFieldId": "34", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "318", + "name": "media_submissions_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "247", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "249", + "targetFieldId": "34", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777636061160, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "319", + "name": "media_submissions_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "247", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "249", + "targetFieldId": "34", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777364362256, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "320", + "name": "media_types_id_medias_type", + "sourceSchema": "public", + "sourceTableId": "276", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "277", + "targetFieldId": "45", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "321", + "name": "medias_age_rating_media_age_ratings_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "105", + "sourceFieldId": "51", + "targetFieldId": "106", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "322", + "name": "medias_characters_media_characters_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "110", + "sourceFieldId": "71", + "targetFieldId": "111", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "323", + "name": "medias_country_fk", + "sourceSchema": "public", + "sourceTableId": "121", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "122", + "targetFieldId": "59", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402285202, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "324", + "name": "medias_episodes_episodes_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "65", + "targetFieldId": "2", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "325", + "name": "medias_external_links_media_external_links_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "133", + "sourceFieldId": "70", + "targetFieldId": "134", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "326", + "name": "medias_licensors_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "210", + "sourceFieldId": "62", + "targetFieldId": "211", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360403880, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "327", + "name": "medias_producers_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "101", + "sourceFieldId": "61", + "targetFieldId": "102", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360239834, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "328", + "name": "medias_relations_media_relations_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "79", + "sourceFieldId": "69", + "targetFieldId": "80", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "329", + "name": "medias_source_media_sources_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "84", + "sourceFieldId": "46", + "targetFieldId": "85", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "330", + "name": "medias_status_media_statuses_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "139", + "sourceFieldId": "47", + "targetFieldId": "140", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "331", + "name": "medias_studios_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "206", + "sourceFieldId": "63", + "targetFieldId": "207", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360574406, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "332", + "name": "medias_themes_fk", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "285", + "sourceFieldId": "67", + "targetFieldId": "286", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777295350412, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "333", + "name": "medias_trailers_media_trailers_id", + "sourceSchema": "public", + "sourceTableId": "33", + "targetSchema": "public", + "targetTableId": "267", + "sourceFieldId": "40", + "targetFieldId": "268", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "334", + "name": "producers_id_fk", + "sourceSchema": "public", + "sourceTableId": "143", + "targetSchema": "public", + "targetTableId": "210", + "sourceFieldId": "144", + "targetFieldId": "212", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360416280, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "335", + "name": "producers_id_fk", + "sourceSchema": "public", + "sourceTableId": "143", + "targetSchema": "public", + "targetTableId": "206", + "sourceFieldId": "144", + "targetFieldId": "208", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360597827, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "336", + "name": "provisioned_users_provisioned_by_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "116", + "sourceFieldId": "186", + "targetFieldId": "117", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778517515380, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "337", + "name": "provisioned_users_provisioned_to_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "116", + "sourceFieldId": "186", + "targetFieldId": "118", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778517541887, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "340", + "name": "user_follows_follower_id_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "280", + "sourceFieldId": "186", + "targetFieldId": "281", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402073659, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "341", + "name": "user_follows_following_id_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "280", + "sourceFieldId": "186", + "targetFieldId": "282", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402077836, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "342", + "name": "user_oauth_credentials_id_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "166", + "sourceFieldId": "186", + "targetFieldId": "167", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778516921506, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "343", + "name": "user_preferences_character_as_partner_fk", + "sourceSchema": "public", + "sourceTableId": "20", + "targetSchema": "public", + "targetTableId": "154", + "sourceFieldId": "21", + "targetFieldId": "156", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778518451836, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "346", + "name": "user_preferences_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "154", + "targetSchema": "public", + "targetTableId": "185", + "sourceFieldId": "155", + "targetFieldId": "186", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778517654898, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "347", + "name": "users_country_fk", + "sourceSchema": "public", + "sourceTableId": "185", + "targetSchema": "public", + "targetTableId": "121", + "sourceFieldId": "197", + "targetFieldId": "122", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778401651979, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "348", + "name": "video_service_submissions_video_service_id_fk", + "sourceSchema": "public", + "sourceTableId": "257", + "targetSchema": "public", + "targetTableId": "230", + "sourceFieldId": "259", + "targetFieldId": "231", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777364068966, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "349", + "name": "videos_service_id_video_services_id", + "sourceSchema": "public", + "sourceTableId": "88", + "targetSchema": "public", + "targetTableId": "230", + "sourceFieldId": "90", + "targetFieldId": "231", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "350", + "name": "voice_actors_actor_staff_staff_id", + "sourceSchema": "public", + "sourceTableId": "221", + "targetSchema": "public", + "targetTableId": "175", + "sourceFieldId": "224", + "targetFieldId": "176", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "351", + "name": "genre_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "154", + "targetSchema": "public", + "targetTableId": "289", + "sourceFieldId": "155", + "targetFieldId": "290", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548583401 + }, + { + "id": "352", + "name": "genre_selected_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "214", + "targetSchema": "public", + "targetTableId": "289", + "sourceFieldId": "215", + "targetFieldId": "291", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548598785 + }, + { + "id": "353", + "name": "rating_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "154", + "targetSchema": "public", + "targetTableId": "294", + "sourceFieldId": "155", + "targetFieldId": "295", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548748682 + }, + { + "id": "354", + "name": "rating_selected_rating_id_fk", + "sourceSchema": "public", + "sourceTableId": "105", + "targetSchema": "public", + "targetTableId": "294", + "sourceFieldId": "106", + "targetFieldId": "296", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548767353 + }, + { + "id": "355", + "name": "user_country_preferences_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "154", + "targetSchema": "public", + "targetTableId": "298", + "sourceFieldId": "155", + "targetFieldId": "299", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549044482 + }, + { + "id": "356", + "name": "user_country_preferences_country_id_fk", + "sourceSchema": "public", + "sourceTableId": "121", + "targetSchema": "public", + "targetTableId": "298", + "sourceFieldId": "122", + "targetFieldId": "300", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549061296 + } + ], + "dependencies": [], + "areas": [], + "customTypes": [ + { + "id": "357", + "name": "address", + "kind": "composite", + "values": [], + "fields": [ + { + "field": "street_address", + "type": "varchar" + }, + { + "field": "subdistrict", + "type": "varchar" + }, + { + "field": "district", + "type": "varchar" + }, + { + "field": "city", + "type": "varchar" + }, + { + "field": "province", + "type": "varchar" + }, + { + "field": "postal_code", + "type": "int" + } + ], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "358", + "name": "status_submission", + "kind": "enum", + "values": [ + "pending", + "approved", + "rejected" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "359", + "name": "user_preference_state", + "kind": "enum", + "values": [ + "exclude", + "include" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + } + ], + "notes": [] +} \ No newline at end of file From a1e059a99b8daa7c06ed2a0f62f8f106deb1af4d Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Thu, 30 Apr 2026 21:00:00 +0700 Subject: [PATCH 05/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20history=5Fwa?= =?UTF-8?q?tch=20to=20database=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1874 +++++++++++++++++++++++-------------------- 1 file changed, 1002 insertions(+), 872 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 38e5847..ee5f4cb 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,18 +2,69 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-12T01:25:01.427Z", + "updatedAt": "2026-05-14T04:16:20.554Z", "databaseType": "postgresql", "tables": [ { "id": "1", + "name": "user_rating_preferences", + "x": -1031.8902110080458, + "y": -1219.5448311992495, + "fields": [ + { + "id": "2", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548671790 + }, + { + "id": "3", + "name": "rating_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548699069 + }, + { + "id": "4", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548704423 + } + ], + "indexes": [], + "color": "#4dee8a", + "createdAt": 1778548671790, + "isView": false, + "order": 32, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "5", "name": "episodes", "schema": "public", "x": 196.42495741544377, "y": 484.48992450910697, "fields": [ { - "id": "2", + "id": "6", "name": "id", "type": { "id": "uuid", @@ -25,7 +76,7 @@ "createdAt": 1777282589093 }, { - "id": "3", + "id": "7", "name": "media_id", "type": { "id": "uuid", @@ -37,7 +88,7 @@ "createdAt": 1777282589093 }, { - "id": "4", + "id": "8", "name": "episode", "type": { "id": "smallint", @@ -49,7 +100,7 @@ "createdAt": 1777282589093 }, { - "id": "5", + "id": "9", "name": "mal_url", "type": { "id": "varchar", @@ -62,7 +113,7 @@ "characterMaximumLength": "255" }, { - "id": "6", + "id": "10", "name": "mal_forum_url", "type": { "id": "varchar", @@ -75,7 +126,7 @@ "characterMaximumLength": "255" }, { - "id": "7", + "id": "11", "name": "title", "type": { "id": "varchar", @@ -88,7 +139,7 @@ "characterMaximumLength": "155" }, { - "id": "8", + "id": "12", "name": "title_origin", "type": { "id": "varchar", @@ -101,7 +152,7 @@ "characterMaximumLength": "155" }, { - "id": "9", + "id": "13", "name": "title_romanji", "type": { "id": "varchar", @@ -114,7 +165,7 @@ "characterMaximumLength": "155" }, { - "id": "10", + "id": "14", "name": "aired", "type": { "id": "date", @@ -126,7 +177,7 @@ "createdAt": 1777282589093 }, { - "id": "11", + "id": "15", "name": "filler", "type": { "id": "boolean", @@ -139,7 +190,7 @@ "default": "false" }, { - "id": "12", + "id": "16", "name": "recap", "type": { "id": "boolean", @@ -152,7 +203,7 @@ "default": "false" }, { - "id": "13", + "id": "17", "name": "total_score", "type": { "id": "int", @@ -164,7 +215,7 @@ "createdAt": 1777361135322 }, { - "id": "14", + "id": "18", "name": "scored_by", "type": { "id": "int", @@ -176,7 +227,7 @@ "createdAt": 1777361233825 }, { - "id": "15", + "id": "19", "name": "videos", "type": { "id": "uuid", @@ -188,7 +239,7 @@ "createdAt": 1777282589093 }, { - "id": "16", + "id": "20", "name": "deleted_at", "type": { "id": "timestamp", @@ -200,7 +251,7 @@ "createdAt": 1777282589093 }, { - "id": "17", + "id": "21", "name": "updated_at", "type": { "id": "timestamp", @@ -212,7 +263,7 @@ "createdAt": 1777282589093 }, { - "id": "18", + "id": "22", "name": "created_at", "type": { "id": "timestamp", @@ -226,11 +277,11 @@ ], "indexes": [ { - "id": "19", + "id": "23", "name": "", "unique": true, "fieldIds": [ - "2" + "6" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -244,14 +295,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "20", + "id": "24", "name": "characters", "schema": "public", "x": -1034.1161796853148, "y": 612.1533274157626, "fields": [ { - "id": "21", + "id": "25", "name": "id", "type": { "id": "uuid", @@ -263,7 +314,7 @@ "createdAt": 1777282589093 }, { - "id": "22", + "id": "26", "name": "name", "type": { "id": "varchar", @@ -276,7 +327,7 @@ "characterMaximumLength": "255" }, { - "id": "23", + "id": "27", "name": "image", "type": { "id": "varchar", @@ -289,7 +340,7 @@ "characterMaximumLength": "255" }, { - "id": "24", + "id": "28", "name": "small_image", "type": { "id": "varchar", @@ -302,7 +353,7 @@ "characterMaximumLength": "255" }, { - "id": "25", + "id": "29", "name": "mal_id", "type": { "id": "int", @@ -314,7 +365,7 @@ "createdAt": 1777282589093 }, { - "id": "26", + "id": "30", "name": "mal_url", "type": { "id": "varchar", @@ -327,7 +378,7 @@ "characterMaximumLength": "255" }, { - "id": "27", + "id": "31", "name": "liked", "type": { "id": "int", @@ -340,7 +391,7 @@ "default": "0" }, { - "id": "28", + "id": "32", "name": "connections", "type": { "id": "int", @@ -353,7 +404,7 @@ "default": "0" }, { - "id": "29", + "id": "33", "name": "deleted_at", "type": { "id": "timestamp", @@ -365,7 +416,7 @@ "createdAt": 1777282589093 }, { - "id": "30", + "id": "34", "name": "updated_at", "type": { "id": "timestamp", @@ -377,7 +428,7 @@ "createdAt": 1777282589093 }, { - "id": "31", + "id": "35", "name": "created_at", "type": { "id": "timestamp", @@ -391,11 +442,11 @@ ], "indexes": [ { - "id": "32", + "id": "36", "name": "", "unique": true, "fieldIds": [ - "21" + "25" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -409,14 +460,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "33", + "id": "37", "name": "medias", "schema": "public", "x": -335, "y": -337.5, "fields": [ { - "id": "34", + "id": "38", "name": "id", "type": { "id": "uuid", @@ -428,7 +479,7 @@ "createdAt": 1777282589092 }, { - "id": "35", + "id": "39", "name": "mal_id", "type": { "id": "int", @@ -440,7 +491,7 @@ "createdAt": 1777282589092 }, { - "id": "36", + "id": "40", "name": "title", "type": { "id": "varchar", @@ -453,7 +504,7 @@ "characterMaximumLength": "255" }, { - "id": "37", + "id": "41", "name": "title_secondary", "type": { "id": "varchar", @@ -466,7 +517,7 @@ "characterMaximumLength": "255" }, { - "id": "38", + "id": "42", "name": "title_original", "type": { "id": "varchar", @@ -479,7 +530,7 @@ "characterMaximumLength": "255" }, { - "id": "39", + "id": "43", "name": "title_synonyms", "type": { "id": "varchar", @@ -493,7 +544,7 @@ "comments": "This is Array" }, { - "id": "40", + "id": "44", "name": "trailers", "type": { "id": "uuid", @@ -505,7 +556,7 @@ "createdAt": 1777282589092 }, { - "id": "41", + "id": "45", "name": "synopsis", "type": { "id": "text", @@ -517,7 +568,7 @@ "createdAt": 1777282589092 }, { - "id": "42", + "id": "46", "name": "small_image_url", "type": { "id": "varchar", @@ -530,7 +581,7 @@ "characterMaximumLength": "255" }, { - "id": "43", + "id": "47", "name": "medium_image_url", "type": { "id": "varchar", @@ -543,7 +594,7 @@ "characterMaximumLength": "255" }, { - "id": "44", + "id": "48", "name": "large_image_url", "type": { "id": "varchar", @@ -556,7 +607,7 @@ "characterMaximumLength": "255" }, { - "id": "45", + "id": "49", "name": "type", "type": { "id": "uuid", @@ -568,7 +619,7 @@ "createdAt": 1777282589092 }, { - "id": "46", + "id": "50", "name": "source", "type": { "id": "uuid", @@ -580,7 +631,7 @@ "createdAt": 1777282589092 }, { - "id": "47", + "id": "51", "name": "status", "type": { "id": "uuid", @@ -592,7 +643,7 @@ "createdAt": 1777282589092 }, { - "id": "48", + "id": "52", "name": "airing", "type": { "id": "boolean", @@ -605,7 +656,7 @@ "default": "false" }, { - "id": "49", + "id": "53", "name": "start_airing", "type": { "id": "date", @@ -617,7 +668,7 @@ "createdAt": 1777282589092 }, { - "id": "50", + "id": "54", "name": "end_airing", "type": { "id": "date", @@ -629,7 +680,7 @@ "createdAt": 1777282589092 }, { - "id": "51", + "id": "55", "name": "age_rating", "type": { "id": "uuid", @@ -641,7 +692,7 @@ "createdAt": 1777282589092 }, { - "id": "52", + "id": "56", "name": "score", "type": { "id": "numeric", @@ -656,7 +707,7 @@ "default": "0" }, { - "id": "53", + "id": "57", "name": "score_total", "type": { "id": "int", @@ -669,7 +720,7 @@ "default": "0" }, { - "id": "54", + "id": "58", "name": "scored_by", "type": { "id": "int", @@ -682,7 +733,7 @@ "default": "0" }, { - "id": "55", + "id": "59", "name": "favourites", "type": { "id": "int", @@ -695,7 +746,7 @@ "default": "0" }, { - "id": "56", + "id": "60", "name": "background", "type": { "id": "text", @@ -707,7 +758,7 @@ "createdAt": 1777282589092 }, { - "id": "57", + "id": "61", "name": "season", "type": { "id": "varchar", @@ -721,7 +772,7 @@ "comments": "enum(winter, spring, summer, fall)" }, { - "id": "58", + "id": "62", "name": "year", "type": { "id": "smallint", @@ -733,7 +784,7 @@ "createdAt": 1777282589092 }, { - "id": "59", + "id": "63", "name": "country", "type": { "id": "uuid", @@ -745,7 +796,7 @@ "createdAt": 1777635858846 }, { - "id": "60", + "id": "64", "name": "broadcast_date", "type": { "id": "varchar", @@ -758,7 +809,7 @@ "characterMaximumLength": "64" }, { - "id": "61", + "id": "65", "name": "producers", "type": { "id": "uuid", @@ -770,7 +821,7 @@ "createdAt": 1777282589092 }, { - "id": "62", + "id": "66", "name": "licensors", "type": { "id": "uuid", @@ -782,7 +833,7 @@ "createdAt": 1777282589092 }, { - "id": "63", + "id": "67", "name": "studios", "type": { "id": "uuid", @@ -794,7 +845,7 @@ "createdAt": 1777282589092 }, { - "id": "64", + "id": "68", "name": "genres", "type": { "id": "uuid", @@ -806,7 +857,7 @@ "createdAt": 1777282589092 }, { - "id": "65", + "id": "69", "name": "episodes", "type": { "id": "uuid", @@ -818,7 +869,7 @@ "createdAt": 1777282589092 }, { - "id": "66", + "id": "70", "name": "explicit_genres", "type": { "id": "uuid", @@ -830,7 +881,7 @@ "createdAt": 1777282589092 }, { - "id": "67", + "id": "71", "name": "themes", "type": { "id": "uuid", @@ -842,7 +893,7 @@ "createdAt": 1777282589092 }, { - "id": "68", + "id": "72", "name": "demographics", "type": { "id": "uuid", @@ -854,7 +905,7 @@ "createdAt": 1777282589092 }, { - "id": "69", + "id": "73", "name": "relations", "type": { "id": "uuid", @@ -866,7 +917,7 @@ "createdAt": 1777282589092 }, { - "id": "70", + "id": "74", "name": "external_links", "type": { "id": "uuid", @@ -878,7 +929,7 @@ "createdAt": 1777282589092 }, { - "id": "71", + "id": "75", "name": "characters", "type": { "id": "uuid", @@ -890,7 +941,7 @@ "createdAt": 1777282589092 }, { - "id": "72", + "id": "76", "name": "approved", "type": { "id": "boolean", @@ -903,7 +954,7 @@ "default": "false" }, { - "id": "73", + "id": "77", "name": "approved_by", "type": { "id": "uuid", @@ -915,7 +966,7 @@ "createdAt": 1777282589092 }, { - "id": "74", + "id": "78", "name": "created_by", "type": { "id": "uuid", @@ -927,7 +978,7 @@ "createdAt": 1777282589092 }, { - "id": "75", + "id": "79", "name": "deleted_at", "type": { "id": "timestamp", @@ -939,7 +990,7 @@ "createdAt": 1777282589092 }, { - "id": "76", + "id": "80", "name": "updated_at", "type": { "id": "timestamp", @@ -951,7 +1002,7 @@ "createdAt": 1777282589092 }, { - "id": "77", + "id": "81", "name": "created_at", "type": { "id": "timestamp", @@ -965,11 +1016,11 @@ ], "indexes": [ { - "id": "78", + "id": "82", "name": "", "unique": true, "fieldIds": [ - "34" + "38" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -984,14 +1035,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "79", + "id": "83", "name": "media_relations", "schema": "public", "x": 196.76101626573526, "y": -96.79417551573586, "fields": [ { - "id": "80", + "id": "84", "name": "id", "type": { "id": "uuid", @@ -1003,7 +1054,7 @@ "createdAt": 1777282589092 }, { - "id": "81", + "id": "85", "name": "relation", "type": { "id": "varchar", @@ -1016,7 +1067,7 @@ "characterMaximumLength": "16" }, { - "id": "82", + "id": "86", "name": "target_media", "type": { "id": "uuid", @@ -1030,11 +1081,11 @@ ], "indexes": [ { - "id": "83", + "id": "87", "name": "", "unique": true, "fieldIds": [ - "80" + "84" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -1047,14 +1098,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "84", + "id": "88", "name": "media_sources", "schema": "public", "x": -680.0105470895069, "y": 97.06852307742538, "fields": [ { - "id": "85", + "id": "89", "name": "id", "type": { "id": "uuid", @@ -1066,7 +1117,7 @@ "createdAt": 1777282589093 }, { - "id": "86", + "id": "90", "name": "name", "type": { "id": "varchar", @@ -1081,11 +1132,11 @@ ], "indexes": [ { - "id": "87", + "id": "91", "name": "", "unique": true, "fieldIds": [ - "85" + "89" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1098,14 +1149,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "88", + "id": "92", "name": "videos", "schema": "public", "x": 612.3480632351478, "y": 523.768514660268, "fields": [ { - "id": "89", + "id": "93", "name": "id", "type": { "id": "uuid", @@ -1117,7 +1168,7 @@ "createdAt": 1777282589094 }, { - "id": "90", + "id": "94", "name": "service_id", "type": { "id": "uuid", @@ -1129,7 +1180,7 @@ "createdAt": 1777282589094 }, { - "id": "91", + "id": "95", "name": "video_code", "type": { "id": "varchar", @@ -1142,7 +1193,7 @@ "characterMaximumLength": "255" }, { - "id": "92", + "id": "96", "name": "short_code", "type": { "id": "varchar", @@ -1155,7 +1206,7 @@ "characterMaximumLength": "255" }, { - "id": "93", + "id": "97", "name": "thumbnail_code", "type": { "id": "varchar", @@ -1168,7 +1219,7 @@ "characterMaximumLength": "255" }, { - "id": "94", + "id": "98", "name": "download_code", "type": { "id": "varchar", @@ -1181,7 +1232,7 @@ "characterMaximumLength": "255" }, { - "id": "95", + "id": "99", "name": "pending_upload", "type": { "id": "boolean", @@ -1194,7 +1245,7 @@ "default": "true" }, { - "id": "96", + "id": "100", "name": "created_by", "type": { "id": "uuid", @@ -1206,7 +1257,7 @@ "createdAt": 1777282589094 }, { - "id": "97", + "id": "101", "name": "deleted_at", "type": { "id": "timestamp", @@ -1218,7 +1269,7 @@ "createdAt": 1777282589094 }, { - "id": "98", + "id": "102", "name": "updated_at", "type": { "id": "timestamp", @@ -1230,7 +1281,7 @@ "createdAt": 1777282589094 }, { - "id": "99", + "id": "103", "name": "created_at", "type": { "id": "timestamp", @@ -1244,11 +1295,11 @@ ], "indexes": [ { - "id": "100", + "id": "104", "name": "", "unique": true, "fieldIds": [ - "89" + "93" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -1261,14 +1312,65 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "101", + "id": "105", + "name": "user_country_preferences", + "x": -1031.650470781881, + "y": -1037.213119188802, + "fields": [ + { + "id": "106", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548950226 + }, + { + "id": "107", + "name": "country_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548914423 + }, + { + "id": "108", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548957483 + } + ], + "indexes": [], + "color": "#4dee8a", + "createdAt": 1778548914423, + "isView": false, + "order": 33, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "109", "name": "media_producers", "schema": "public", "x": 197.29835902390482, "y": 69.49260163533236, "fields": [ { - "id": "102", + "id": "110", "name": "media_id", "type": { "id": "uuid", @@ -1280,7 +1382,7 @@ "createdAt": 1777360177611 }, { - "id": "103", + "id": "111", "name": "producer_id", "type": { "id": "uuid", @@ -1294,12 +1396,12 @@ ], "indexes": [ { - "id": "104", + "id": "112", "name": "", "unique": true, "fieldIds": [ - "102", - "103" + "110", + "111" ], "createdAt": 1777360177611, "isPrimaryKey": true @@ -1312,14 +1414,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "105", + "id": "113", "name": "media_age_ratings", "schema": "public", "x": -679.7484316247582, "y": 342.88283833657397, "fields": [ { - "id": "106", + "id": "114", "name": "id", "type": { "id": "uuid", @@ -1331,7 +1433,7 @@ "createdAt": 1777282589093 }, { - "id": "107", + "id": "115", "name": "name", "type": { "id": "varchar", @@ -1344,7 +1446,7 @@ "characterMaximumLength": "64" }, { - "id": "108", + "id": "116", "name": "min_age", "type": { "id": "smallint", @@ -1358,11 +1460,11 @@ ], "indexes": [ { - "id": "109", + "id": "117", "name": "", "unique": true, "fieldIds": [ - "106" + "114" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1375,14 +1477,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "110", + "id": "118", "name": "media_characters", "schema": "public", "x": -679.8245105809615, "y": 896.9123102253633, "fields": [ { - "id": "111", + "id": "119", "name": "id", "type": { "id": "uuid", @@ -1394,7 +1496,7 @@ "createdAt": 1777282589093 }, { - "id": "112", + "id": "120", "name": "role", "type": { "id": "enum", @@ -1407,7 +1509,7 @@ "comments": "main, supporting" }, { - "id": "113", + "id": "121", "name": "characters", "type": { "id": "uuid", @@ -1419,7 +1521,7 @@ "createdAt": 1777282589093 }, { - "id": "114", + "id": "122", "name": "voice_actor", "type": { "id": "uuid", @@ -1433,11 +1535,11 @@ ], "indexes": [ { - "id": "115", + "id": "123", "name": "", "unique": true, "fieldIds": [ - "111" + "119" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1450,13 +1552,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "116", + "id": "124", "name": "provisioned_users", "x": 198.53800896575544, "y": -1247.1936387119304, "fields": [ { - "id": "117", + "id": "125", "name": "provisioned_by", "type": { "id": "uuid", @@ -1468,7 +1570,7 @@ "createdAt": 1778517368377 }, { - "id": "118", + "id": "126", "name": "provisioned_to", "type": { "id": "uuid", @@ -1480,7 +1582,7 @@ "createdAt": 1778517463769 }, { - "id": "119", + "id": "127", "name": "provisioned_at", "type": { "id": "timestamp", @@ -1492,7 +1594,7 @@ "createdAt": 1778517476998 }, { - "id": "120", + "id": "128", "name": "reason", "type": { "id": "bigint", @@ -1513,13 +1615,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "121", + "id": "129", "name": "system_country", "x": -675.4825871206289, "y": -936.5527418709639, "fields": [ { - "id": "122", + "id": "130", "name": "id", "type": { "id": "uuid", @@ -1531,7 +1633,7 @@ "createdAt": 1778401101216 }, { - "id": "123", + "id": "131", "name": "name", "type": { "id": "varchar", @@ -1544,7 +1646,7 @@ "characterMaximumLength": "155" }, { - "id": "124", + "id": "132", "name": "slug", "type": { "id": "varchar", @@ -1557,7 +1659,7 @@ "characterMaximumLength": "165" }, { - "id": "125", + "id": "133", "name": "code", "type": { "id": "varchar", @@ -1570,7 +1672,7 @@ "characterMaximumLength": "3" }, { - "id": "126", + "id": "134", "name": "flag", "type": { "id": "varchar", @@ -1583,7 +1685,7 @@ "characterMaximumLength": "255" }, { - "id": "127", + "id": "135", "name": "banner", "type": { "id": "varchar", @@ -1598,10 +1700,10 @@ ], "indexes": [ { - "id": "128", + "id": "136", "name": "", "fieldIds": [ - "122" + "130" ], "unique": true, "isPrimaryKey": true, @@ -1616,14 +1718,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "129", + "id": "137", "name": "media_explicit_genres", "schema": "public", "x": -681.3338818918861, "y": 628.1224828360978, "fields": [ { - "id": "130", + "id": "138", "name": "media_id", "type": { "id": "uuid", @@ -1635,7 +1737,7 @@ "createdAt": 1777283776082 }, { - "id": "131", + "id": "139", "name": "genre_id", "type": { "id": "uuid", @@ -1649,12 +1751,12 @@ ], "indexes": [ { - "id": "132", + "id": "140", "name": "", "unique": true, "fieldIds": [ - "130", - "131" + "138", + "139" ], "createdAt": 1777283776082, "isPrimaryKey": true @@ -1668,14 +1770,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "133", + "id": "141", "name": "media_external_links", "schema": "public", "x": 196.86867462069478, "y": -298.9741574566786, "fields": [ { - "id": "134", + "id": "142", "name": "id", "type": { "id": "uuid", @@ -1687,7 +1789,7 @@ "createdAt": 1777282589093 }, { - "id": "135", + "id": "143", "name": "media_id", "type": { "id": "uuid", @@ -1699,7 +1801,7 @@ "createdAt": 1777282589093 }, { - "id": "136", + "id": "144", "name": "name", "type": { "id": "varchar", @@ -1712,7 +1814,7 @@ "characterMaximumLength": "64" }, { - "id": "137", + "id": "145", "name": "url", "type": { "id": "varchar", @@ -1727,11 +1829,11 @@ ], "indexes": [ { - "id": "138", + "id": "146", "name": "", "unique": true, "fieldIds": [ - "134" + "142" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1744,14 +1846,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "139", + "id": "147", "name": "media_statuses", "schema": "public", "x": -679.4669719043579, "y": 219.3548090436041, "fields": [ { - "id": "140", + "id": "148", "name": "id", "type": { "id": "uuid", @@ -1763,7 +1865,7 @@ "createdAt": 1777282589093 }, { - "id": "141", + "id": "149", "name": "name", "type": { "id": "varchar", @@ -1778,11 +1880,11 @@ ], "indexes": [ { - "id": "142", + "id": "150", "name": "", "unique": true, "fieldIds": [ - "140" + "148" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1795,14 +1897,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "143", + "id": "151", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "144", + "id": "152", "name": "id", "type": { "id": "uuid", @@ -1814,7 +1916,7 @@ "createdAt": 1777282589093 }, { - "id": "145", + "id": "153", "name": "mal_id", "type": { "id": "int", @@ -1826,7 +1928,7 @@ "createdAt": 1777282589093 }, { - "id": "146", + "id": "154", "name": "type", "type": { "id": "varchar", @@ -1839,7 +1941,7 @@ "characterMaximumLength": "24" }, { - "id": "147", + "id": "155", "name": "name", "type": { "id": "varchar", @@ -1852,7 +1954,7 @@ "characterMaximumLength": "155" }, { - "id": "148", + "id": "156", "name": "url", "type": { "id": "varchar", @@ -1865,7 +1967,7 @@ "characterMaximumLength": "255" }, { - "id": "149", + "id": "157", "name": "created_by", "type": { "id": "uuid", @@ -1877,7 +1979,7 @@ "createdAt": 1777282589094 }, { - "id": "150", + "id": "158", "name": "deleted_at", "type": { "id": "timestamp", @@ -1889,7 +1991,7 @@ "createdAt": 1777282589094 }, { - "id": "151", + "id": "159", "name": "updated_at", "type": { "id": "timestamp", @@ -1901,7 +2003,7 @@ "createdAt": 1777282589094 }, { - "id": "152", + "id": "160", "name": "created_at", "type": { "id": "timestamp", @@ -1915,11 +2017,11 @@ ], "indexes": [ { - "id": "153", + "id": "161", "name": "", "unique": true, "fieldIds": [ - "144" + "152" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -1932,13 +2034,76 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "154", + "id": "162", + "name": "user_watch_histories", + "x": -332.9619668726204, + "y": -1195.632513286341, + "fields": [ + { + "id": "163", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778569467263 + }, + { + "id": "164", + "name": "episode_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778569477336 + }, + { + "id": "165", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778569489813 + } + ], + "indexes": [ + { + "id": "166", + "name": "index_1", + "fieldIds": [ + "164", + "163" + ], + "unique": true, + "createdAt": 1778732177200 + } + ], + "color": "#9ef07a", + "createdAt": 1778569427313, + "isView": false, + "order": 34, + "schema": "public", + "width": 337, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "167", "name": "user_preferences", "x": -675.7144111335546, "y": -1493.2312805453928, "fields": [ { - "id": "155", + "id": "168", "name": "user_id", "type": { "id": "uuid", @@ -1950,7 +2115,7 @@ "createdAt": 1778517633815 }, { - "id": "156", + "id": "169", "name": "character_as_partner", "type": { "id": "uuid", @@ -1962,7 +2127,7 @@ "createdAt": 1778518390023 }, { - "id": "157", + "id": "170", "name": "watch_history", "type": { "id": "boolean", @@ -1975,7 +2140,7 @@ "default": "true" }, { - "id": "158", + "id": "171", "name": "search_history", "type": { "id": "boolean", @@ -1988,7 +2153,7 @@ "default": "false" }, { - "id": "159", + "id": "172", "name": "private_account", "type": { "id": "boolean", @@ -2001,7 +2166,7 @@ "default": "false" }, { - "id": "160", + "id": "173", "name": "message_open", "type": { "id": "boolean", @@ -2014,7 +2179,7 @@ "default": "true" }, { - "id": "161", + "id": "174", "name": "birthday_open", "type": { "id": "boolean", @@ -2027,7 +2192,7 @@ "default": "false" }, { - "id": "162", + "id": "175", "name": "email_open", "type": { "id": "boolean", @@ -2040,7 +2205,7 @@ "default": "false" }, { - "id": "163", + "id": "176", "name": "number_open", "type": { "id": "boolean", @@ -2053,7 +2218,7 @@ "default": "false" }, { - "id": "164", + "id": "177", "name": "partner_open", "type": { "id": "boolean", @@ -2064,14 +2229,27 @@ "primaryKey": false, "createdAt": 1778518357114, "default": "true" + }, + { + "id": "178", + "name": "comment_picture", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778551730755, + "characterMaximumLength": "255" } ], "indexes": [ { - "id": "165", + "id": "179", "name": "", "fieldIds": [ - "155" + "168" ], "unique": true, "isPrimaryKey": true, @@ -2087,13 +2265,75 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "166", + "id": "180", + "name": "user_genre_preferences", + "x": -1031.4466584554384, + "y": -1409.2323402083748, + "fields": [ + { + "id": "181", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548513047 + }, + { + "id": "182", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548529915 + }, + { + "id": "183", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778548535529 + } + ], + "indexes": [ + { + "id": "184", + "name": "index_1", + "fieldIds": [ + "181", + "182" + ], + "unique": true, + "createdAt": 1778548614328 + } + ], + "color": "#4dee8a", + "createdAt": 1778548513047, + "isView": false, + "order": 31, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "185", "name": "user_oauth_credentials", "x": 196.34821847988283, "y": -849.1992179045876, "fields": [ { - "id": "167", + "id": "186", "name": "id", "type": { "id": "uuid", @@ -2105,7 +2345,7 @@ "createdAt": 1778516299633 }, { - "id": "168", + "id": "187", "name": "user_id", "type": { "id": "uuid", @@ -2117,7 +2357,7 @@ "createdAt": 1778516366928 }, { - "id": "169", + "id": "188", "name": "oauth_id", "type": { "id": "uuid", @@ -2129,7 +2369,7 @@ "createdAt": 1778516373206 }, { - "id": "170", + "id": "189", "name": "provider_token", "type": { "id": "varchar", @@ -2141,7 +2381,7 @@ "createdAt": 1778516403942 }, { - "id": "171", + "id": "190", "name": "provider_sub", "type": { "id": "varchar", @@ -2153,7 +2393,7 @@ "createdAt": 1778516761873 }, { - "id": "172", + "id": "191", "name": "last_action", "type": { "id": "timestamp", @@ -2167,21 +2407,21 @@ ], "indexes": [ { - "id": "173", + "id": "192", "name": "", "fieldIds": [ - "167" + "186" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778516299633 }, { - "id": "174", + "id": "193", "name": "index_2", "fieldIds": [ - "169", - "168" + "188", + "187" ], "unique": true, "createdAt": 1778516903425 @@ -2195,14 +2435,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "175", + "id": "194", "name": "staff", "schema": "public", "x": -1353.8131838183044, "y": 434.2501348320311, "fields": [ { - "id": "176", + "id": "195", "name": "id", "type": { "id": "uuid", @@ -2214,7 +2454,7 @@ "createdAt": 1777282589093 }, { - "id": "177", + "id": "196", "name": "name", "type": { "id": "varchar", @@ -2227,7 +2467,7 @@ "characterMaximumLength": "255" }, { - "id": "178", + "id": "197", "name": "image", "type": { "id": "varchar", @@ -2240,7 +2480,7 @@ "characterMaximumLength": "255" }, { - "id": "179", + "id": "198", "name": "mal_id", "type": { "id": "int", @@ -2252,7 +2492,7 @@ "createdAt": 1777282589093 }, { - "id": "180", + "id": "199", "name": "mal_url", "type": { "id": "varchar", @@ -2265,7 +2505,7 @@ "characterMaximumLength": "255" }, { - "id": "181", + "id": "200", "name": "deleted_at", "type": { "id": "timestamp", @@ -2277,7 +2517,7 @@ "createdAt": 1777282589093 }, { - "id": "182", + "id": "201", "name": "updated_at", "type": { "id": "timestamp", @@ -2289,7 +2529,7 @@ "createdAt": 1777282589093 }, { - "id": "183", + "id": "202", "name": "created_at", "type": { "id": "timestamp", @@ -2303,11 +2543,11 @@ ], "indexes": [ { - "id": "184", + "id": "203", "name": "", "unique": true, "fieldIds": [ - "176" + "195" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2320,13 +2560,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "185", + "id": "204", "name": "users", "x": -333.07222985751173, - "y": -1032.6662184555098, + "y": -1009.2656254027879, "fields": [ { - "id": "186", + "id": "205", "name": "id", "type": { "id": "uuid", @@ -2338,7 +2578,7 @@ "createdAt": 1778390635628 }, { - "id": "187", + "id": "206", "name": "email", "type": { "id": "varchar", @@ -2350,7 +2590,7 @@ "createdAt": 1778391266880 }, { - "id": "188", + "id": "207", "name": "password", "type": { "id": "varchar", @@ -2363,7 +2603,7 @@ "characterMaximumLength": "255" }, { - "id": "189", + "id": "208", "name": "username", "type": { "id": "varchar", @@ -2376,7 +2616,7 @@ "characterMaximumLength": "28" }, { - "id": "190", + "id": "209", "name": "fullname", "type": { "id": "varchar", @@ -2389,7 +2629,7 @@ "characterMaximumLength": "32" }, { - "id": "191", + "id": "210", "name": "avatar", "type": { "id": "varchar", @@ -2402,7 +2642,7 @@ "characterMaximumLength": "255" }, { - "id": "192", + "id": "211", "name": "bio", "type": { "id": "text", @@ -2414,7 +2654,7 @@ "createdAt": 1778390888222 }, { - "id": "193", + "id": "212", "name": "datebirth", "type": { "id": "date", @@ -2426,20 +2666,19 @@ "createdAt": 1778391007890 }, { - "id": "194", + "id": "213", "name": "sex", "type": { - "id": "varchar", - "name": "varchar" + "id": "user_sex", + "name": "user_sex" }, "unique": false, "nullable": true, "primaryKey": false, - "createdAt": 1778391031530, - "characterMaximumLength": "12" + "createdAt": 1778391031530 }, { - "id": "195", + "id": "214", "name": "phone_number", "type": { "id": "varchar", @@ -2452,7 +2691,7 @@ "characterMaximumLength": "15" }, { - "id": "196", + "id": "215", "name": "address", "type": { "id": "address", @@ -2464,7 +2703,7 @@ "createdAt": 1778401066100 }, { - "id": "197", + "id": "216", "name": "country", "type": { "id": "uuid", @@ -2476,7 +2715,7 @@ "createdAt": 1778401621258 }, { - "id": "198", + "id": "217", "name": "auth_provider", "type": { "id": "varchar", @@ -2489,7 +2728,7 @@ "characterMaximumLength": "64" }, { - "id": "199", + "id": "218", "name": "provider_token", "type": { "id": "varchar", @@ -2502,7 +2741,7 @@ "characterMaximumLength": "255" }, { - "id": "200", + "id": "219", "name": "created_at", "type": { "id": "timestamp", @@ -2515,7 +2754,7 @@ "default": "now()" }, { - "id": "201", + "id": "220", "name": "updated_at", "type": { "id": "timestamp", @@ -2527,7 +2766,7 @@ "createdAt": 1778517127447 }, { - "id": "202", + "id": "221", "name": "deleted_at", "type": { "id": "timestamp", @@ -2541,29 +2780,29 @@ ], "indexes": [ { - "id": "203", + "id": "222", "name": "", "fieldIds": [ - "186" + "205" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778390635628 }, { - "id": "204", + "id": "223", "name": "index_2", "fieldIds": [ - "189" + "208" ], "unique": true, "createdAt": 1778401234711 }, { - "id": "205", + "id": "224", "name": "index_3", "fieldIds": [ - "187" + "206" ], "unique": true, "createdAt": 1778401248519 @@ -2580,14 +2819,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "206", + "id": "225", "name": "media_studios", "schema": "public", "x": 199.29817359050787, "y": 347.7468004324893, "fields": [ { - "id": "207", + "id": "226", "name": "media_id", "type": { "id": "uuid", @@ -2599,7 +2838,7 @@ "createdAt": 1777360514222 }, { - "id": "208", + "id": "227", "name": "producer_id", "type": { "id": "uuid", @@ -2613,12 +2852,12 @@ ], "indexes": [ { - "id": "209", + "id": "228", "name": "", "unique": true, "fieldIds": [ - "207", - "208" + "226", + "227" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -2631,14 +2870,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "210", + "id": "229", "name": "media_licencors", "schema": "public", "x": 196.51843134292955, "y": 207.07984381762645, "fields": [ { - "id": "211", + "id": "230", "name": "media_id", "type": { "id": "uuid", @@ -2650,7 +2889,7 @@ "createdAt": 1777360331507 }, { - "id": "212", + "id": "231", "name": "producer_id", "type": { "id": "uuid", @@ -2664,12 +2903,12 @@ ], "indexes": [ { - "id": "213", + "id": "232", "name": "", "unique": true, "fieldIds": [ - "211", - "212" + "230", + "231" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -2682,14 +2921,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "214", + "id": "233", "name": "genres", "schema": "public", "x": -1029.312729060423, "y": 207.074167755134, "fields": [ { - "id": "215", + "id": "234", "name": "id", "type": { "id": "uuid", @@ -2701,7 +2940,7 @@ "createdAt": 1777282589094 }, { - "id": "216", + "id": "235", "name": "mal_id", "type": { "id": "smallint", @@ -2713,7 +2952,7 @@ "createdAt": 1777282589094 }, { - "id": "217", + "id": "236", "name": "type", "type": { "id": "varchar", @@ -2726,7 +2965,7 @@ "characterMaximumLength": "16" }, { - "id": "218", + "id": "237", "name": "name", "type": { "id": "varchar", @@ -2739,7 +2978,7 @@ "characterMaximumLength": "32" }, { - "id": "219", + "id": "238", "name": "url", "type": { "id": "varchar", @@ -2754,11 +2993,11 @@ ], "indexes": [ { - "id": "220", + "id": "239", "name": "", "unique": true, "fieldIds": [ - "215" + "234" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -2771,14 +3010,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "221", + "id": "240", "name": "voice_actors", "schema": "public", "x": -1034.2719335611268, "y": 442.32720385328116, "fields": [ { - "id": "222", + "id": "241", "name": "id", "type": { "id": "uuid", @@ -2790,7 +3029,7 @@ "createdAt": 1777282589093 }, { - "id": "223", + "id": "242", "name": "language", "type": { "id": "varchar", @@ -2803,7 +3042,7 @@ "characterMaximumLength": "115" }, { - "id": "224", + "id": "243", "name": "actor_staff", "type": { "id": "uuid", @@ -2817,11 +3056,11 @@ ], "indexes": [ { - "id": "225", + "id": "244", "name": "", "unique": true, "fieldIds": [ - "222" + "241" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2834,26 +3073,26 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "226", + "id": "245", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "227", + "id": "246", "name": "media_id", "type": { "id": "uuid", "name": "uuid" }, - "primaryKey": true, + "primaryKey": false, "unique": true, "nullable": false, "createdAt": 1777283473368 }, { - "id": "228", + "id": "247", "name": "genre_id", "type": { "id": "uuid", @@ -2867,15 +3106,24 @@ ], "indexes": [ { - "id": "229", + "id": "248", "name": "", "unique": true, "fieldIds": [ - "227", - "228" + "247" ], "createdAt": 1777283473368, "isPrimaryKey": true + }, + { + "id": "249", + "name": "index_1", + "fieldIds": [ + "246", + "247" + ], + "unique": true, + "createdAt": 1778570545534 } ], "checkConstraints": [], @@ -2887,14 +3135,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "230", + "id": "250", "name": "video_services", "schema": "public", "x": 76.84794405482987, "y": 1174.3220047083446, "fields": [ { - "id": "231", + "id": "251", "name": "id", "type": { "id": "uuid", @@ -2906,7 +3154,7 @@ "createdAt": 1777282589094 }, { - "id": "232", + "id": "252", "name": "name", "type": { "id": "varchar", @@ -2919,7 +3167,7 @@ "characterMaximumLength": "155" }, { - "id": "233", + "id": "253", "name": "resolution", "type": { "id": "smallint", @@ -2931,7 +3179,7 @@ "createdAt": 1777282589094 }, { - "id": "234", + "id": "254", "name": "domain", "type": { "id": "varchar", @@ -2944,7 +3192,7 @@ "characterMaximumLength": "255" }, { - "id": "235", + "id": "255", "name": "image_url", "type": { "id": "varchar", @@ -2957,7 +3205,7 @@ "characterMaximumLength": "255" }, { - "id": "236", + "id": "256", "name": "hex_color", "type": { "id": "varchar", @@ -2970,7 +3218,7 @@ "characterMaximumLength": "10" }, { - "id": "237", + "id": "257", "name": "endpoint_video", "type": { "id": "varchar", @@ -2983,7 +3231,7 @@ "characterMaximumLength": "255" }, { - "id": "238", + "id": "258", "name": "endpoint_short", "type": { "id": "varchar", @@ -2996,7 +3244,7 @@ "characterMaximumLength": "255" }, { - "id": "239", + "id": "259", "name": "endpoint_image", "type": { "id": "varchar", @@ -3009,7 +3257,7 @@ "characterMaximumLength": "255" }, { - "id": "240", + "id": "260", "name": "endpoint_download", "type": { "id": "varchar", @@ -3022,7 +3270,7 @@ "characterMaximumLength": "255" }, { - "id": "241", + "id": "261", "name": "created_by", "type": { "id": "uuid", @@ -3034,7 +3282,7 @@ "createdAt": 1777282589094 }, { - "id": "242", + "id": "262", "name": "deleted_at", "type": { "id": "timestamp", @@ -3046,7 +3294,7 @@ "createdAt": 1777282589094 }, { - "id": "243", + "id": "263", "name": "updated_at", "type": { "id": "timestamp", @@ -3058,7 +3306,7 @@ "createdAt": 1777282589094 }, { - "id": "244", + "id": "264", "name": "created_at", "type": { "id": "timestamp", @@ -3072,22 +3320,22 @@ ], "indexes": [ { - "id": "245", + "id": "265", "name": "", "unique": true, "fieldIds": [ - "231" + "251" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "246", + "id": "266", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "232", - "233" + "252", + "253" ], "createdAt": 1777282589094 } @@ -3101,14 +3349,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "247", + "id": "267", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "248", + "id": "268", "name": "id", "type": { "id": "uuid", @@ -3120,7 +3368,7 @@ "createdAt": 1777362610195 }, { - "id": "249", + "id": "269", "name": "media_id", "type": { "id": "uuid", @@ -3132,7 +3380,7 @@ "createdAt": 1777362624424 }, { - "id": "250", + "id": "270", "name": "created_by", "type": { "id": "uuid", @@ -3145,7 +3393,7 @@ "comments": "" }, { - "id": "251", + "id": "271", "name": "status", "type": { "id": "status_submission", @@ -3158,7 +3406,7 @@ "comments": "" }, { - "id": "252", + "id": "272", "name": "reviewed_by", "type": { "id": "uuid", @@ -3170,7 +3418,7 @@ "createdAt": 1777362758238 }, { - "id": "253", + "id": "273", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3182,7 +3430,7 @@ "createdAt": 1777363627973 }, { - "id": "254", + "id": "274", "name": "reason", "type": { "id": "text", @@ -3194,7 +3442,7 @@ "createdAt": 1777363674757 }, { - "id": "255", + "id": "275", "name": "created_at", "type": { "id": "timestamp", @@ -3209,11 +3457,11 @@ ], "indexes": [ { - "id": "256", + "id": "276", "name": "", "unique": true, "fieldIds": [ - "248" + "268" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3226,14 +3474,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "257", + "id": "277", "name": "video_service_submissions", "schema": "public", "x": -333.34786174583087, "y": 1240.4231339730102, "fields": [ { - "id": "258", + "id": "278", "name": "id", "type": { "id": "uuid", @@ -3245,7 +3493,7 @@ "createdAt": 1777362610195 }, { - "id": "259", + "id": "279", "name": "video_service_id", "type": { "id": "uuid", @@ -3257,7 +3505,7 @@ "createdAt": 1777362624424 }, { - "id": "260", + "id": "280", "name": "created_by", "type": { "id": "uuid", @@ -3270,7 +3518,7 @@ "comments": "" }, { - "id": "261", + "id": "281", "name": "status", "type": { "id": "status_submission", @@ -3284,7 +3532,7 @@ "comments": "" }, { - "id": "262", + "id": "282", "name": "reviewed_by", "type": { "id": "uuid", @@ -3296,7 +3544,7 @@ "createdAt": 1777362758238 }, { - "id": "263", + "id": "283", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3308,7 +3556,7 @@ "createdAt": 1777363627973 }, { - "id": "264", + "id": "284", "name": "reason", "type": { "id": "text", @@ -3320,7 +3568,7 @@ "createdAt": 1777363674757 }, { - "id": "265", + "id": "285", "name": "created_at", "type": { "id": "timestamp", @@ -3335,11 +3583,11 @@ ], "indexes": [ { - "id": "266", + "id": "286", "name": "", "unique": true, "fieldIds": [ - "258" + "278" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3353,14 +3601,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "267", + "id": "287", "name": "media_trailers", "schema": "public", "x": -675.1193235825539, "y": -319.10973511128714, "fields": [ { - "id": "268", + "id": "288", "name": "id", "type": { "id": "uuid", @@ -3372,7 +3620,7 @@ "createdAt": 1777282589092 }, { - "id": "269", + "id": "289", "name": "url", "type": { "id": "varchar", @@ -3385,7 +3633,7 @@ "characterMaximumLength": "255" }, { - "id": "270", + "id": "290", "name": "embed_url", "type": { "id": "varchar", @@ -3398,7 +3646,7 @@ "characterMaximumLength": "255" }, { - "id": "271", + "id": "291", "name": "small_image_url", "type": { "id": "varchar", @@ -3411,7 +3659,7 @@ "characterMaximumLength": "255" }, { - "id": "272", + "id": "292", "name": "medium_image_url", "type": { "id": "varchar", @@ -3424,7 +3672,7 @@ "characterMaximumLength": "255" }, { - "id": "273", + "id": "293", "name": "large_image_url", "type": { "id": "varchar", @@ -3437,7 +3685,7 @@ "characterMaximumLength": "255" }, { - "id": "274", + "id": "294", "name": "maximum_image_url", "type": { "id": "varchar", @@ -3452,11 +3700,11 @@ ], "indexes": [ { - "id": "275", + "id": "295", "name": "", "unique": true, "fieldIds": [ - "268" + "288" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3469,14 +3717,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "276", + "id": "296", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "277", + "id": "297", "name": "id", "type": { "id": "uuid", @@ -3488,7 +3736,7 @@ "createdAt": 1777282589093 }, { - "id": "278", + "id": "298", "name": "name", "type": { "id": "varchar", @@ -3503,11 +3751,11 @@ ], "indexes": [ { - "id": "279", + "id": "299", "name": "", "unique": true, "fieldIds": [ - "277" + "297" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3520,13 +3768,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "280", + "id": "300", "name": "user_follows", "x": 196.81483126623533, "y": -1028.2763104312094, "fields": [ { - "id": "281", + "id": "301", "name": "follower_id", "type": { "id": "uuid", @@ -3538,7 +3786,7 @@ "createdAt": 1778401701334 }, { - "id": "282", + "id": "302", "name": "following_id", "type": { "id": "uuid", @@ -3550,7 +3798,7 @@ "createdAt": 1778401722682 }, { - "id": "283", + "id": "303", "name": "followed_at", "type": { "id": "timestamp", @@ -3564,11 +3812,11 @@ ], "indexes": [ { - "id": "284", + "id": "304", "name": "index_1", "fieldIds": [ - "282", - "281" + "302", + "301" ], "unique": true, "createdAt": 1778401874053 @@ -3590,14 +3838,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "285", + "id": "305", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "286", + "id": "306", "name": "media_id", "type": { "id": "uuid", @@ -3609,7 +3857,7 @@ "createdAt": 1777295294621 }, { - "id": "287", + "id": "307", "name": "genre_id", "type": { "id": "uuid", @@ -3623,12 +3871,12 @@ ], "indexes": [ { - "id": "288", + "id": "308", "name": "", "unique": true, "fieldIds": [ - "286", - "287" + "306", + "307" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -3640,571 +3888,312 @@ "width": 224, "order": 20, "diagramId": "yqwsqwccoj6v" - }, - { - "id": "289", - "name": "user_genre_preferences", - "x": -1031.4466584554384, - "y": -1409.2323402083748, - "fields": [ - { - "id": "290", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548513047 - }, - { - "id": "291", - "name": "genre_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548529915 - }, - { - "id": "292", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548535529 - } - ], - "indexes": [ - { - "id": "293", - "name": "index_1", - "fieldIds": [ - "290", - "291" - ], - "unique": true, - "createdAt": 1778548614328 - } - ], - "color": "#4dee8a", - "createdAt": 1778548513047, - "isView": false, - "order": 31, - "schema": "public" - }, - { - "id": "294", - "name": "user_rating_preferences", - "x": -1031.8902110080458, - "y": -1219.5448311992495, - "fields": [ - { - "id": "295", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548671790 - }, - { - "id": "296", - "name": "rating_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548699069 - }, - { - "id": "297", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548704423 - } - ], - "indexes": [], - "color": "#4dee8a", - "createdAt": 1778548671790, - "isView": false, - "order": 32, - "schema": "public" - }, - { - "id": "298", - "name": "user_country_preferences", - "x": -1031.650470781881, - "y": -1037.213119188802, - "fields": [ - { - "id": "299", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548950226 - }, - { - "id": "300", - "name": "country_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548914423 - }, - { - "id": "301", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548957483 - } - ], - "indexes": [], - "color": "#4dee8a", - "createdAt": 1778548914423, - "isView": false, - "order": 33, - "schema": "public" } ], "relationships": [ { - "id": "302", + "id": "309", "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "1", + "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "3", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "7", + "targetFieldId": "38", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "303", + "id": "310", "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "1", + "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "88", - "sourceFieldId": "15", - "targetFieldId": "89", + "targetTableId": "92", + "sourceFieldId": "19", + "targetFieldId": "93", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "304", + "id": "311", + "name": "genre_selected_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "233", + "targetSchema": "public", + "targetTableId": "180", + "sourceFieldId": "234", + "targetFieldId": "182", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548598785, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "312", + "name": "genre_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "167", + "targetSchema": "public", + "targetTableId": "180", + "sourceFieldId": "168", + "targetFieldId": "181", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548583401, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "313", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "214", + "sourceTableId": "233", "targetSchema": "public", - "targetTableId": "285", - "sourceFieldId": "215", - "targetFieldId": "287", + "targetTableId": "305", + "sourceFieldId": "234", + "targetFieldId": "307", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "305", + "id": "314", "name": "media_characters_characters_characters_id", "sourceSchema": "public", - "sourceTableId": "110", + "sourceTableId": "118", "targetSchema": "public", - "targetTableId": "20", - "sourceFieldId": "113", - "targetFieldId": "21", + "targetTableId": "24", + "sourceFieldId": "121", + "targetFieldId": "25", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "306", + "id": "315", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", - "sourceTableId": "110", + "sourceTableId": "118", "targetSchema": "public", - "targetTableId": "221", - "sourceFieldId": "114", - "targetFieldId": "222", + "targetTableId": "240", + "sourceFieldId": "122", + "targetFieldId": "241", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "307", + "id": "316", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "214", + "sourceTableId": "233", "targetSchema": "public", - "targetTableId": "129", - "sourceFieldId": "215", - "targetFieldId": "131", + "targetTableId": "137", + "sourceFieldId": "234", + "targetFieldId": "139", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283900006, "diagramId": "yqwsqwccoj6v" }, { - "id": "308", + "id": "317", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "129", - "sourceFieldId": "66", - "targetFieldId": "130", + "targetTableId": "137", + "sourceFieldId": "70", + "targetFieldId": "138", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283887322, "diagramId": "yqwsqwccoj6v" }, { - "id": "309", + "id": "318", "name": "media_external_links_media_id_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "133", - "sourceFieldId": "34", - "targetFieldId": "135", + "targetTableId": "141", + "sourceFieldId": "38", + "targetFieldId": "143", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299855251, "diagramId": "yqwsqwccoj6v" }, { - "id": "310", + "id": "319", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "133", + "sourceTableId": "141", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "135", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "143", + "targetFieldId": "38", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "311", + "id": "320", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "214", + "sourceTableId": "233", "targetSchema": "public", - "targetTableId": "226", - "sourceFieldId": "215", - "targetFieldId": "228", + "targetTableId": "245", + "sourceFieldId": "234", + "targetFieldId": "247", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "312", + "id": "321", "name": "media_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "226", - "sourceFieldId": "64", - "targetFieldId": "227", + "targetTableId": "245", + "sourceFieldId": "68", + "targetFieldId": "246", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "313", + "id": "322", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "143", + "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "101", - "sourceFieldId": "144", - "targetFieldId": "103", + "targetTableId": "109", + "sourceFieldId": "152", + "targetFieldId": "111", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360252829, "diagramId": "yqwsqwccoj6v" }, { - "id": "314", + "id": "323", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "79", - "sourceFieldId": "34", - "targetFieldId": "82", + "targetTableId": "83", + "sourceFieldId": "38", + "targetFieldId": "86", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299808576, "diagramId": "yqwsqwccoj6v" }, { - "id": "315", + "id": "324", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "79", + "sourceTableId": "83", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "82", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "86", + "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299795695, "diagramId": "yqwsqwccoj6v" }, { - "id": "316", + "id": "325", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "79", + "sourceTableId": "83", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "82", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "86", + "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299804996, "diagramId": "yqwsqwccoj6v" }, { - "id": "317", + "id": "326", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", - "sourceTableId": "79", + "sourceTableId": "83", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "82", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "86", + "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "318", + "id": "327", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "247", + "sourceTableId": "267", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "249", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "269", + "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777636061160, "diagramId": "yqwsqwccoj6v" }, { - "id": "319", + "id": "328", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "247", + "sourceTableId": "267", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "249", - "targetFieldId": "34", + "targetTableId": "37", + "sourceFieldId": "269", + "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364362256, "diagramId": "yqwsqwccoj6v" }, { - "id": "320", + "id": "329", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "276", + "sourceTableId": "296", "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "277", - "targetFieldId": "45", + "targetTableId": "37", + "sourceFieldId": "297", + "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, - { - "id": "321", - "name": "medias_age_rating_media_age_ratings_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "105", - "sourceFieldId": "51", - "targetFieldId": "106", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "322", - "name": "medias_characters_media_characters_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "110", - "sourceFieldId": "71", - "targetFieldId": "111", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "323", - "name": "medias_country_fk", - "sourceSchema": "public", - "sourceTableId": "121", - "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "122", - "targetFieldId": "59", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778402285202, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "324", - "name": "medias_episodes_episodes_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "1", - "sourceFieldId": "65", - "targetFieldId": "2", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "325", - "name": "medias_external_links_media_external_links_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "133", - "sourceFieldId": "70", - "targetFieldId": "134", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "326", - "name": "medias_licensors_fk", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "62", - "targetFieldId": "211", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360403880, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "327", - "name": "medias_producers_fk", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "101", - "sourceFieldId": "61", - "targetFieldId": "102", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360239834, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "328", - "name": "medias_relations_media_relations_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "79", - "sourceFieldId": "69", - "targetFieldId": "80", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "329", - "name": "medias_source_media_sources_id", - "sourceSchema": "public", - "sourceTableId": "33", - "targetSchema": "public", - "targetTableId": "84", - "sourceFieldId": "46", - "targetFieldId": "85", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, { "id": "330", - "name": "medias_status_media_statuses_id", + "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "139", - "sourceFieldId": "47", - "targetFieldId": "140", + "targetTableId": "113", + "sourceFieldId": "55", + "targetFieldId": "114", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, @@ -4212,312 +4201,442 @@ }, { "id": "331", + "name": "medias_characters_media_characters_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "118", + "sourceFieldId": "75", + "targetFieldId": "119", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "332", + "name": "medias_country_fk", + "sourceSchema": "public", + "sourceTableId": "129", + "targetSchema": "public", + "targetTableId": "37", + "sourceFieldId": "130", + "targetFieldId": "63", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402285202, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "333", + "name": "medias_episodes_episodes_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "5", + "sourceFieldId": "69", + "targetFieldId": "6", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "334", + "name": "medias_external_links_media_external_links_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "141", + "sourceFieldId": "74", + "targetFieldId": "142", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "335", + "name": "medias_licensors_fk", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "229", + "sourceFieldId": "66", + "targetFieldId": "230", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360403880, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "336", + "name": "medias_producers_fk", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "109", + "sourceFieldId": "65", + "targetFieldId": "110", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360239834, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "337", + "name": "medias_relations_media_relations_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "83", + "sourceFieldId": "73", + "targetFieldId": "84", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "338", + "name": "medias_source_media_sources_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "88", + "sourceFieldId": "50", + "targetFieldId": "89", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "339", + "name": "medias_status_media_statuses_id", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "147", + "sourceFieldId": "51", + "targetFieldId": "148", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "340", "name": "medias_studios_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "206", - "sourceFieldId": "63", - "targetFieldId": "207", + "targetTableId": "225", + "sourceFieldId": "67", + "targetFieldId": "226", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "332", + "id": "341", "name": "medias_themes_fk", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "285", - "sourceFieldId": "67", - "targetFieldId": "286", + "targetTableId": "305", + "sourceFieldId": "71", + "targetFieldId": "306", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "333", + "id": "342", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", - "sourceTableId": "33", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "267", - "sourceFieldId": "40", - "targetFieldId": "268", + "targetTableId": "287", + "sourceFieldId": "44", + "targetFieldId": "288", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "334", + "id": "343", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "143", + "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "144", - "targetFieldId": "212", + "targetTableId": "229", + "sourceFieldId": "152", + "targetFieldId": "231", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "335", + "id": "344", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "143", + "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "206", - "sourceFieldId": "144", - "targetFieldId": "208", + "targetTableId": "225", + "sourceFieldId": "152", + "targetFieldId": "227", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "336", + "id": "345", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "116", - "sourceFieldId": "186", - "targetFieldId": "117", + "targetTableId": "124", + "sourceFieldId": "205", + "targetFieldId": "125", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517515380, "diagramId": "yqwsqwccoj6v" }, { - "id": "337", + "id": "346", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "116", - "sourceFieldId": "186", - "targetFieldId": "118", + "targetTableId": "124", + "sourceFieldId": "205", + "targetFieldId": "126", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517541887, "diagramId": "yqwsqwccoj6v" }, { - "id": "340", + "id": "347", + "name": "rating_selected_rating_id_fk", + "sourceSchema": "public", + "sourceTableId": "113", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "114", + "targetFieldId": "3", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548767353, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "348", + "name": "rating_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "167", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "168", + "targetFieldId": "2", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548748682, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "351", + "name": "user_country_preferences_country_id_fk", + "sourceSchema": "public", + "sourceTableId": "129", + "targetSchema": "public", + "targetTableId": "105", + "sourceFieldId": "130", + "targetFieldId": "107", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549061296, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "352", + "name": "user_country_preferences_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "167", + "targetSchema": "public", + "targetTableId": "105", + "sourceFieldId": "168", + "targetFieldId": "106", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549044482, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "353", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "280", - "sourceFieldId": "186", - "targetFieldId": "281", + "targetTableId": "300", + "sourceFieldId": "205", + "targetFieldId": "301", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "341", + "id": "354", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "280", - "sourceFieldId": "186", - "targetFieldId": "282", + "targetTableId": "300", + "sourceFieldId": "205", + "targetFieldId": "302", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "342", + "id": "355", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "166", - "sourceFieldId": "186", - "targetFieldId": "167", + "targetTableId": "185", + "sourceFieldId": "205", + "targetFieldId": "186", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778516921506, "diagramId": "yqwsqwccoj6v" }, { - "id": "343", + "id": "356", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", - "sourceTableId": "20", + "sourceTableId": "24", "targetSchema": "public", - "targetTableId": "154", - "sourceFieldId": "21", - "targetFieldId": "156", + "targetTableId": "167", + "sourceFieldId": "25", + "targetFieldId": "169", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778518451836, "diagramId": "yqwsqwccoj6v" }, { - "id": "346", + "id": "359", "name": "user_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "154", + "sourceTableId": "167", "targetSchema": "public", - "targetTableId": "185", - "sourceFieldId": "155", - "targetFieldId": "186", + "targetTableId": "204", + "sourceFieldId": "168", + "targetFieldId": "205", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "yqwsqwccoj6v" }, { - "id": "347", + "id": "360", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "185", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "121", - "sourceFieldId": "197", - "targetFieldId": "122", + "targetTableId": "129", + "sourceFieldId": "216", + "targetFieldId": "130", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778401651979, "diagramId": "yqwsqwccoj6v" }, { - "id": "348", + "id": "361", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "257", + "sourceTableId": "277", "targetSchema": "public", - "targetTableId": "230", - "sourceFieldId": "259", - "targetFieldId": "231", + "targetTableId": "250", + "sourceFieldId": "279", + "targetFieldId": "251", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "yqwsqwccoj6v" }, { - "id": "349", + "id": "362", "name": "videos_service_id_video_services_id", "sourceSchema": "public", - "sourceTableId": "88", + "sourceTableId": "92", "targetSchema": "public", - "targetTableId": "230", - "sourceFieldId": "90", - "targetFieldId": "231", + "targetTableId": "250", + "sourceFieldId": "94", + "targetFieldId": "251", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "350", + "id": "363", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "221", + "sourceTableId": "240", "targetSchema": "public", - "targetTableId": "175", - "sourceFieldId": "224", - "targetFieldId": "176", + "targetTableId": "194", + "sourceFieldId": "243", + "targetFieldId": "195", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "351", - "name": "genre_selected_user_id_fk", + "id": "364", + "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "154", + "sourceTableId": "204", "targetSchema": "public", - "targetTableId": "289", - "sourceFieldId": "155", - "targetFieldId": "290", + "targetTableId": "162", + "sourceFieldId": "205", + "targetFieldId": "163", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778548583401 + "createdAt": 1778731708617 }, { - "id": "352", - "name": "genre_selected_genre_id_fk", + "id": "365", + "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "214", + "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "289", - "sourceFieldId": "215", - "targetFieldId": "291", + "targetTableId": "162", + "sourceFieldId": "6", + "targetFieldId": "164", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778548598785 - }, - { - "id": "353", - "name": "rating_selected_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "154", - "targetSchema": "public", - "targetTableId": "294", - "sourceFieldId": "155", - "targetFieldId": "295", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548748682 - }, - { - "id": "354", - "name": "rating_selected_rating_id_fk", - "sourceSchema": "public", - "sourceTableId": "105", - "targetSchema": "public", - "targetTableId": "294", - "sourceFieldId": "106", - "targetFieldId": "296", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548767353 - }, - { - "id": "355", - "name": "user_country_preferences_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "154", - "targetSchema": "public", - "targetTableId": "298", - "sourceFieldId": "155", - "targetFieldId": "299", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778549044482 - }, - { - "id": "356", - "name": "user_country_preferences_country_id_fk", - "sourceSchema": "public", - "sourceTableId": "121", - "targetSchema": "public", - "targetTableId": "298", - "sourceFieldId": "122", - "targetFieldId": "300", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778549061296 + "createdAt": 1778732139998 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "357", + "id": "366", "name": "address", "kind": "composite", "values": [], @@ -4550,7 +4669,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "358", + "id": "367", "name": "status_submission", "kind": "enum", "values": [ @@ -4562,7 +4681,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "359", + "id": "368", "name": "user_preference_state", "kind": "enum", "values": [ @@ -4571,6 +4690,17 @@ ], "fields": [], "diagramId": "yqwsqwccoj6v" + }, + { + "id": "369", + "name": "user_sex", + "kind": "enum", + "values": [ + "female", + "male" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" } ], "notes": [] From e10c57da1c923177040a1d4f7ee2b21d777a0642 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 1 May 2026 21:00:00 +0700 Subject: [PATCH 06/42] =?UTF-8?q?=F0=9F=94=92=20security:=20fix=20vulnerab?= =?UTF-8?q?le=20field=20in=20collection=20table=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1236 +++++++++++++++++++++++++++++++------------ 1 file changed, 893 insertions(+), 343 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index ee5f4cb..89e5166 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,13 +2,13 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-14T04:16:20.554Z", + "updatedAt": "2026-05-14T14:55:39.260Z", "databaseType": "postgresql", "tables": [ { "id": "1", "name": "user_rating_preferences", - "x": -1031.8902110080458, + "x": -1033.838122457197, "y": -1219.5448311992495, "fields": [ { @@ -1152,8 +1152,8 @@ "id": "92", "name": "videos", "schema": "public", - "x": 612.3480632351478, - "y": 523.768514660268, + "x": 613.6042418109826, + "y": 563.9662290869784, "fields": [ { "id": "93", @@ -1314,7 +1314,7 @@ { "id": "105", "name": "user_country_preferences", - "x": -1031.650470781881, + "x": -1036.5202494047592, "y": -1037.213119188802, "fields": [ { @@ -1554,8 +1554,8 @@ { "id": "124", "name": "provisioned_users", - "x": 198.53800896575544, - "y": -1247.1936387119304, + "x": 211.8005289227215, + "y": -1690.5407344162234, "fields": [ { "id": "125", @@ -2036,8 +2036,8 @@ { "id": "162", "name": "user_watch_histories", - "x": -332.9619668726204, - "y": -1195.632513286341, + "x": -335.9290422316319, + "y": -1189.7301850410581, "fields": [ { "id": "163", @@ -2267,7 +2267,7 @@ { "id": "180", "name": "user_genre_preferences", - "x": -1031.4466584554384, + "x": -1032.4206141800141, "y": -1409.2323402083748, "fields": [ { @@ -2328,12 +2328,86 @@ }, { "id": "185", - "name": "user_oauth_credentials", - "x": 196.34821847988283, - "y": -849.1992179045876, + "name": "media_collections", + "x": 197.36608531341386, + "y": -529.0272597527102, "fields": [ { "id": "186", + "name": "collection_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733152986 + }, + { + "id": "187", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733195744 + }, + { + "id": "188", + "name": "added_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733169676 + }, + { + "id": "189", + "name": "added_at", + "type": { + "id": "bigint", + "name": "bigint" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733189272 + } + ], + "indexes": [ + { + "id": "190", + "name": "index_1", + "fieldIds": [ + "186", + "187" + ], + "unique": true, + "createdAt": 1778733335908 + } + ], + "color": "#ff9f74", + "createdAt": 1778733152986, + "isView": false, + "order": 36, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "191", + "name": "user_oauth_credentials", + "x": 198.86057563155222, + "y": -819.0509320845548, + "fields": [ + { + "id": "192", "name": "id", "type": { "id": "uuid", @@ -2345,7 +2419,7 @@ "createdAt": 1778516299633 }, { - "id": "187", + "id": "193", "name": "user_id", "type": { "id": "uuid", @@ -2357,7 +2431,7 @@ "createdAt": 1778516366928 }, { - "id": "188", + "id": "194", "name": "oauth_id", "type": { "id": "uuid", @@ -2369,7 +2443,7 @@ "createdAt": 1778516373206 }, { - "id": "189", + "id": "195", "name": "provider_token", "type": { "id": "varchar", @@ -2381,7 +2455,7 @@ "createdAt": 1778516403942 }, { - "id": "190", + "id": "196", "name": "provider_sub", "type": { "id": "varchar", @@ -2393,7 +2467,7 @@ "createdAt": 1778516761873 }, { - "id": "191", + "id": "197", "name": "last_action", "type": { "id": "timestamp", @@ -2407,21 +2481,21 @@ ], "indexes": [ { - "id": "192", + "id": "198", "name": "", "fieldIds": [ - "186" + "192" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778516299633 }, { - "id": "193", + "id": "199", "name": "index_2", "fieldIds": [ - "188", - "187" + "194", + "193" ], "unique": true, "createdAt": 1778516903425 @@ -2435,14 +2509,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "194", + "id": "200", "name": "staff", "schema": "public", - "x": -1353.8131838183044, - "y": 434.2501348320311, + "x": -1395.4953893973404, + "y": 424.7769062913411, "fields": [ { - "id": "195", + "id": "201", "name": "id", "type": { "id": "uuid", @@ -2454,7 +2528,7 @@ "createdAt": 1777282589093 }, { - "id": "196", + "id": "202", "name": "name", "type": { "id": "varchar", @@ -2467,7 +2541,7 @@ "characterMaximumLength": "255" }, { - "id": "197", + "id": "203", "name": "image", "type": { "id": "varchar", @@ -2480,7 +2554,7 @@ "characterMaximumLength": "255" }, { - "id": "198", + "id": "204", "name": "mal_id", "type": { "id": "int", @@ -2492,7 +2566,7 @@ "createdAt": 1777282589093 }, { - "id": "199", + "id": "205", "name": "mal_url", "type": { "id": "varchar", @@ -2505,7 +2579,7 @@ "characterMaximumLength": "255" }, { - "id": "200", + "id": "206", "name": "deleted_at", "type": { "id": "timestamp", @@ -2517,7 +2591,7 @@ "createdAt": 1777282589093 }, { - "id": "201", + "id": "207", "name": "updated_at", "type": { "id": "timestamp", @@ -2529,7 +2603,7 @@ "createdAt": 1777282589093 }, { - "id": "202", + "id": "208", "name": "created_at", "type": { "id": "timestamp", @@ -2543,11 +2617,11 @@ ], "indexes": [ { - "id": "203", + "id": "209", "name": "", "unique": true, "fieldIds": [ - "195" + "201" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2560,13 +2634,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "204", + "id": "210", "name": "users", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "205", + "id": "211", "name": "id", "type": { "id": "uuid", @@ -2578,7 +2652,7 @@ "createdAt": 1778390635628 }, { - "id": "206", + "id": "212", "name": "email", "type": { "id": "varchar", @@ -2590,7 +2664,7 @@ "createdAt": 1778391266880 }, { - "id": "207", + "id": "213", "name": "password", "type": { "id": "varchar", @@ -2603,7 +2677,7 @@ "characterMaximumLength": "255" }, { - "id": "208", + "id": "214", "name": "username", "type": { "id": "varchar", @@ -2616,7 +2690,7 @@ "characterMaximumLength": "28" }, { - "id": "209", + "id": "215", "name": "fullname", "type": { "id": "varchar", @@ -2629,7 +2703,7 @@ "characterMaximumLength": "32" }, { - "id": "210", + "id": "216", "name": "avatar", "type": { "id": "varchar", @@ -2642,7 +2716,7 @@ "characterMaximumLength": "255" }, { - "id": "211", + "id": "217", "name": "bio", "type": { "id": "text", @@ -2654,7 +2728,7 @@ "createdAt": 1778390888222 }, { - "id": "212", + "id": "218", "name": "datebirth", "type": { "id": "date", @@ -2666,7 +2740,7 @@ "createdAt": 1778391007890 }, { - "id": "213", + "id": "219", "name": "sex", "type": { "id": "user_sex", @@ -2678,7 +2752,7 @@ "createdAt": 1778391031530 }, { - "id": "214", + "id": "220", "name": "phone_number", "type": { "id": "varchar", @@ -2691,7 +2765,7 @@ "characterMaximumLength": "15" }, { - "id": "215", + "id": "221", "name": "address", "type": { "id": "address", @@ -2703,7 +2777,7 @@ "createdAt": 1778401066100 }, { - "id": "216", + "id": "222", "name": "country", "type": { "id": "uuid", @@ -2715,7 +2789,7 @@ "createdAt": 1778401621258 }, { - "id": "217", + "id": "223", "name": "auth_provider", "type": { "id": "varchar", @@ -2728,7 +2802,7 @@ "characterMaximumLength": "64" }, { - "id": "218", + "id": "224", "name": "provider_token", "type": { "id": "varchar", @@ -2741,7 +2815,7 @@ "characterMaximumLength": "255" }, { - "id": "219", + "id": "225", "name": "created_at", "type": { "id": "timestamp", @@ -2754,7 +2828,7 @@ "default": "now()" }, { - "id": "220", + "id": "226", "name": "updated_at", "type": { "id": "timestamp", @@ -2766,7 +2840,7 @@ "createdAt": 1778517127447 }, { - "id": "221", + "id": "227", "name": "deleted_at", "type": { "id": "timestamp", @@ -2780,29 +2854,29 @@ ], "indexes": [ { - "id": "222", + "id": "228", "name": "", "fieldIds": [ - "205" + "211" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778390635628 }, { - "id": "223", + "id": "229", "name": "index_2", "fieldIds": [ - "208" + "214" ], "unique": true, "createdAt": 1778401234711 }, { - "id": "224", + "id": "230", "name": "index_3", "fieldIds": [ - "206" + "212" ], "unique": true, "createdAt": 1778401248519 @@ -2819,14 +2893,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "225", + "id": "231", "name": "media_studios", "schema": "public", "x": 199.29817359050787, "y": 347.7468004324893, "fields": [ { - "id": "226", + "id": "232", "name": "media_id", "type": { "id": "uuid", @@ -2838,7 +2912,7 @@ "createdAt": 1777360514222 }, { - "id": "227", + "id": "233", "name": "producer_id", "type": { "id": "uuid", @@ -2852,12 +2926,12 @@ ], "indexes": [ { - "id": "228", + "id": "234", "name": "", "unique": true, "fieldIds": [ - "226", - "227" + "232", + "233" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -2870,14 +2944,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "229", + "id": "235", "name": "media_licencors", "schema": "public", "x": 196.51843134292955, "y": 207.07984381762645, "fields": [ { - "id": "230", + "id": "236", "name": "media_id", "type": { "id": "uuid", @@ -2889,7 +2963,7 @@ "createdAt": 1777360331507 }, { - "id": "231", + "id": "237", "name": "producer_id", "type": { "id": "uuid", @@ -2903,12 +2977,12 @@ ], "indexes": [ { - "id": "232", + "id": "238", "name": "", "unique": true, "fieldIds": [ - "230", - "231" + "236", + "237" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -2921,14 +2995,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "233", + "id": "239", "name": "genres", "schema": "public", "x": -1029.312729060423, "y": 207.074167755134, "fields": [ { - "id": "234", + "id": "240", "name": "id", "type": { "id": "uuid", @@ -2940,7 +3014,7 @@ "createdAt": 1777282589094 }, { - "id": "235", + "id": "241", "name": "mal_id", "type": { "id": "smallint", @@ -2952,7 +3026,7 @@ "createdAt": 1777282589094 }, { - "id": "236", + "id": "242", "name": "type", "type": { "id": "varchar", @@ -2965,7 +3039,7 @@ "characterMaximumLength": "16" }, { - "id": "237", + "id": "243", "name": "name", "type": { "id": "varchar", @@ -2978,7 +3052,7 @@ "characterMaximumLength": "32" }, { - "id": "238", + "id": "244", "name": "url", "type": { "id": "varchar", @@ -2993,11 +3067,11 @@ ], "indexes": [ { - "id": "239", + "id": "245", "name": "", "unique": true, "fieldIds": [ - "234" + "240" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -3010,14 +3084,115 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "240", + "id": "246", + "name": "collections", + "x": 213.04848949308825, + "y": -1958.3852400070284, + "fields": [ + { + "id": "247", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778733394970 + }, + { + "id": "248", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733410192, + "characterMaximumLength": "64", + "default": null + }, + { + "id": "249", + "name": "cover_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733428870, + "characterMaximumLength": "255" + }, + { + "id": "250", + "name": "privacy_level", + "type": { + "id": "privacy_level", + "name": "privacy_level" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766528943 + }, + { + "id": "251", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733453130 + }, + { + "id": "252", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778733477620 + } + ], + "indexes": [ + { + "id": "253", + "name": "", + "fieldIds": [ + "247" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778733394970 + } + ], + "color": "#9ef07a", + "createdAt": 1778733394970, + "isView": false, + "order": 37, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "254", "name": "voice_actors", "schema": "public", "x": -1034.2719335611268, "y": 442.32720385328116, "fields": [ { - "id": "241", + "id": "255", "name": "id", "type": { "id": "uuid", @@ -3029,7 +3204,7 @@ "createdAt": 1777282589093 }, { - "id": "242", + "id": "256", "name": "language", "type": { "id": "varchar", @@ -3042,7 +3217,7 @@ "characterMaximumLength": "115" }, { - "id": "243", + "id": "257", "name": "actor_staff", "type": { "id": "uuid", @@ -3056,11 +3231,11 @@ ], "indexes": [ { - "id": "244", + "id": "258", "name": "", "unique": true, "fieldIds": [ - "241" + "255" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3073,14 +3248,141 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "245", + "id": "259", + "name": "video_submissions", + "x": 1034.3413138628948, + "y": 376.2391754093071, + "fields": [ + { + "id": "260", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777362610195 + }, + { + "id": "261", + "name": "video_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "262", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "263", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "264", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "default": "pending", + "comments": "" + }, + { + "id": "265", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "266", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "267", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "268", + "name": "", + "unique": true, + "fieldIds": [ + "260" + ], + "createdAt": 1777362610195, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "createdAt": 1777362610195, + "isView": false, + "order": 24, + "schema": "public", + "width": 337, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "269", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "246", + "id": "270", "name": "media_id", "type": { "id": "uuid", @@ -3092,7 +3394,7 @@ "createdAt": 1777283473368 }, { - "id": "247", + "id": "271", "name": "genre_id", "type": { "id": "uuid", @@ -3106,21 +3408,21 @@ ], "indexes": [ { - "id": "248", + "id": "272", "name": "", "unique": true, "fieldIds": [ - "247" + "271" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "249", + "id": "273", "name": "index_1", "fieldIds": [ - "246", - "247" + "270", + "271" ], "unique": true, "createdAt": 1778570545534 @@ -3135,14 +3437,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "250", + "id": "274", "name": "video_services", "schema": "public", "x": 76.84794405482987, "y": 1174.3220047083446, "fields": [ { - "id": "251", + "id": "275", "name": "id", "type": { "id": "uuid", @@ -3154,7 +3456,7 @@ "createdAt": 1777282589094 }, { - "id": "252", + "id": "276", "name": "name", "type": { "id": "varchar", @@ -3167,7 +3469,7 @@ "characterMaximumLength": "155" }, { - "id": "253", + "id": "277", "name": "resolution", "type": { "id": "smallint", @@ -3179,7 +3481,7 @@ "createdAt": 1777282589094 }, { - "id": "254", + "id": "278", "name": "domain", "type": { "id": "varchar", @@ -3192,7 +3494,7 @@ "characterMaximumLength": "255" }, { - "id": "255", + "id": "279", "name": "image_url", "type": { "id": "varchar", @@ -3205,7 +3507,7 @@ "characterMaximumLength": "255" }, { - "id": "256", + "id": "280", "name": "hex_color", "type": { "id": "varchar", @@ -3218,7 +3520,7 @@ "characterMaximumLength": "10" }, { - "id": "257", + "id": "281", "name": "endpoint_video", "type": { "id": "varchar", @@ -3231,7 +3533,7 @@ "characterMaximumLength": "255" }, { - "id": "258", + "id": "282", "name": "endpoint_short", "type": { "id": "varchar", @@ -3244,7 +3546,7 @@ "characterMaximumLength": "255" }, { - "id": "259", + "id": "283", "name": "endpoint_image", "type": { "id": "varchar", @@ -3257,7 +3559,7 @@ "characterMaximumLength": "255" }, { - "id": "260", + "id": "284", "name": "endpoint_download", "type": { "id": "varchar", @@ -3270,7 +3572,7 @@ "characterMaximumLength": "255" }, { - "id": "261", + "id": "285", "name": "created_by", "type": { "id": "uuid", @@ -3282,7 +3584,7 @@ "createdAt": 1777282589094 }, { - "id": "262", + "id": "286", "name": "deleted_at", "type": { "id": "timestamp", @@ -3294,7 +3596,7 @@ "createdAt": 1777282589094 }, { - "id": "263", + "id": "287", "name": "updated_at", "type": { "id": "timestamp", @@ -3306,7 +3608,7 @@ "createdAt": 1777282589094 }, { - "id": "264", + "id": "288", "name": "created_at", "type": { "id": "timestamp", @@ -3320,22 +3622,22 @@ ], "indexes": [ { - "id": "265", + "id": "289", "name": "", "unique": true, "fieldIds": [ - "251" + "275" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "266", + "id": "290", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "252", - "253" + "276", + "277" ], "createdAt": 1777282589094 } @@ -3349,14 +3651,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "267", + "id": "291", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "268", + "id": "292", "name": "id", "type": { "id": "uuid", @@ -3368,7 +3670,7 @@ "createdAt": 1777362610195 }, { - "id": "269", + "id": "293", "name": "media_id", "type": { "id": "uuid", @@ -3380,7 +3682,7 @@ "createdAt": 1777362624424 }, { - "id": "270", + "id": "294", "name": "created_by", "type": { "id": "uuid", @@ -3393,7 +3695,7 @@ "comments": "" }, { - "id": "271", + "id": "295", "name": "status", "type": { "id": "status_submission", @@ -3406,7 +3708,7 @@ "comments": "" }, { - "id": "272", + "id": "296", "name": "reviewed_by", "type": { "id": "uuid", @@ -3418,7 +3720,7 @@ "createdAt": 1777362758238 }, { - "id": "273", + "id": "297", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3430,7 +3732,7 @@ "createdAt": 1777363627973 }, { - "id": "274", + "id": "298", "name": "reason", "type": { "id": "text", @@ -3442,7 +3744,7 @@ "createdAt": 1777363674757 }, { - "id": "275", + "id": "299", "name": "created_at", "type": { "id": "timestamp", @@ -3457,11 +3759,11 @@ ], "indexes": [ { - "id": "276", + "id": "300", "name": "", "unique": true, "fieldIds": [ - "268" + "292" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3474,14 +3776,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "277", + "id": "301", "name": "video_service_submissions", "schema": "public", - "x": -333.34786174583087, - "y": 1240.4231339730102, + "x": -384.3622441138489, + "y": 1244.8737470115275, "fields": [ { - "id": "278", + "id": "302", "name": "id", "type": { "id": "uuid", @@ -3493,7 +3795,7 @@ "createdAt": 1777362610195 }, { - "id": "279", + "id": "303", "name": "video_service_id", "type": { "id": "uuid", @@ -3505,7 +3807,7 @@ "createdAt": 1777362624424 }, { - "id": "280", + "id": "304", "name": "created_by", "type": { "id": "uuid", @@ -3518,7 +3820,7 @@ "comments": "" }, { - "id": "281", + "id": "305", "name": "status", "type": { "id": "status_submission", @@ -3532,7 +3834,7 @@ "comments": "" }, { - "id": "282", + "id": "306", "name": "reviewed_by", "type": { "id": "uuid", @@ -3544,7 +3846,7 @@ "createdAt": 1777362758238 }, { - "id": "283", + "id": "307", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3556,7 +3858,7 @@ "createdAt": 1777363627973 }, { - "id": "284", + "id": "308", "name": "reason", "type": { "id": "text", @@ -3568,7 +3870,7 @@ "createdAt": 1777363674757 }, { - "id": "285", + "id": "309", "name": "created_at", "type": { "id": "timestamp", @@ -3583,11 +3885,11 @@ ], "indexes": [ { - "id": "286", + "id": "310", "name": "", "unique": true, "fieldIds": [ - "278" + "302" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3601,14 +3903,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "287", + "id": "311", "name": "media_trailers", "schema": "public", - "x": -675.1193235825539, + "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "288", + "id": "312", "name": "id", "type": { "id": "uuid", @@ -3620,7 +3922,7 @@ "createdAt": 1777282589092 }, { - "id": "289", + "id": "313", "name": "url", "type": { "id": "varchar", @@ -3633,7 +3935,7 @@ "characterMaximumLength": "255" }, { - "id": "290", + "id": "314", "name": "embed_url", "type": { "id": "varchar", @@ -3646,7 +3948,7 @@ "characterMaximumLength": "255" }, { - "id": "291", + "id": "315", "name": "small_image_url", "type": { "id": "varchar", @@ -3659,7 +3961,7 @@ "characterMaximumLength": "255" }, { - "id": "292", + "id": "316", "name": "medium_image_url", "type": { "id": "varchar", @@ -3672,7 +3974,7 @@ "characterMaximumLength": "255" }, { - "id": "293", + "id": "317", "name": "large_image_url", "type": { "id": "varchar", @@ -3685,7 +3987,7 @@ "characterMaximumLength": "255" }, { - "id": "294", + "id": "318", "name": "maximum_image_url", "type": { "id": "varchar", @@ -3700,11 +4002,11 @@ ], "indexes": [ { - "id": "295", + "id": "319", "name": "", "unique": true, "fieldIds": [ - "288" + "312" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3717,14 +4019,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "296", + "id": "320", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "297", + "id": "321", "name": "id", "type": { "id": "uuid", @@ -3736,7 +4038,7 @@ "createdAt": 1777282589093 }, { - "id": "298", + "id": "322", "name": "name", "type": { "id": "varchar", @@ -3751,11 +4053,11 @@ ], "indexes": [ { - "id": "299", + "id": "323", "name": "", "unique": true, "fieldIds": [ - "297" + "321" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3768,13 +4070,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "300", + "id": "324", "name": "user_follows", - "x": 196.81483126623533, - "y": -1028.2763104312094, + "x": 207.54423838276006, + "y": -1462.1501775948122, "fields": [ { - "id": "301", + "id": "325", "name": "follower_id", "type": { "id": "uuid", @@ -3786,7 +4088,7 @@ "createdAt": 1778401701334 }, { - "id": "302", + "id": "326", "name": "following_id", "type": { "id": "uuid", @@ -3798,7 +4100,7 @@ "createdAt": 1778401722682 }, { - "id": "303", + "id": "327", "name": "followed_at", "type": { "id": "timestamp", @@ -3812,11 +4114,11 @@ ], "indexes": [ { - "id": "304", + "id": "328", "name": "index_1", "fieldIds": [ - "302", - "301" + "326", + "325" ], "unique": true, "createdAt": 1778401874053 @@ -3838,14 +4140,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "305", + "id": "329", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "306", + "id": "330", "name": "media_id", "type": { "id": "uuid", @@ -3857,7 +4159,7 @@ "createdAt": 1777295294621 }, { - "id": "307", + "id": "331", "name": "genre_id", "type": { "id": "uuid", @@ -3871,12 +4173,12 @@ ], "indexes": [ { - "id": "308", + "id": "332", "name": "", "unique": true, "fieldIds": [ - "306", - "307" + "330", + "331" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -3888,11 +4190,109 @@ "width": 224, "order": 20, "diagramId": "yqwsqwccoj6v" + }, + { + "id": "333", + "name": "collection_members", + "x": -338.05774312036385, + "y": -1466.6668409654785, + "fields": [ + { + "id": "334", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778766471107 + }, + { + "id": "335", + "name": "collection_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766493931 + }, + { + "id": "336", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766580515 + }, + { + "id": "337", + "name": "access_level", + "type": { + "id": "collection_access_level", + "name": "collection_access_level" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766832324 + }, + { + "id": "338", + "name": "invited_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778766846050 + }, + { + "id": "339", + "name": "joined_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766841216 + } + ], + "indexes": [ + { + "id": "340", + "name": "", + "fieldIds": [ + "334" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778766471107 + } + ], + "color": "#9ef07a", + "createdAt": 1778766471107, + "isView": false, + "order": 38, + "schema": "public", + "width": 337 } ], "relationships": [ { - "id": "309", + "id": "342", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -3906,7 +4306,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "310", + "id": "343", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -3920,13 +4320,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "311", + "id": "344", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "239", "targetSchema": "public", "targetTableId": "180", - "sourceFieldId": "234", + "sourceFieldId": "240", "targetFieldId": "182", "sourceCardinality": "one", "targetCardinality": "many", @@ -3934,7 +4334,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "312", + "id": "345", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -3948,21 +4348,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "313", + "id": "346", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "239", "targetSchema": "public", - "targetTableId": "305", - "sourceFieldId": "234", - "targetFieldId": "307", + "targetTableId": "329", + "sourceFieldId": "240", + "targetFieldId": "331", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "314", + "id": "347", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "118", @@ -3976,27 +4376,55 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "315", + "id": "348", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "118", "targetSchema": "public", - "targetTableId": "240", + "targetTableId": "254", "sourceFieldId": "122", - "targetFieldId": "241", + "targetFieldId": "255", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "316", + "id": "349", + "name": "media_collections_added_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "185", + "sourceFieldId": "211", + "targetFieldId": "188", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733368958, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "350", + "name": "media_collections_collection_id_fk", + "sourceSchema": "public", + "sourceTableId": "246", + "targetSchema": "public", + "targetTableId": "185", + "sourceFieldId": "247", + "targetFieldId": "186", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733702652, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "351", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "239", "targetSchema": "public", "targetTableId": "137", - "sourceFieldId": "234", + "sourceFieldId": "240", "targetFieldId": "139", "sourceCardinality": "one", "targetCardinality": "many", @@ -4004,7 +4432,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "317", + "id": "352", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4018,7 +4446,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "318", + "id": "353", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4032,7 +4460,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "319", + "id": "354", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "141", @@ -4046,35 +4474,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "320", + "id": "355", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "239", "targetSchema": "public", - "targetTableId": "245", - "sourceFieldId": "234", - "targetFieldId": "247", + "targetTableId": "269", + "sourceFieldId": "240", + "targetFieldId": "271", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "321", + "id": "356", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "245", + "targetTableId": "269", "sourceFieldId": "68", - "targetFieldId": "246", + "targetFieldId": "270", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "322", + "id": "357", "name": "media_producers_producer_id_fk", "sourceSchema": "public", "sourceTableId": "151", @@ -4088,7 +4516,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "323", + "id": "358", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4102,7 +4530,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "324", + "id": "359", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4116,7 +4544,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "325", + "id": "360", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4130,7 +4558,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "326", + "id": "361", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -4144,13 +4572,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "327", + "id": "362", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "267", + "sourceTableId": "291", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "269", + "sourceFieldId": "293", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", @@ -4158,13 +4586,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "328", + "id": "363", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "267", + "sourceTableId": "291", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "269", + "sourceFieldId": "293", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", @@ -4172,13 +4600,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "329", + "id": "364", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "296", + "sourceTableId": "320", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "297", + "sourceFieldId": "321", "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", @@ -4186,7 +4614,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "330", + "id": "365", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4200,7 +4628,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "331", + "id": "366", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4214,7 +4642,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "332", + "id": "367", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "129", @@ -4228,7 +4656,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "333", + "id": "368", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4242,7 +4670,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "334", + "id": "369", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4256,21 +4684,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "335", + "id": "370", + "name": "medias_id_fk", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "185", + "sourceFieldId": "38", + "targetFieldId": "187", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733359073, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "371", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "229", + "targetTableId": "235", "sourceFieldId": "66", - "targetFieldId": "230", + "targetFieldId": "236", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "yqwsqwccoj6v" }, { - "id": "336", + "id": "372", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4284,7 +4726,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "337", + "id": "373", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4298,7 +4740,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "338", + "id": "374", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4312,7 +4754,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "339", + "id": "375", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4326,83 +4768,83 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "340", + "id": "376", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "225", + "targetTableId": "231", "sourceFieldId": "67", - "targetFieldId": "226", + "targetFieldId": "232", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "341", + "id": "377", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "305", + "targetTableId": "329", "sourceFieldId": "71", - "targetFieldId": "306", + "targetFieldId": "330", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "342", + "id": "378", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "287", + "targetTableId": "311", "sourceFieldId": "44", - "targetFieldId": "288", + "targetFieldId": "312", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "343", + "id": "379", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "229", + "targetTableId": "235", "sourceFieldId": "152", - "targetFieldId": "231", + "targetFieldId": "237", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "344", + "id": "380", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "225", + "targetTableId": "231", "sourceFieldId": "152", - "targetFieldId": "227", + "targetFieldId": "233", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "345", + "id": "381", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "204", + "sourceTableId": "210", "targetSchema": "public", "targetTableId": "124", - "sourceFieldId": "205", + "sourceFieldId": "211", "targetFieldId": "125", "sourceCardinality": "one", "targetCardinality": "many", @@ -4410,13 +4852,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "346", + "id": "382", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "204", + "sourceTableId": "210", "targetSchema": "public", "targetTableId": "124", - "sourceFieldId": "205", + "sourceFieldId": "211", "targetFieldId": "126", "sourceCardinality": "one", "targetCardinality": "many", @@ -4424,7 +4866,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "347", + "id": "383", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -4438,7 +4880,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "348", + "id": "384", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4452,7 +4894,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "351", + "id": "387", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "129", @@ -4466,7 +4908,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "352", + "id": "388", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4480,49 +4922,49 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "353", + "id": "389", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "204", + "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "300", - "sourceFieldId": "205", - "targetFieldId": "301", + "targetTableId": "324", + "sourceFieldId": "211", + "targetFieldId": "325", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "354", + "id": "390", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "204", + "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "300", - "sourceFieldId": "205", - "targetFieldId": "302", + "targetTableId": "324", + "sourceFieldId": "211", + "targetFieldId": "326", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "355", + "id": "391", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", - "sourceTableId": "204", + "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "185", - "sourceFieldId": "205", - "targetFieldId": "186", + "targetTableId": "191", + "sourceFieldId": "211", + "targetFieldId": "192", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778516921506, "diagramId": "yqwsqwccoj6v" }, { - "id": "356", + "id": "392", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", @@ -4536,90 +4978,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "359", + "id": "395", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", "targetSchema": "public", - "targetTableId": "204", + "targetTableId": "210", "sourceFieldId": "168", - "targetFieldId": "205", + "targetFieldId": "211", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "yqwsqwccoj6v" }, { - "id": "360", - "name": "users_country_fk", - "sourceSchema": "public", - "sourceTableId": "204", - "targetSchema": "public", - "targetTableId": "129", - "sourceFieldId": "216", - "targetFieldId": "130", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1778401651979, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "361", - "name": "video_service_submissions_video_service_id_fk", - "sourceSchema": "public", - "sourceTableId": "277", - "targetSchema": "public", - "targetTableId": "250", - "sourceFieldId": "279", - "targetFieldId": "251", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777364068966, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "362", - "name": "videos_service_id_video_services_id", - "sourceSchema": "public", - "sourceTableId": "92", - "targetSchema": "public", - "targetTableId": "250", - "sourceFieldId": "94", - "targetFieldId": "251", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "363", - "name": "voice_actors_actor_staff_staff_id", - "sourceSchema": "public", - "sourceTableId": "240", - "targetSchema": "public", - "targetTableId": "194", - "sourceFieldId": "243", - "targetFieldId": "195", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "364", - "name": "user_watch_histories_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "204", - "targetSchema": "public", - "targetTableId": "162", - "sourceFieldId": "205", - "targetFieldId": "163", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778731708617 - }, - { - "id": "365", + "id": "396", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -4629,14 +5002,179 @@ "targetFieldId": "164", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778732139998 + "createdAt": 1778732139998, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "397", + "name": "user_watch_histories_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "162", + "sourceFieldId": "211", + "targetFieldId": "163", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778731708617, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "398", + "name": "users_country_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "129", + "sourceFieldId": "222", + "targetFieldId": "130", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778401651979, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "399", + "name": "video_service_submissions_video_service_id_fk", + "sourceSchema": "public", + "sourceTableId": "301", + "targetSchema": "public", + "targetTableId": "274", + "sourceFieldId": "303", + "targetFieldId": "275", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777364068966, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "400", + "name": "video_submissions_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "259", + "sourceFieldId": "211", + "targetFieldId": "262", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778732667055, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "401", + "name": "video_submissions_reviewed_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "259", + "sourceFieldId": "211", + "targetFieldId": "263", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778732708490, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "402", + "name": "video_submissions_video_id_fk", + "sourceSchema": "public", + "sourceTableId": "259", + "targetSchema": "public", + "targetTableId": "92", + "sourceFieldId": "261", + "targetFieldId": "93", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778732648012, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "403", + "name": "videos_service_id_video_services_id", + "sourceSchema": "public", + "sourceTableId": "92", + "targetSchema": "public", + "targetTableId": "274", + "sourceFieldId": "94", + "targetFieldId": "275", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589095, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "404", + "name": "voice_actors_actor_staff_staff_id", + "sourceSchema": "public", + "sourceTableId": "254", + "targetSchema": "public", + "targetTableId": "200", + "sourceFieldId": "257", + "targetFieldId": "201", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "405", + "name": "collection_members_collection_id_fk", + "sourceSchema": "public", + "sourceTableId": "246", + "targetSchema": "public", + "targetTableId": "333", + "sourceFieldId": "247", + "targetFieldId": "335", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766565819 + }, + { + "id": "406", + "name": "collection_members_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "333", + "sourceFieldId": "211", + "targetFieldId": "336", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766807732 + }, + { + "id": "407", + "name": "collection_members_invited_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "333", + "sourceFieldId": "211", + "targetFieldId": "338", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766863110 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "366", + "id": "408", + "name": "collection_access_level", + "kind": "enum", + "values": [ + "viewer", + "contributor", + "moderator", + "owner" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "409", "name": "address", "kind": "composite", "values": [], @@ -4669,7 +5207,19 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "367", + "id": "410", + "name": "privacy_level", + "kind": "enum", + "values": [ + "private", + "unlisted", + "public" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "411", "name": "status_submission", "kind": "enum", "values": [ @@ -4681,7 +5231,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "368", + "id": "412", "name": "user_preference_state", "kind": "enum", "values": [ @@ -4692,7 +5242,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "369", + "id": "413", "name": "user_sex", "kind": "enum", "values": [ From 628ff9aeb787961dddd4552c0a99c9a16f52e982 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 2 May 2026 21:00:00 +0700 Subject: [PATCH 07/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20comment=20fi?= =?UTF-8?q?elds=20and=20relations=20to=20db=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1145 ++++++++++++++++++++++++++++++++----------- 1 file changed, 850 insertions(+), 295 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 89e5166..6cf9410 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,14 +2,14 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-14T14:55:39.260Z", + "updatedAt": "2026-05-14T17:00:12.757Z", "databaseType": "postgresql", "tables": [ { "id": "1", "name": "user_rating_preferences", - "x": -1033.838122457197, - "y": -1219.5448311992495, + "x": -1036.138591583759, + "y": -1328.817114710954, "fields": [ { "id": "2", @@ -298,8 +298,8 @@ "id": "24", "name": "characters", "schema": "public", - "x": -1034.1161796853148, - "y": 612.1533274157626, + "x": -1038.1914354197875, + "y": 695.016860683375, "fields": [ { "id": "25", @@ -1314,8 +1314,8 @@ { "id": "105", "name": "user_country_preferences", - "x": -1036.5202494047592, - "y": -1037.213119188802, + "x": -1035.3700148414782, + "y": -1151.086340953631, "fields": [ { "id": "106", @@ -1554,8 +1554,8 @@ { "id": "124", "name": "provisioned_users", - "x": 211.8005289227215, - "y": -1690.5407344162234, + "x": 204.8991215430349, + "y": -1369.625291260797, "fields": [ { "id": "125", @@ -2267,8 +2267,8 @@ { "id": "180", "name": "user_genre_preferences", - "x": -1032.4206141800141, - "y": -1409.2323402083748, + "x": -1033.5708487432953, + "y": -1502.401339834144, "fields": [ { "id": "181", @@ -2741,18 +2741,30 @@ }, { "id": "219", + "name": "role", + "type": { + "id": "user_role", + "name": "user_role" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771211530 + }, + { + "id": "220", "name": "sex", "type": { "id": "user_sex", "name": "user_sex" }, "unique": false, - "nullable": true, + "nullable": false, "primaryKey": false, "createdAt": 1778391031530 }, { - "id": "220", + "id": "221", "name": "phone_number", "type": { "id": "varchar", @@ -2765,7 +2777,7 @@ "characterMaximumLength": "15" }, { - "id": "221", + "id": "222", "name": "address", "type": { "id": "address", @@ -2777,7 +2789,7 @@ "createdAt": 1778401066100 }, { - "id": "222", + "id": "223", "name": "country", "type": { "id": "uuid", @@ -2789,7 +2801,7 @@ "createdAt": 1778401621258 }, { - "id": "223", + "id": "224", "name": "auth_provider", "type": { "id": "varchar", @@ -2802,7 +2814,7 @@ "characterMaximumLength": "64" }, { - "id": "224", + "id": "225", "name": "provider_token", "type": { "id": "varchar", @@ -2815,7 +2827,7 @@ "characterMaximumLength": "255" }, { - "id": "225", + "id": "226", "name": "created_at", "type": { "id": "timestamp", @@ -2828,7 +2840,7 @@ "default": "now()" }, { - "id": "226", + "id": "227", "name": "updated_at", "type": { "id": "timestamp", @@ -2840,7 +2852,7 @@ "createdAt": 1778517127447 }, { - "id": "227", + "id": "228", "name": "deleted_at", "type": { "id": "timestamp", @@ -2854,7 +2866,7 @@ ], "indexes": [ { - "id": "228", + "id": "229", "name": "", "fieldIds": [ "211" @@ -2864,7 +2876,7 @@ "createdAt": 1778390635628 }, { - "id": "229", + "id": "230", "name": "index_2", "fieldIds": [ "214" @@ -2873,7 +2885,7 @@ "createdAt": 1778401234711 }, { - "id": "230", + "id": "231", "name": "index_3", "fieldIds": [ "212" @@ -2893,14 +2905,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "231", + "id": "232", "name": "media_studios", "schema": "public", "x": 199.29817359050787, "y": 347.7468004324893, "fields": [ { - "id": "232", + "id": "233", "name": "media_id", "type": { "id": "uuid", @@ -2912,7 +2924,7 @@ "createdAt": 1777360514222 }, { - "id": "233", + "id": "234", "name": "producer_id", "type": { "id": "uuid", @@ -2926,12 +2938,12 @@ ], "indexes": [ { - "id": "234", + "id": "235", "name": "", "unique": true, "fieldIds": [ - "232", - "233" + "233", + "234" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -2944,14 +2956,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "235", + "id": "236", "name": "media_licencors", "schema": "public", "x": 196.51843134292955, "y": 207.07984381762645, "fields": [ { - "id": "236", + "id": "237", "name": "media_id", "type": { "id": "uuid", @@ -2963,7 +2975,7 @@ "createdAt": 1777360331507 }, { - "id": "237", + "id": "238", "name": "producer_id", "type": { "id": "uuid", @@ -2977,12 +2989,12 @@ ], "indexes": [ { - "id": "238", + "id": "239", "name": "", "unique": true, "fieldIds": [ - "236", - "237" + "237", + "238" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -2995,14 +3007,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "239", + "id": "240", "name": "genres", "schema": "public", - "x": -1029.312729060423, - "y": 207.074167755134, + "x": -1033.3879847948956, + "y": 289.93770102274635, "fields": [ { - "id": "240", + "id": "241", "name": "id", "type": { "id": "uuid", @@ -3014,7 +3026,7 @@ "createdAt": 1777282589094 }, { - "id": "241", + "id": "242", "name": "mal_id", "type": { "id": "smallint", @@ -3026,7 +3038,7 @@ "createdAt": 1777282589094 }, { - "id": "242", + "id": "243", "name": "type", "type": { "id": "varchar", @@ -3039,7 +3051,7 @@ "characterMaximumLength": "16" }, { - "id": "243", + "id": "244", "name": "name", "type": { "id": "varchar", @@ -3052,7 +3064,7 @@ "characterMaximumLength": "32" }, { - "id": "244", + "id": "245", "name": "url", "type": { "id": "varchar", @@ -3067,11 +3079,11 @@ ], "indexes": [ { - "id": "245", + "id": "246", "name": "", "unique": true, "fieldIds": [ - "240" + "241" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -3084,13 +3096,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "246", + "id": "247", "name": "collections", - "x": 213.04848949308825, - "y": -1958.3852400070284, + "x": 206.14708211340167, + "y": -1637.469796851602, "fields": [ { - "id": "247", + "id": "248", "name": "id", "type": { "id": "uuid", @@ -3102,7 +3114,7 @@ "createdAt": 1778733394970 }, { - "id": "248", + "id": "249", "name": "name", "type": { "id": "varchar", @@ -3116,7 +3128,7 @@ "default": null }, { - "id": "249", + "id": "250", "name": "cover_url", "type": { "id": "varchar", @@ -3129,7 +3141,7 @@ "characterMaximumLength": "255" }, { - "id": "250", + "id": "251", "name": "privacy_level", "type": { "id": "privacy_level", @@ -3141,7 +3153,7 @@ "createdAt": 1778766528943 }, { - "id": "251", + "id": "252", "name": "created_at", "type": { "id": "timestamp", @@ -3153,7 +3165,7 @@ "createdAt": 1778733453130 }, { - "id": "252", + "id": "253", "name": "updated_at", "type": { "id": "timestamp", @@ -3167,10 +3179,10 @@ ], "indexes": [ { - "id": "253", + "id": "254", "name": "", "fieldIds": [ - "247" + "248" ], "unique": true, "isPrimaryKey": true, @@ -3185,14 +3197,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "254", + "id": "255", "name": "voice_actors", "schema": "public", - "x": -1034.2719335611268, - "y": 442.32720385328116, + "x": -1038.3471892955995, + "y": 525.1907371208936, "fields": [ { - "id": "255", + "id": "256", "name": "id", "type": { "id": "uuid", @@ -3204,7 +3216,7 @@ "createdAt": 1777282589093 }, { - "id": "256", + "id": "257", "name": "language", "type": { "id": "varchar", @@ -3217,7 +3229,7 @@ "characterMaximumLength": "115" }, { - "id": "257", + "id": "258", "name": "actor_staff", "type": { "id": "uuid", @@ -3231,11 +3243,11 @@ ], "indexes": [ { - "id": "258", + "id": "259", "name": "", "unique": true, "fieldIds": [ - "255" + "256" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3248,13 +3260,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "259", + "id": "260", "name": "video_submissions", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "260", + "id": "261", "name": "id", "type": { "id": "uuid", @@ -3266,7 +3278,7 @@ "createdAt": 1777362610195 }, { - "id": "261", + "id": "262", "name": "video_id", "type": { "id": "uuid", @@ -3278,7 +3290,7 @@ "createdAt": 1777362624424 }, { - "id": "262", + "id": "263", "name": "created_by", "type": { "id": "uuid", @@ -3291,7 +3303,7 @@ "comments": "" }, { - "id": "263", + "id": "264", "name": "reviewed_by", "type": { "id": "uuid", @@ -3303,7 +3315,7 @@ "createdAt": 1777362758238 }, { - "id": "264", + "id": "265", "name": "status", "type": { "id": "status_submission", @@ -3317,7 +3329,7 @@ "comments": "" }, { - "id": "265", + "id": "266", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3329,7 +3341,7 @@ "createdAt": 1777363627973 }, { - "id": "266", + "id": "267", "name": "reason", "type": { "id": "text", @@ -3341,7 +3353,7 @@ "createdAt": 1777363674757 }, { - "id": "267", + "id": "268", "name": "created_at", "type": { "id": "timestamp", @@ -3356,11 +3368,11 @@ ], "indexes": [ { - "id": "268", + "id": "269", "name": "", "unique": true, "fieldIds": [ - "260" + "261" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3375,14 +3387,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "269", + "id": "270", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "270", + "id": "271", "name": "media_id", "type": { "id": "uuid", @@ -3394,7 +3406,7 @@ "createdAt": 1777283473368 }, { - "id": "271", + "id": "272", "name": "genre_id", "type": { "id": "uuid", @@ -3408,21 +3420,21 @@ ], "indexes": [ { - "id": "272", + "id": "273", "name": "", "unique": true, "fieldIds": [ - "271" + "272" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "273", + "id": "274", "name": "index_1", "fieldIds": [ - "270", - "271" + "271", + "272" ], "unique": true, "createdAt": 1778570545534 @@ -3437,14 +3449,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "274", + "id": "275", "name": "video_services", "schema": "public", "x": 76.84794405482987, "y": 1174.3220047083446, "fields": [ { - "id": "275", + "id": "276", "name": "id", "type": { "id": "uuid", @@ -3456,7 +3468,7 @@ "createdAt": 1777282589094 }, { - "id": "276", + "id": "277", "name": "name", "type": { "id": "varchar", @@ -3469,7 +3481,7 @@ "characterMaximumLength": "155" }, { - "id": "277", + "id": "278", "name": "resolution", "type": { "id": "smallint", @@ -3481,7 +3493,7 @@ "createdAt": 1777282589094 }, { - "id": "278", + "id": "279", "name": "domain", "type": { "id": "varchar", @@ -3494,7 +3506,7 @@ "characterMaximumLength": "255" }, { - "id": "279", + "id": "280", "name": "image_url", "type": { "id": "varchar", @@ -3507,7 +3519,7 @@ "characterMaximumLength": "255" }, { - "id": "280", + "id": "281", "name": "hex_color", "type": { "id": "varchar", @@ -3520,7 +3532,7 @@ "characterMaximumLength": "10" }, { - "id": "281", + "id": "282", "name": "endpoint_video", "type": { "id": "varchar", @@ -3533,7 +3545,7 @@ "characterMaximumLength": "255" }, { - "id": "282", + "id": "283", "name": "endpoint_short", "type": { "id": "varchar", @@ -3546,7 +3558,7 @@ "characterMaximumLength": "255" }, { - "id": "283", + "id": "284", "name": "endpoint_image", "type": { "id": "varchar", @@ -3559,7 +3571,7 @@ "characterMaximumLength": "255" }, { - "id": "284", + "id": "285", "name": "endpoint_download", "type": { "id": "varchar", @@ -3572,7 +3584,7 @@ "characterMaximumLength": "255" }, { - "id": "285", + "id": "286", "name": "created_by", "type": { "id": "uuid", @@ -3584,7 +3596,7 @@ "createdAt": 1777282589094 }, { - "id": "286", + "id": "287", "name": "deleted_at", "type": { "id": "timestamp", @@ -3596,7 +3608,7 @@ "createdAt": 1777282589094 }, { - "id": "287", + "id": "288", "name": "updated_at", "type": { "id": "timestamp", @@ -3608,7 +3620,7 @@ "createdAt": 1777282589094 }, { - "id": "288", + "id": "289", "name": "created_at", "type": { "id": "timestamp", @@ -3622,22 +3634,22 @@ ], "indexes": [ { - "id": "289", + "id": "290", "name": "", "unique": true, "fieldIds": [ - "275" + "276" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "290", + "id": "291", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "276", - "277" + "277", + "278" ], "createdAt": 1777282589094 } @@ -3651,14 +3663,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "291", + "id": "292", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "292", + "id": "293", "name": "id", "type": { "id": "uuid", @@ -3670,7 +3682,7 @@ "createdAt": 1777362610195 }, { - "id": "293", + "id": "294", "name": "media_id", "type": { "id": "uuid", @@ -3682,7 +3694,7 @@ "createdAt": 1777362624424 }, { - "id": "294", + "id": "295", "name": "created_by", "type": { "id": "uuid", @@ -3695,7 +3707,7 @@ "comments": "" }, { - "id": "295", + "id": "296", "name": "status", "type": { "id": "status_submission", @@ -3708,7 +3720,7 @@ "comments": "" }, { - "id": "296", + "id": "297", "name": "reviewed_by", "type": { "id": "uuid", @@ -3720,7 +3732,7 @@ "createdAt": 1777362758238 }, { - "id": "297", + "id": "298", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3732,7 +3744,7 @@ "createdAt": 1777363627973 }, { - "id": "298", + "id": "299", "name": "reason", "type": { "id": "text", @@ -3744,7 +3756,7 @@ "createdAt": 1777363674757 }, { - "id": "299", + "id": "300", "name": "created_at", "type": { "id": "timestamp", @@ -3759,11 +3771,11 @@ ], "indexes": [ { - "id": "300", + "id": "301", "name": "", "unique": true, "fieldIds": [ - "292" + "293" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3776,14 +3788,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "301", + "id": "302", "name": "video_service_submissions", "schema": "public", "x": -384.3622441138489, "y": 1244.8737470115275, "fields": [ { - "id": "302", + "id": "303", "name": "id", "type": { "id": "uuid", @@ -3795,7 +3807,7 @@ "createdAt": 1777362610195 }, { - "id": "303", + "id": "304", "name": "video_service_id", "type": { "id": "uuid", @@ -3807,7 +3819,7 @@ "createdAt": 1777362624424 }, { - "id": "304", + "id": "305", "name": "created_by", "type": { "id": "uuid", @@ -3820,7 +3832,7 @@ "comments": "" }, { - "id": "305", + "id": "306", "name": "status", "type": { "id": "status_submission", @@ -3834,7 +3846,7 @@ "comments": "" }, { - "id": "306", + "id": "307", "name": "reviewed_by", "type": { "id": "uuid", @@ -3846,7 +3858,7 @@ "createdAt": 1777362758238 }, { - "id": "307", + "id": "308", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3858,7 +3870,7 @@ "createdAt": 1777363627973 }, { - "id": "308", + "id": "309", "name": "reason", "type": { "id": "text", @@ -3870,7 +3882,7 @@ "createdAt": 1777363674757 }, { - "id": "309", + "id": "310", "name": "created_at", "type": { "id": "timestamp", @@ -3885,11 +3897,11 @@ ], "indexes": [ { - "id": "310", + "id": "311", "name": "", "unique": true, "fieldIds": [ - "302" + "303" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3903,14 +3915,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "311", + "id": "312", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "312", + "id": "313", "name": "id", "type": { "id": "uuid", @@ -3922,7 +3934,7 @@ "createdAt": 1777282589092 }, { - "id": "313", + "id": "314", "name": "url", "type": { "id": "varchar", @@ -3935,7 +3947,7 @@ "characterMaximumLength": "255" }, { - "id": "314", + "id": "315", "name": "embed_url", "type": { "id": "varchar", @@ -3948,7 +3960,7 @@ "characterMaximumLength": "255" }, { - "id": "315", + "id": "316", "name": "small_image_url", "type": { "id": "varchar", @@ -3961,7 +3973,7 @@ "characterMaximumLength": "255" }, { - "id": "316", + "id": "317", "name": "medium_image_url", "type": { "id": "varchar", @@ -3974,7 +3986,7 @@ "characterMaximumLength": "255" }, { - "id": "317", + "id": "318", "name": "large_image_url", "type": { "id": "varchar", @@ -3987,7 +3999,7 @@ "characterMaximumLength": "255" }, { - "id": "318", + "id": "319", "name": "maximum_image_url", "type": { "id": "varchar", @@ -4002,11 +4014,11 @@ ], "indexes": [ { - "id": "319", + "id": "320", "name": "", "unique": true, "fieldIds": [ - "312" + "313" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4019,14 +4031,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "320", + "id": "321", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "321", + "id": "322", "name": "id", "type": { "id": "uuid", @@ -4038,7 +4050,7 @@ "createdAt": 1777282589093 }, { - "id": "322", + "id": "323", "name": "name", "type": { "id": "varchar", @@ -4053,11 +4065,11 @@ ], "indexes": [ { - "id": "323", + "id": "324", "name": "", "unique": true, "fieldIds": [ - "321" + "322" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4070,13 +4082,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "324", + "id": "325", "name": "user_follows", - "x": 207.54423838276006, - "y": -1462.1501775948122, + "x": 200.64283100307347, + "y": -1141.2347344393859, "fields": [ { - "id": "325", + "id": "326", "name": "follower_id", "type": { "id": "uuid", @@ -4088,7 +4100,7 @@ "createdAt": 1778401701334 }, { - "id": "326", + "id": "327", "name": "following_id", "type": { "id": "uuid", @@ -4100,7 +4112,7 @@ "createdAt": 1778401722682 }, { - "id": "327", + "id": "328", "name": "followed_at", "type": { "id": "timestamp", @@ -4114,11 +4126,11 @@ ], "indexes": [ { - "id": "328", + "id": "329", "name": "index_1", "fieldIds": [ - "326", - "325" + "327", + "326" ], "unique": true, "createdAt": 1778401874053 @@ -4140,14 +4152,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "329", + "id": "330", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "330", + "id": "331", "name": "media_id", "type": { "id": "uuid", @@ -4159,7 +4171,7 @@ "createdAt": 1777295294621 }, { - "id": "331", + "id": "332", "name": "genre_id", "type": { "id": "uuid", @@ -4173,12 +4185,12 @@ ], "indexes": [ { - "id": "332", + "id": "333", "name": "", "unique": true, "fieldIds": [ - "330", - "331" + "331", + "332" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -4192,13 +4204,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "333", + "id": "334", "name": "collection_members", "x": -338.05774312036385, "y": -1466.6668409654785, "fields": [ { - "id": "334", + "id": "335", "name": "id", "type": { "id": "uuid", @@ -4210,7 +4222,7 @@ "createdAt": 1778766471107 }, { - "id": "335", + "id": "336", "name": "collection_id", "type": { "id": "uuid", @@ -4222,7 +4234,7 @@ "createdAt": 1778766493931 }, { - "id": "336", + "id": "337", "name": "user_id", "type": { "id": "uuid", @@ -4234,7 +4246,7 @@ "createdAt": 1778766580515 }, { - "id": "337", + "id": "338", "name": "access_level", "type": { "id": "collection_access_level", @@ -4246,7 +4258,7 @@ "createdAt": 1778766832324 }, { - "id": "338", + "id": "339", "name": "invited_by", "type": { "id": "uuid", @@ -4258,7 +4270,7 @@ "createdAt": 1778766846050 }, { - "id": "339", + "id": "340", "name": "joined_at", "type": { "id": "timestamp", @@ -4272,10 +4284,10 @@ ], "indexes": [ { - "id": "340", + "id": "341", "name": "", "fieldIds": [ - "334" + "335" ], "unique": true, "isPrimaryKey": true, @@ -4288,11 +4300,426 @@ "order": 38, "schema": "public", "width": 337 + }, + { + "id": "342", + "name": "home_media_banner", + "x": -1034.714934672103, + "y": -969.0938770634809, + "fields": [ + { + "id": "343", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778771594518 + }, + { + "id": "344", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771625245 + }, + { + "id": "345", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771632111 + }, + { + "id": "346", + "name": "priority", + "type": { + "id": "smallint", + "name": "smallint" + }, + "unique": true, + "nullable": true, + "primaryKey": false, + "createdAt": 1778771638786 + }, + { + "id": "347", + "name": "start_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771679920 + }, + { + "id": "348", + "name": "end_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778771687135 + }, + { + "id": "349", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771693471 + } + ], + "indexes": [ + { + "id": "350", + "name": "", + "fieldIds": [ + "343" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778771594518 + } + ], + "color": "#b067e9", + "createdAt": 1778771594518, + "isView": false, + "order": 39, + "schema": "public" + }, + { + "id": "351", + "name": "comment_audit_logs", + "x": -1031.768269593756, + "y": -322.47738647771854, + "fields": [ + { + "id": "352", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778772275091 + }, + { + "id": "353", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772293834 + }, + { + "id": "354", + "name": "performed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772315274 + }, + { + "id": "355", + "name": "action", + "type": { + "id": "audit_action", + "name": "audit_action" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772326253 + }, + { + "id": "356", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772335038 + } + ], + "indexes": [ + { + "id": "357", + "name": "", + "fieldIds": [ + "352" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778772275091 + } + ], + "color": "#b067e9", + "createdAt": 1778772275091, + "isView": false, + "order": 40, + "schema": "public" + }, + { + "id": "358", + "name": "comments", + "x": -1035.4972528190797, + "y": -21.831519473281823, + "fields": [ + { + "id": "359", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778772484798 + }, + { + "id": "360", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772536237 + }, + { + "id": "361", + "name": "episode_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772542751 + }, + { + "id": "362", + "name": "content", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772548786, + "characterMaximumLength": "255" + }, + { + "id": "363", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777149915 + }, + { + "id": "364", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777198204 + }, + { + "id": "365", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777213469 + } + ], + "indexes": [ + { + "id": "366", + "name": "", + "fieldIds": [ + "359" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778772484798 + } + ], + "color": "#ff9f74", + "createdAt": 1778772484798, + "isView": false, + "order": 41, + "schema": "public" + }, + { + "id": "367", + "name": "comment_reports", + "x": -1032.5934799775514, + "y": -655.2659179217417, + "fields": [ + { + "id": "368", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777460892 + }, + { + "id": "369", + "name": "reporter_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777475869 + }, + { + "id": "370", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777483534 + }, + { + "id": "371", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777515056, + "characterMaximumLength": "115" + }, + { + "id": "372", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777836090 + }, + { + "id": "373", + "name": "description", + "type": { + "id": "text", + "name": "text" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777519944 + }, + { + "id": "374", + "name": "reported_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777537682 + }, + { + "id": "375", + "name": "closed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777545373 + } + ], + "indexes": [], + "color": "#b067e9", + "createdAt": 1778777460892, + "isView": false, + "order": 42, + "schema": "public" } ], "relationships": [ { - "id": "342", + "id": "377", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4306,7 +4733,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "343", + "id": "378", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4320,13 +4747,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "344", + "id": "379", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "239", + "sourceTableId": "240", "targetSchema": "public", "targetTableId": "180", - "sourceFieldId": "240", + "sourceFieldId": "241", "targetFieldId": "182", "sourceCardinality": "one", "targetCardinality": "many", @@ -4334,7 +4761,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "345", + "id": "380", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4348,21 +4775,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "346", + "id": "381", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "239", + "sourceTableId": "240", "targetSchema": "public", - "targetTableId": "329", - "sourceFieldId": "240", - "targetFieldId": "331", + "targetTableId": "330", + "sourceFieldId": "241", + "targetFieldId": "332", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "347", + "id": "382", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "118", @@ -4376,21 +4803,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "348", + "id": "383", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "118", "targetSchema": "public", - "targetTableId": "254", + "targetTableId": "255", "sourceFieldId": "122", - "targetFieldId": "255", + "targetFieldId": "256", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "349", + "id": "384", "name": "media_collections_added_by_fk", "sourceSchema": "public", "sourceTableId": "210", @@ -4404,13 +4831,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "350", + "id": "385", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "247", "targetSchema": "public", "targetTableId": "185", - "sourceFieldId": "247", + "sourceFieldId": "248", "targetFieldId": "186", "sourceCardinality": "one", "targetCardinality": "many", @@ -4418,13 +4845,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "351", + "id": "386", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "239", + "sourceTableId": "240", "targetSchema": "public", "targetTableId": "137", - "sourceFieldId": "240", + "sourceFieldId": "241", "targetFieldId": "139", "sourceCardinality": "one", "targetCardinality": "many", @@ -4432,7 +4859,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "352", + "id": "387", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4446,7 +4873,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "353", + "id": "388", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4460,7 +4887,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "354", + "id": "389", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "141", @@ -4474,35 +4901,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "355", + "id": "390", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "239", + "sourceTableId": "240", "targetSchema": "public", - "targetTableId": "269", - "sourceFieldId": "240", - "targetFieldId": "271", + "targetTableId": "270", + "sourceFieldId": "241", + "targetFieldId": "272", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "356", + "id": "391", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "269", + "targetTableId": "270", "sourceFieldId": "68", - "targetFieldId": "270", + "targetFieldId": "271", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "357", + "id": "392", "name": "media_producers_producer_id_fk", "sourceSchema": "public", "sourceTableId": "151", @@ -4516,7 +4943,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "358", + "id": "393", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4530,7 +4957,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "359", + "id": "394", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4544,7 +4971,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "360", + "id": "395", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4558,7 +4985,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "361", + "id": "396", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -4572,13 +4999,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "362", + "id": "397", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "291", + "sourceTableId": "292", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "293", + "sourceFieldId": "294", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", @@ -4586,13 +5013,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "363", + "id": "398", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "291", + "sourceTableId": "292", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "293", + "sourceFieldId": "294", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", @@ -4600,13 +5027,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "364", + "id": "399", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "320", + "sourceTableId": "321", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "321", + "sourceFieldId": "322", "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", @@ -4614,7 +5041,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "365", + "id": "400", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4628,7 +5055,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "366", + "id": "401", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4642,7 +5069,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "367", + "id": "402", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "129", @@ -4656,7 +5083,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "368", + "id": "403", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4670,7 +5097,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "369", + "id": "404", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4684,7 +5111,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "370", + "id": "405", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4698,21 +5125,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "371", + "id": "406", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "235", + "targetTableId": "236", "sourceFieldId": "66", - "targetFieldId": "236", + "targetFieldId": "237", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "yqwsqwccoj6v" }, { - "id": "372", + "id": "407", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4726,7 +5153,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "373", + "id": "408", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4740,7 +5167,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "374", + "id": "409", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4754,7 +5181,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "375", + "id": "410", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", @@ -4768,77 +5195,77 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "376", + "id": "411", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "231", + "targetTableId": "232", "sourceFieldId": "67", - "targetFieldId": "232", + "targetFieldId": "233", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "377", + "id": "412", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "329", + "targetTableId": "330", "sourceFieldId": "71", - "targetFieldId": "330", + "targetFieldId": "331", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "378", + "id": "413", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "311", + "targetTableId": "312", "sourceFieldId": "44", - "targetFieldId": "312", + "targetFieldId": "313", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "379", + "id": "414", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "235", + "targetTableId": "236", "sourceFieldId": "152", - "targetFieldId": "237", + "targetFieldId": "238", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "380", + "id": "415", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "151", "targetSchema": "public", - "targetTableId": "231", + "targetTableId": "232", "sourceFieldId": "152", - "targetFieldId": "233", + "targetFieldId": "234", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "381", + "id": "416", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", "sourceTableId": "210", @@ -4852,7 +5279,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "382", + "id": "417", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", "sourceTableId": "210", @@ -4866,7 +5293,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "383", + "id": "418", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -4880,7 +5307,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "384", + "id": "419", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4894,7 +5321,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "387", + "id": "422", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "129", @@ -4908,7 +5335,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "388", + "id": "423", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4922,35 +5349,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "389", + "id": "424", "name": "user_follows_follower_id_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "324", + "targetTableId": "325", "sourceFieldId": "211", - "targetFieldId": "325", + "targetFieldId": "326", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "390", + "id": "425", "name": "user_follows_following_id_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "324", + "targetTableId": "325", "sourceFieldId": "211", - "targetFieldId": "326", + "targetFieldId": "327", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "391", + "id": "426", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", "sourceTableId": "210", @@ -4964,7 +5391,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "392", + "id": "427", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", @@ -4978,7 +5405,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "395", + "id": "430", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "167", @@ -4992,7 +5419,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "396", + "id": "431", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -5006,7 +5433,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "397", + "id": "432", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", "sourceTableId": "210", @@ -5020,13 +5447,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "398", + "id": "433", "name": "users_country_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", "targetTableId": "129", - "sourceFieldId": "222", + "sourceFieldId": "223", "targetFieldId": "130", "sourceCardinality": "one", "targetCardinality": "one", @@ -5034,55 +5461,55 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "399", + "id": "434", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "301", + "sourceTableId": "302", "targetSchema": "public", - "targetTableId": "274", - "sourceFieldId": "303", - "targetFieldId": "275", + "targetTableId": "275", + "sourceFieldId": "304", + "targetFieldId": "276", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "yqwsqwccoj6v" }, { - "id": "400", + "id": "435", "name": "video_submissions_created_by_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "259", + "targetTableId": "260", "sourceFieldId": "211", - "targetFieldId": "262", + "targetFieldId": "263", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "yqwsqwccoj6v" }, { - "id": "401", + "id": "436", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "259", + "targetTableId": "260", "sourceFieldId": "211", - "targetFieldId": "263", + "targetFieldId": "264", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "yqwsqwccoj6v" }, { - "id": "402", + "id": "437", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "259", + "sourceTableId": "260", "targetSchema": "public", "targetTableId": "92", - "sourceFieldId": "261", + "sourceFieldId": "262", "targetFieldId": "93", "sourceCardinality": "one", "targetCardinality": "one", @@ -5090,27 +5517,27 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "403", + "id": "438", "name": "videos_service_id_video_services_id", "sourceSchema": "public", "sourceTableId": "92", "targetSchema": "public", - "targetTableId": "274", + "targetTableId": "275", "sourceFieldId": "94", - "targetFieldId": "275", + "targetFieldId": "276", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "404", + "id": "439", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "254", + "sourceTableId": "255", "targetSchema": "public", "targetTableId": "200", - "sourceFieldId": "257", + "sourceFieldId": "258", "targetFieldId": "201", "sourceCardinality": "many", "targetCardinality": "one", @@ -5118,50 +5545,154 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "405", + "id": "440", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "247", "targetSchema": "public", - "targetTableId": "333", - "sourceFieldId": "247", - "targetFieldId": "335", + "targetTableId": "334", + "sourceFieldId": "248", + "targetFieldId": "336", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766565819 }, { - "id": "406", + "id": "441", "name": "collection_members_user_id_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "333", + "targetTableId": "334", "sourceFieldId": "211", - "targetFieldId": "336", + "targetFieldId": "337", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766807732 }, { - "id": "407", + "id": "442", "name": "collection_members_invited_by_fk", "sourceSchema": "public", "sourceTableId": "210", "targetSchema": "public", - "targetTableId": "333", + "targetTableId": "334", "sourceFieldId": "211", - "targetFieldId": "338", + "targetFieldId": "339", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766863110 + }, + { + "id": "443", + "name": "home_media_banner_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "342", + "sourceFieldId": "38", + "targetFieldId": "344", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771781222 + }, + { + "id": "444", + "name": "home_media_banner_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "342", + "sourceFieldId": "211", + "targetFieldId": "345", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771806907 + }, + { + "id": "445", + "name": "comments_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "358", + "sourceFieldId": "211", + "targetFieldId": "360", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777252269 + }, + { + "id": "446", + "name": "comments_episode_id_fk", + "sourceSchema": "public", + "sourceTableId": "5", + "targetSchema": "public", + "targetTableId": "358", + "sourceFieldId": "6", + "targetFieldId": "361", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777292243 + }, + { + "id": "447", + "name": "comment_audit_logs_comment_id_fk", + "sourceSchema": "public", + "sourceTableId": "358", + "targetSchema": "public", + "targetTableId": "351", + "sourceFieldId": "359", + "targetFieldId": "353", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777327740 + }, + { + "id": "448", + "name": "comment_audit_logs_performed_by_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "351", + "sourceFieldId": "211", + "targetFieldId": "354", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777342519 + }, + { + "id": "449", + "name": "comment_reports_reporter_id_fk", + "sourceSchema": "public", + "sourceTableId": "210", + "targetSchema": "public", + "targetTableId": "367", + "sourceFieldId": "211", + "targetFieldId": "369", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777570446 + }, + { + "id": "450", + "name": "comment_reports_comment_id_fk", + "sourceSchema": "public", + "sourceTableId": "358", + "targetSchema": "public", + "targetTableId": "367", + "sourceFieldId": "359", + "targetFieldId": "370", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777586444 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "408", + "id": "452", "name": "collection_access_level", "kind": "enum", "values": [ @@ -5174,7 +5705,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "409", + "id": "453", "name": "address", "kind": "composite", "values": [], @@ -5207,7 +5738,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "410", + "id": "454", "name": "privacy_level", "kind": "enum", "values": [ @@ -5219,7 +5750,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "411", + "id": "455", "name": "status_submission", "kind": "enum", "values": [ @@ -5231,7 +5762,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "412", + "id": "456", "name": "user_preference_state", "kind": "enum", "values": [ @@ -5242,7 +5773,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "413", + "id": "457", "name": "user_sex", "kind": "enum", "values": [ @@ -5251,6 +5782,30 @@ ], "fields": [], "diagramId": "yqwsqwccoj6v" + }, + { + "id": "458", + "name": "user_role", + "kind": "enum", + "values": [ + "user", + "contributor", + "curator", + "administrator" + ], + "fields": [] + }, + { + "id": "459", + "name": "audit_action", + "kind": "enum", + "values": [ + "delete", + "restore", + "edit", + "flag" + ], + "fields": [] } ], "notes": [] From d4f008cff770213a34c3ce5b3a2243f0831fe78a Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 3 May 2026 21:00:00 +0700 Subject: [PATCH 08/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20comment=5Fli?= =?UTF-8?q?kes=20column=20to=20db=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 2333 +++++++++++++++++++++++-------------------- 1 file changed, 1243 insertions(+), 1090 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 6cf9410..5acd76b 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-14T17:00:12.757Z", + "updatedAt": "2026-05-15T01:29:39.850Z", "databaseType": "postgresql", "tables": [ { @@ -1478,13 +1478,99 @@ }, { "id": "118", + "name": "comment_audit_logs", + "x": -1031.768269593756, + "y": -322.47738647771854, + "fields": [ + { + "id": "119", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778772275091 + }, + { + "id": "120", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772293834 + }, + { + "id": "121", + "name": "performed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772315274 + }, + { + "id": "122", + "name": "action", + "type": { + "id": "audit_action", + "name": "audit_action" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772326253 + }, + { + "id": "123", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772335038 + } + ], + "indexes": [ + { + "id": "124", + "name": "", + "fieldIds": [ + "119" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778772275091 + } + ], + "color": "#b067e9", + "createdAt": 1778772275091, + "isView": false, + "order": 40, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "125", "name": "media_characters", "schema": "public", "x": -679.8245105809615, "y": 896.9123102253633, "fields": [ { - "id": "119", + "id": "126", "name": "id", "type": { "id": "uuid", @@ -1496,7 +1582,7 @@ "createdAt": 1777282589093 }, { - "id": "120", + "id": "127", "name": "role", "type": { "id": "enum", @@ -1509,7 +1595,7 @@ "comments": "main, supporting" }, { - "id": "121", + "id": "128", "name": "characters", "type": { "id": "uuid", @@ -1521,7 +1607,7 @@ "createdAt": 1777282589093 }, { - "id": "122", + "id": "129", "name": "voice_actor", "type": { "id": "uuid", @@ -1535,11 +1621,11 @@ ], "indexes": [ { - "id": "123", + "id": "130", "name": "", "unique": true, "fieldIds": [ - "119" + "126" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1552,13 +1638,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "124", + "id": "131", "name": "provisioned_users", "x": 204.8991215430349, "y": -1369.625291260797, "fields": [ { - "id": "125", + "id": "132", "name": "provisioned_by", "type": { "id": "uuid", @@ -1570,7 +1656,7 @@ "createdAt": 1778517368377 }, { - "id": "126", + "id": "133", "name": "provisioned_to", "type": { "id": "uuid", @@ -1582,7 +1668,7 @@ "createdAt": 1778517463769 }, { - "id": "127", + "id": "134", "name": "provisioned_at", "type": { "id": "timestamp", @@ -1594,7 +1680,7 @@ "createdAt": 1778517476998 }, { - "id": "128", + "id": "135", "name": "reason", "type": { "id": "bigint", @@ -1615,13 +1701,112 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "129", + "id": "136", + "name": "collection_members", + "x": -338.05774312036385, + "y": -1466.6668409654785, + "fields": [ + { + "id": "137", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778766471107 + }, + { + "id": "138", + "name": "collection_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766493931 + }, + { + "id": "139", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766580515 + }, + { + "id": "140", + "name": "access_level", + "type": { + "id": "collection_access_level", + "name": "collection_access_level" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766832324 + }, + { + "id": "141", + "name": "invited_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778766846050 + }, + { + "id": "142", + "name": "joined_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778766841216 + } + ], + "indexes": [ + { + "id": "143", + "name": "", + "fieldIds": [ + "137" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778766471107 + } + ], + "color": "#9ef07a", + "createdAt": 1778766471107, + "isView": false, + "order": 38, + "schema": "public", + "width": 337, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "144", "name": "system_country", "x": -675.4825871206289, "y": -936.5527418709639, "fields": [ { - "id": "130", + "id": "145", "name": "id", "type": { "id": "uuid", @@ -1633,7 +1818,7 @@ "createdAt": 1778401101216 }, { - "id": "131", + "id": "146", "name": "name", "type": { "id": "varchar", @@ -1646,7 +1831,7 @@ "characterMaximumLength": "155" }, { - "id": "132", + "id": "147", "name": "slug", "type": { "id": "varchar", @@ -1659,7 +1844,7 @@ "characterMaximumLength": "165" }, { - "id": "133", + "id": "148", "name": "code", "type": { "id": "varchar", @@ -1672,7 +1857,7 @@ "characterMaximumLength": "3" }, { - "id": "134", + "id": "149", "name": "flag", "type": { "id": "varchar", @@ -1685,7 +1870,7 @@ "characterMaximumLength": "255" }, { - "id": "135", + "id": "150", "name": "banner", "type": { "id": "varchar", @@ -1700,10 +1885,10 @@ ], "indexes": [ { - "id": "136", + "id": "151", "name": "", "fieldIds": [ - "130" + "145" ], "unique": true, "isPrimaryKey": true, @@ -1718,14 +1903,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "137", + "id": "152", "name": "media_explicit_genres", "schema": "public", "x": -681.3338818918861, "y": 628.1224828360978, "fields": [ { - "id": "138", + "id": "153", "name": "media_id", "type": { "id": "uuid", @@ -1737,7 +1922,7 @@ "createdAt": 1777283776082 }, { - "id": "139", + "id": "154", "name": "genre_id", "type": { "id": "uuid", @@ -1751,12 +1936,12 @@ ], "indexes": [ { - "id": "140", + "id": "155", "name": "", "unique": true, "fieldIds": [ - "138", - "139" + "153", + "154" ], "createdAt": 1777283776082, "isPrimaryKey": true @@ -1770,14 +1955,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "141", + "id": "156", "name": "media_external_links", "schema": "public", "x": 196.86867462069478, "y": -298.9741574566786, "fields": [ { - "id": "142", + "id": "157", "name": "id", "type": { "id": "uuid", @@ -1789,7 +1974,7 @@ "createdAt": 1777282589093 }, { - "id": "143", + "id": "158", "name": "media_id", "type": { "id": "uuid", @@ -1801,7 +1986,7 @@ "createdAt": 1777282589093 }, { - "id": "144", + "id": "159", "name": "name", "type": { "id": "varchar", @@ -1814,7 +1999,7 @@ "characterMaximumLength": "64" }, { - "id": "145", + "id": "160", "name": "url", "type": { "id": "varchar", @@ -1829,11 +2014,11 @@ ], "indexes": [ { - "id": "146", + "id": "161", "name": "", "unique": true, "fieldIds": [ - "142" + "157" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1846,14 +2031,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "147", + "id": "162", "name": "media_statuses", "schema": "public", "x": -679.4669719043579, "y": 219.3548090436041, "fields": [ { - "id": "148", + "id": "163", "name": "id", "type": { "id": "uuid", @@ -1865,7 +2050,7 @@ "createdAt": 1777282589093 }, { - "id": "149", + "id": "164", "name": "name", "type": { "id": "varchar", @@ -1880,11 +2065,11 @@ ], "indexes": [ { - "id": "150", + "id": "165", "name": "", "unique": true, "fieldIds": [ - "148" + "163" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1897,14 +2082,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "151", + "id": "166", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "152", + "id": "167", "name": "id", "type": { "id": "uuid", @@ -1916,7 +2101,7 @@ "createdAt": 1777282589093 }, { - "id": "153", + "id": "168", "name": "mal_id", "type": { "id": "int", @@ -1928,7 +2113,7 @@ "createdAt": 1777282589093 }, { - "id": "154", + "id": "169", "name": "type", "type": { "id": "varchar", @@ -1941,7 +2126,7 @@ "characterMaximumLength": "24" }, { - "id": "155", + "id": "170", "name": "name", "type": { "id": "varchar", @@ -1954,7 +2139,7 @@ "characterMaximumLength": "155" }, { - "id": "156", + "id": "171", "name": "url", "type": { "id": "varchar", @@ -1967,7 +2152,7 @@ "characterMaximumLength": "255" }, { - "id": "157", + "id": "172", "name": "created_by", "type": { "id": "uuid", @@ -1979,7 +2164,7 @@ "createdAt": 1777282589094 }, { - "id": "158", + "id": "173", "name": "deleted_at", "type": { "id": "timestamp", @@ -1991,7 +2176,7 @@ "createdAt": 1777282589094 }, { - "id": "159", + "id": "174", "name": "updated_at", "type": { "id": "timestamp", @@ -2003,7 +2188,7 @@ "createdAt": 1777282589094 }, { - "id": "160", + "id": "175", "name": "created_at", "type": { "id": "timestamp", @@ -2017,11 +2202,11 @@ ], "indexes": [ { - "id": "161", + "id": "176", "name": "", "unique": true, "fieldIds": [ - "152" + "167" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -2034,13 +2219,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "162", + "id": "177", "name": "user_watch_histories", "x": -335.9290422316319, "y": -1189.7301850410581, "fields": [ { - "id": "163", + "id": "178", "name": "user_id", "type": { "id": "uuid", @@ -2052,7 +2237,7 @@ "createdAt": 1778569467263 }, { - "id": "164", + "id": "179", "name": "episode_id", "type": { "id": "uuid", @@ -2064,7 +2249,7 @@ "createdAt": 1778569477336 }, { - "id": "165", + "id": "180", "name": "updated_at", "type": { "id": "timestamp", @@ -2078,11 +2263,11 @@ ], "indexes": [ { - "id": "166", + "id": "181", "name": "index_1", "fieldIds": [ - "164", - "163" + "179", + "178" ], "unique": true, "createdAt": 1778732177200 @@ -2097,13 +2282,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "167", + "id": "182", "name": "user_preferences", "x": -675.7144111335546, "y": -1493.2312805453928, "fields": [ { - "id": "168", + "id": "183", "name": "user_id", "type": { "id": "uuid", @@ -2115,7 +2300,7 @@ "createdAt": 1778517633815 }, { - "id": "169", + "id": "184", "name": "character_as_partner", "type": { "id": "uuid", @@ -2127,7 +2312,20 @@ "createdAt": 1778518390023 }, { - "id": "170", + "id": "185", + "name": "comment_picture", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778551730755, + "characterMaximumLength": "255" + }, + { + "id": "186", "name": "watch_history", "type": { "id": "boolean", @@ -2140,7 +2338,7 @@ "default": "true" }, { - "id": "171", + "id": "187", "name": "search_history", "type": { "id": "boolean", @@ -2153,7 +2351,7 @@ "default": "false" }, { - "id": "172", + "id": "188", "name": "private_account", "type": { "id": "boolean", @@ -2166,7 +2364,7 @@ "default": "false" }, { - "id": "173", + "id": "189", "name": "message_open", "type": { "id": "boolean", @@ -2179,7 +2377,7 @@ "default": "true" }, { - "id": "174", + "id": "190", "name": "birthday_open", "type": { "id": "boolean", @@ -2192,7 +2390,7 @@ "default": "false" }, { - "id": "175", + "id": "191", "name": "email_open", "type": { "id": "boolean", @@ -2205,7 +2403,7 @@ "default": "false" }, { - "id": "176", + "id": "192", "name": "number_open", "type": { "id": "boolean", @@ -2218,7 +2416,7 @@ "default": "false" }, { - "id": "177", + "id": "193", "name": "partner_open", "type": { "id": "boolean", @@ -2231,25 +2429,38 @@ "default": "true" }, { - "id": "178", - "name": "comment_picture", + "id": "194", + "name": "subscribe_newsletter", "type": { - "id": "varchar", - "name": "varchar" + "id": "boolean", + "name": "boolean" }, "unique": false, - "nullable": true, + "nullable": false, "primaryKey": false, - "createdAt": 1778551730755, - "characterMaximumLength": "255" + "createdAt": 1778808434279, + "default": "true" + }, + { + "id": "195", + "name": "security_notification", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778808466008, + "default": "true" } ], "indexes": [ { - "id": "179", + "id": "196", "name": "", "fieldIds": [ - "168" + "183" ], "unique": true, "isPrimaryKey": true, @@ -2265,13 +2476,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "180", + "id": "197", "name": "user_genre_preferences", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "181", + "id": "198", "name": "user_id", "type": { "id": "uuid", @@ -2283,7 +2494,7 @@ "createdAt": 1778548513047 }, { - "id": "182", + "id": "199", "name": "genre_id", "type": { "id": "uuid", @@ -2295,7 +2506,7 @@ "createdAt": 1778548529915 }, { - "id": "183", + "id": "200", "name": "state", "type": { "id": "user_preference_state", @@ -2309,11 +2520,11 @@ ], "indexes": [ { - "id": "184", + "id": "201", "name": "index_1", "fieldIds": [ - "181", - "182" + "198", + "199" ], "unique": true, "createdAt": 1778548614328 @@ -2327,13 +2538,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "185", + "id": "202", "name": "media_collections", "x": 197.36608531341386, "y": -529.0272597527102, "fields": [ { - "id": "186", + "id": "203", "name": "collection_id", "type": { "id": "uuid", @@ -2345,7 +2556,7 @@ "createdAt": 1778733152986 }, { - "id": "187", + "id": "204", "name": "media_id", "type": { "id": "uuid", @@ -2357,7 +2568,7 @@ "createdAt": 1778733195744 }, { - "id": "188", + "id": "205", "name": "added_by", "type": { "id": "uuid", @@ -2369,7 +2580,7 @@ "createdAt": 1778733169676 }, { - "id": "189", + "id": "206", "name": "added_at", "type": { "id": "bigint", @@ -2383,11 +2594,11 @@ ], "indexes": [ { - "id": "190", + "id": "207", "name": "index_1", "fieldIds": [ - "186", - "187" + "203", + "204" ], "unique": true, "createdAt": 1778733335908 @@ -2401,13 +2612,124 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "191", + "id": "208", + "name": "comments", + "x": -1035.4972528190797, + "y": -21.831519473281823, + "fields": [ + { + "id": "209", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778772484798 + }, + { + "id": "210", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772536237 + }, + { + "id": "211", + "name": "episode_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772542751 + }, + { + "id": "212", + "name": "content", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778772548786, + "characterMaximumLength": "255" + }, + { + "id": "213", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777149915 + }, + { + "id": "214", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777198204 + }, + { + "id": "215", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777213469 + } + ], + "indexes": [ + { + "id": "216", + "name": "", + "fieldIds": [ + "209" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778772484798 + } + ], + "color": "#ff9f74", + "createdAt": 1778772484798, + "isView": false, + "order": 41, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "217", "name": "user_oauth_credentials", "x": 198.86057563155222, "y": -819.0509320845548, "fields": [ { - "id": "192", + "id": "218", "name": "id", "type": { "id": "uuid", @@ -2419,7 +2741,7 @@ "createdAt": 1778516299633 }, { - "id": "193", + "id": "219", "name": "user_id", "type": { "id": "uuid", @@ -2431,7 +2753,7 @@ "createdAt": 1778516366928 }, { - "id": "194", + "id": "220", "name": "oauth_id", "type": { "id": "uuid", @@ -2443,7 +2765,7 @@ "createdAt": 1778516373206 }, { - "id": "195", + "id": "221", "name": "provider_token", "type": { "id": "varchar", @@ -2455,7 +2777,7 @@ "createdAt": 1778516403942 }, { - "id": "196", + "id": "222", "name": "provider_sub", "type": { "id": "varchar", @@ -2467,7 +2789,7 @@ "createdAt": 1778516761873 }, { - "id": "197", + "id": "223", "name": "last_action", "type": { "id": "timestamp", @@ -2481,21 +2803,21 @@ ], "indexes": [ { - "id": "198", + "id": "224", "name": "", "fieldIds": [ - "192" + "218" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778516299633 }, { - "id": "199", + "id": "225", "name": "index_2", "fieldIds": [ - "194", - "193" + "220", + "219" ], "unique": true, "createdAt": 1778516903425 @@ -2509,14 +2831,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "200", + "id": "226", "name": "staff", "schema": "public", - "x": -1395.4953893973404, + "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "201", + "id": "227", "name": "id", "type": { "id": "uuid", @@ -2528,7 +2850,7 @@ "createdAt": 1777282589093 }, { - "id": "202", + "id": "228", "name": "name", "type": { "id": "varchar", @@ -2541,7 +2863,7 @@ "characterMaximumLength": "255" }, { - "id": "203", + "id": "229", "name": "image", "type": { "id": "varchar", @@ -2554,7 +2876,7 @@ "characterMaximumLength": "255" }, { - "id": "204", + "id": "230", "name": "mal_id", "type": { "id": "int", @@ -2566,7 +2888,7 @@ "createdAt": 1777282589093 }, { - "id": "205", + "id": "231", "name": "mal_url", "type": { "id": "varchar", @@ -2579,7 +2901,7 @@ "characterMaximumLength": "255" }, { - "id": "206", + "id": "232", "name": "deleted_at", "type": { "id": "timestamp", @@ -2591,7 +2913,7 @@ "createdAt": 1777282589093 }, { - "id": "207", + "id": "233", "name": "updated_at", "type": { "id": "timestamp", @@ -2603,7 +2925,7 @@ "createdAt": 1777282589093 }, { - "id": "208", + "id": "234", "name": "created_at", "type": { "id": "timestamp", @@ -2617,11 +2939,11 @@ ], "indexes": [ { - "id": "209", + "id": "235", "name": "", "unique": true, "fieldIds": [ - "201" + "227" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2634,13 +2956,123 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "210", + "id": "236", + "name": "home_media_banner", + "x": -1034.714934672103, + "y": -969.0938770634809, + "fields": [ + { + "id": "237", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778771594518 + }, + { + "id": "238", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771625245 + }, + { + "id": "239", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771632111 + }, + { + "id": "240", + "name": "priority", + "type": { + "id": "smallint", + "name": "smallint" + }, + "unique": true, + "nullable": true, + "primaryKey": false, + "createdAt": 1778771638786 + }, + { + "id": "241", + "name": "start_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771679920 + }, + { + "id": "242", + "name": "end_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778771687135 + }, + { + "id": "243", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778771693471 + } + ], + "indexes": [ + { + "id": "244", + "name": "", + "fieldIds": [ + "237" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778771594518 + } + ], + "color": "#b067e9", + "createdAt": 1778771594518, + "isView": false, + "order": 39, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "245", "name": "users", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "211", + "id": "246", "name": "id", "type": { "id": "uuid", @@ -2652,7 +3084,7 @@ "createdAt": 1778390635628 }, { - "id": "212", + "id": "247", "name": "email", "type": { "id": "varchar", @@ -2664,7 +3096,7 @@ "createdAt": 1778391266880 }, { - "id": "213", + "id": "248", "name": "password", "type": { "id": "varchar", @@ -2677,7 +3109,7 @@ "characterMaximumLength": "255" }, { - "id": "214", + "id": "249", "name": "username", "type": { "id": "varchar", @@ -2690,7 +3122,7 @@ "characterMaximumLength": "28" }, { - "id": "215", + "id": "250", "name": "fullname", "type": { "id": "varchar", @@ -2703,7 +3135,7 @@ "characterMaximumLength": "32" }, { - "id": "216", + "id": "251", "name": "avatar", "type": { "id": "varchar", @@ -2716,7 +3148,7 @@ "characterMaximumLength": "255" }, { - "id": "217", + "id": "252", "name": "bio", "type": { "id": "text", @@ -2728,7 +3160,7 @@ "createdAt": 1778390888222 }, { - "id": "218", + "id": "253", "name": "datebirth", "type": { "id": "date", @@ -2740,7 +3172,7 @@ "createdAt": 1778391007890 }, { - "id": "219", + "id": "254", "name": "role", "type": { "id": "user_role", @@ -2752,7 +3184,7 @@ "createdAt": 1778771211530 }, { - "id": "220", + "id": "255", "name": "sex", "type": { "id": "user_sex", @@ -2764,7 +3196,7 @@ "createdAt": 1778391031530 }, { - "id": "221", + "id": "256", "name": "phone_number", "type": { "id": "varchar", @@ -2777,7 +3209,7 @@ "characterMaximumLength": "15" }, { - "id": "222", + "id": "257", "name": "address", "type": { "id": "address", @@ -2789,7 +3221,7 @@ "createdAt": 1778401066100 }, { - "id": "223", + "id": "258", "name": "country", "type": { "id": "uuid", @@ -2801,7 +3233,7 @@ "createdAt": 1778401621258 }, { - "id": "224", + "id": "259", "name": "auth_provider", "type": { "id": "varchar", @@ -2814,7 +3246,7 @@ "characterMaximumLength": "64" }, { - "id": "225", + "id": "260", "name": "provider_token", "type": { "id": "varchar", @@ -2827,7 +3259,7 @@ "characterMaximumLength": "255" }, { - "id": "226", + "id": "261", "name": "created_at", "type": { "id": "timestamp", @@ -2840,7 +3272,7 @@ "default": "now()" }, { - "id": "227", + "id": "262", "name": "updated_at", "type": { "id": "timestamp", @@ -2852,7 +3284,7 @@ "createdAt": 1778517127447 }, { - "id": "228", + "id": "263", "name": "deleted_at", "type": { "id": "timestamp", @@ -2866,29 +3298,29 @@ ], "indexes": [ { - "id": "229", + "id": "264", "name": "", "fieldIds": [ - "211" + "246" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778390635628 }, { - "id": "230", + "id": "265", "name": "index_2", "fieldIds": [ - "214" + "249" ], "unique": true, "createdAt": 1778401234711 }, { - "id": "231", + "id": "266", "name": "index_3", "fieldIds": [ - "212" + "247" ], "unique": true, "createdAt": 1778401248519 @@ -2905,14 +3337,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "232", + "id": "267", "name": "media_studios", "schema": "public", "x": 199.29817359050787, "y": 347.7468004324893, "fields": [ { - "id": "233", + "id": "268", "name": "media_id", "type": { "id": "uuid", @@ -2924,7 +3356,7 @@ "createdAt": 1777360514222 }, { - "id": "234", + "id": "269", "name": "producer_id", "type": { "id": "uuid", @@ -2938,12 +3370,12 @@ ], "indexes": [ { - "id": "235", + "id": "270", "name": "", "unique": true, "fieldIds": [ - "233", - "234" + "268", + "269" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -2956,14 +3388,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "236", + "id": "271", "name": "media_licencors", "schema": "public", "x": 196.51843134292955, "y": 207.07984381762645, "fields": [ { - "id": "237", + "id": "272", "name": "media_id", "type": { "id": "uuid", @@ -2975,7 +3407,7 @@ "createdAt": 1777360331507 }, { - "id": "238", + "id": "273", "name": "producer_id", "type": { "id": "uuid", @@ -2989,12 +3421,12 @@ ], "indexes": [ { - "id": "239", + "id": "274", "name": "", "unique": true, "fieldIds": [ - "237", - "238" + "272", + "273" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3007,14 +3439,126 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "240", + "id": "275", + "name": "comment_reports", + "x": -1032.5934799775514, + "y": -655.2659179217417, + "fields": [ + { + "id": "276", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777460892 + }, + { + "id": "277", + "name": "reporter_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777475869 + }, + { + "id": "278", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777483534 + }, + { + "id": "279", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777515056, + "characterMaximumLength": "115" + }, + { + "id": "280", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777836090 + }, + { + "id": "281", + "name": "description", + "type": { + "id": "text", + "name": "text" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777519944 + }, + { + "id": "282", + "name": "reported_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778777537682 + }, + { + "id": "283", + "name": "closed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778777545373 + } + ], + "indexes": [], + "color": "#b067e9", + "createdAt": 1778777460892, + "isView": false, + "order": 42, + "schema": "public", + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "284", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 289.93770102274635, "fields": [ { - "id": "241", + "id": "285", "name": "id", "type": { "id": "uuid", @@ -3026,7 +3570,7 @@ "createdAt": 1777282589094 }, { - "id": "242", + "id": "286", "name": "mal_id", "type": { "id": "smallint", @@ -3038,7 +3582,7 @@ "createdAt": 1777282589094 }, { - "id": "243", + "id": "287", "name": "type", "type": { "id": "varchar", @@ -3051,7 +3595,7 @@ "characterMaximumLength": "16" }, { - "id": "244", + "id": "288", "name": "name", "type": { "id": "varchar", @@ -3064,7 +3608,7 @@ "characterMaximumLength": "32" }, { - "id": "245", + "id": "289", "name": "url", "type": { "id": "varchar", @@ -3079,11 +3623,11 @@ ], "indexes": [ { - "id": "246", + "id": "290", "name": "", "unique": true, "fieldIds": [ - "241" + "285" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -3096,13 +3640,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "247", + "id": "291", "name": "collections", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "248", + "id": "292", "name": "id", "type": { "id": "uuid", @@ -3114,7 +3658,7 @@ "createdAt": 1778733394970 }, { - "id": "249", + "id": "293", "name": "name", "type": { "id": "varchar", @@ -3128,7 +3672,7 @@ "default": null }, { - "id": "250", + "id": "294", "name": "cover_url", "type": { "id": "varchar", @@ -3141,7 +3685,7 @@ "characterMaximumLength": "255" }, { - "id": "251", + "id": "295", "name": "privacy_level", "type": { "id": "privacy_level", @@ -3153,7 +3697,7 @@ "createdAt": 1778766528943 }, { - "id": "252", + "id": "296", "name": "created_at", "type": { "id": "timestamp", @@ -3165,7 +3709,7 @@ "createdAt": 1778733453130 }, { - "id": "253", + "id": "297", "name": "updated_at", "type": { "id": "timestamp", @@ -3179,10 +3723,10 @@ ], "indexes": [ { - "id": "254", + "id": "298", "name": "", "fieldIds": [ - "248" + "292" ], "unique": true, "isPrimaryKey": true, @@ -3197,14 +3741,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "255", + "id": "299", "name": "voice_actors", "schema": "public", "x": -1038.3471892955995, "y": 525.1907371208936, "fields": [ { - "id": "256", + "id": "300", "name": "id", "type": { "id": "uuid", @@ -3216,7 +3760,7 @@ "createdAt": 1777282589093 }, { - "id": "257", + "id": "301", "name": "language", "type": { "id": "varchar", @@ -3229,7 +3773,7 @@ "characterMaximumLength": "115" }, { - "id": "258", + "id": "302", "name": "actor_staff", "type": { "id": "uuid", @@ -3243,11 +3787,11 @@ ], "indexes": [ { - "id": "259", + "id": "303", "name": "", "unique": true, "fieldIds": [ - "256" + "300" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3260,13 +3804,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "260", + "id": "304", "name": "video_submissions", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "261", + "id": "305", "name": "id", "type": { "id": "uuid", @@ -3278,7 +3822,7 @@ "createdAt": 1777362610195 }, { - "id": "262", + "id": "306", "name": "video_id", "type": { "id": "uuid", @@ -3290,7 +3834,7 @@ "createdAt": 1777362624424 }, { - "id": "263", + "id": "307", "name": "created_by", "type": { "id": "uuid", @@ -3303,7 +3847,7 @@ "comments": "" }, { - "id": "264", + "id": "308", "name": "reviewed_by", "type": { "id": "uuid", @@ -3315,7 +3859,7 @@ "createdAt": 1777362758238 }, { - "id": "265", + "id": "309", "name": "status", "type": { "id": "status_submission", @@ -3329,7 +3873,7 @@ "comments": "" }, { - "id": "266", + "id": "310", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3341,7 +3885,7 @@ "createdAt": 1777363627973 }, { - "id": "267", + "id": "311", "name": "reason", "type": { "id": "text", @@ -3353,7 +3897,7 @@ "createdAt": 1777363674757 }, { - "id": "268", + "id": "312", "name": "created_at", "type": { "id": "timestamp", @@ -3368,11 +3912,11 @@ ], "indexes": [ { - "id": "269", + "id": "313", "name": "", "unique": true, "fieldIds": [ - "261" + "305" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3387,14 +3931,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "270", + "id": "314", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "271", + "id": "315", "name": "media_id", "type": { "id": "uuid", @@ -3406,7 +3950,7 @@ "createdAt": 1777283473368 }, { - "id": "272", + "id": "316", "name": "genre_id", "type": { "id": "uuid", @@ -3420,21 +3964,21 @@ ], "indexes": [ { - "id": "273", + "id": "317", "name": "", "unique": true, "fieldIds": [ - "272" + "316" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "274", + "id": "318", "name": "index_1", "fieldIds": [ - "271", - "272" + "315", + "316" ], "unique": true, "createdAt": 1778570545534 @@ -3449,14 +3993,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "275", + "id": "319", "name": "video_services", "schema": "public", "x": 76.84794405482987, "y": 1174.3220047083446, "fields": [ { - "id": "276", + "id": "320", "name": "id", "type": { "id": "uuid", @@ -3468,7 +4012,7 @@ "createdAt": 1777282589094 }, { - "id": "277", + "id": "321", "name": "name", "type": { "id": "varchar", @@ -3481,7 +4025,7 @@ "characterMaximumLength": "155" }, { - "id": "278", + "id": "322", "name": "resolution", "type": { "id": "smallint", @@ -3493,7 +4037,7 @@ "createdAt": 1777282589094 }, { - "id": "279", + "id": "323", "name": "domain", "type": { "id": "varchar", @@ -3506,7 +4050,7 @@ "characterMaximumLength": "255" }, { - "id": "280", + "id": "324", "name": "image_url", "type": { "id": "varchar", @@ -3519,7 +4063,7 @@ "characterMaximumLength": "255" }, { - "id": "281", + "id": "325", "name": "hex_color", "type": { "id": "varchar", @@ -3532,7 +4076,7 @@ "characterMaximumLength": "10" }, { - "id": "282", + "id": "326", "name": "endpoint_video", "type": { "id": "varchar", @@ -3545,7 +4089,7 @@ "characterMaximumLength": "255" }, { - "id": "283", + "id": "327", "name": "endpoint_short", "type": { "id": "varchar", @@ -3558,7 +4102,7 @@ "characterMaximumLength": "255" }, { - "id": "284", + "id": "328", "name": "endpoint_image", "type": { "id": "varchar", @@ -3571,7 +4115,7 @@ "characterMaximumLength": "255" }, { - "id": "285", + "id": "329", "name": "endpoint_download", "type": { "id": "varchar", @@ -3584,7 +4128,7 @@ "characterMaximumLength": "255" }, { - "id": "286", + "id": "330", "name": "created_by", "type": { "id": "uuid", @@ -3596,7 +4140,7 @@ "createdAt": 1777282589094 }, { - "id": "287", + "id": "331", "name": "deleted_at", "type": { "id": "timestamp", @@ -3608,7 +4152,7 @@ "createdAt": 1777282589094 }, { - "id": "288", + "id": "332", "name": "updated_at", "type": { "id": "timestamp", @@ -3620,7 +4164,7 @@ "createdAt": 1777282589094 }, { - "id": "289", + "id": "333", "name": "created_at", "type": { "id": "timestamp", @@ -3634,22 +4178,22 @@ ], "indexes": [ { - "id": "290", + "id": "334", "name": "", "unique": true, "fieldIds": [ - "276" + "320" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "291", + "id": "335", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "277", - "278" + "321", + "322" ], "createdAt": 1777282589094 } @@ -3663,14 +4207,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "292", + "id": "336", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "293", + "id": "337", "name": "id", "type": { "id": "uuid", @@ -3682,7 +4226,7 @@ "createdAt": 1777362610195 }, { - "id": "294", + "id": "338", "name": "media_id", "type": { "id": "uuid", @@ -3694,7 +4238,7 @@ "createdAt": 1777362624424 }, { - "id": "295", + "id": "339", "name": "created_by", "type": { "id": "uuid", @@ -3707,7 +4251,7 @@ "comments": "" }, { - "id": "296", + "id": "340", "name": "status", "type": { "id": "status_submission", @@ -3720,7 +4264,7 @@ "comments": "" }, { - "id": "297", + "id": "341", "name": "reviewed_by", "type": { "id": "uuid", @@ -3732,7 +4276,7 @@ "createdAt": 1777362758238 }, { - "id": "298", + "id": "342", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3744,7 +4288,7 @@ "createdAt": 1777363627973 }, { - "id": "299", + "id": "343", "name": "reason", "type": { "id": "text", @@ -3756,7 +4300,7 @@ "createdAt": 1777363674757 }, { - "id": "300", + "id": "344", "name": "created_at", "type": { "id": "timestamp", @@ -3771,11 +4315,11 @@ ], "indexes": [ { - "id": "301", + "id": "345", "name": "", "unique": true, "fieldIds": [ - "293" + "337" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3788,14 +4332,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "302", + "id": "346", "name": "video_service_submissions", "schema": "public", "x": -384.3622441138489, "y": 1244.8737470115275, "fields": [ { - "id": "303", + "id": "347", "name": "id", "type": { "id": "uuid", @@ -3807,7 +4351,7 @@ "createdAt": 1777362610195 }, { - "id": "304", + "id": "348", "name": "video_service_id", "type": { "id": "uuid", @@ -3819,7 +4363,7 @@ "createdAt": 1777362624424 }, { - "id": "305", + "id": "349", "name": "created_by", "type": { "id": "uuid", @@ -3832,7 +4376,7 @@ "comments": "" }, { - "id": "306", + "id": "350", "name": "status", "type": { "id": "status_submission", @@ -3846,7 +4390,7 @@ "comments": "" }, { - "id": "307", + "id": "351", "name": "reviewed_by", "type": { "id": "uuid", @@ -3858,7 +4402,7 @@ "createdAt": 1777362758238 }, { - "id": "308", + "id": "352", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3870,7 +4414,7 @@ "createdAt": 1777363627973 }, { - "id": "309", + "id": "353", "name": "reason", "type": { "id": "text", @@ -3882,7 +4426,7 @@ "createdAt": 1777363674757 }, { - "id": "310", + "id": "354", "name": "created_at", "type": { "id": "timestamp", @@ -3897,11 +4441,11 @@ ], "indexes": [ { - "id": "311", + "id": "355", "name": "", "unique": true, "fieldIds": [ - "303" + "347" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3915,14 +4459,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "312", + "id": "356", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "313", + "id": "357", "name": "id", "type": { "id": "uuid", @@ -3934,7 +4478,7 @@ "createdAt": 1777282589092 }, { - "id": "314", + "id": "358", "name": "url", "type": { "id": "varchar", @@ -3947,7 +4491,7 @@ "characterMaximumLength": "255" }, { - "id": "315", + "id": "359", "name": "embed_url", "type": { "id": "varchar", @@ -3960,7 +4504,7 @@ "characterMaximumLength": "255" }, { - "id": "316", + "id": "360", "name": "small_image_url", "type": { "id": "varchar", @@ -3973,7 +4517,7 @@ "characterMaximumLength": "255" }, { - "id": "317", + "id": "361", "name": "medium_image_url", "type": { "id": "varchar", @@ -3986,7 +4530,7 @@ "characterMaximumLength": "255" }, { - "id": "318", + "id": "362", "name": "large_image_url", "type": { "id": "varchar", @@ -3999,7 +4543,7 @@ "characterMaximumLength": "255" }, { - "id": "319", + "id": "363", "name": "maximum_image_url", "type": { "id": "varchar", @@ -4014,11 +4558,11 @@ ], "indexes": [ { - "id": "320", + "id": "364", "name": "", "unique": true, "fieldIds": [ - "313" + "357" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4031,14 +4575,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "321", + "id": "365", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "322", + "id": "366", "name": "id", "type": { "id": "uuid", @@ -4050,7 +4594,7 @@ "createdAt": 1777282589093 }, { - "id": "323", + "id": "367", "name": "name", "type": { "id": "varchar", @@ -4065,11 +4609,11 @@ ], "indexes": [ { - "id": "324", + "id": "368", "name": "", "unique": true, "fieldIds": [ - "322" + "366" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4082,13 +4626,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "325", + "id": "369", "name": "user_follows", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "326", + "id": "370", "name": "follower_id", "type": { "id": "uuid", @@ -4100,7 +4644,7 @@ "createdAt": 1778401701334 }, { - "id": "327", + "id": "371", "name": "following_id", "type": { "id": "uuid", @@ -4112,7 +4656,7 @@ "createdAt": 1778401722682 }, { - "id": "328", + "id": "372", "name": "followed_at", "type": { "id": "timestamp", @@ -4126,11 +4670,11 @@ ], "indexes": [ { - "id": "329", + "id": "373", "name": "index_1", "fieldIds": [ - "327", - "326" + "371", + "370" ], "unique": true, "createdAt": 1778401874053 @@ -4152,14 +4696,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "330", + "id": "374", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "331", + "id": "375", "name": "media_id", "type": { "id": "uuid", @@ -4171,7 +4715,7 @@ "createdAt": 1777295294621 }, { - "id": "332", + "id": "376", "name": "genre_id", "type": { "id": "uuid", @@ -4185,12 +4729,12 @@ ], "indexes": [ { - "id": "333", + "id": "377", "name": "", "unique": true, "fieldIds": [ - "331", - "332" + "375", + "376" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -4204,232 +4748,25 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "334", - "name": "collection_members", - "x": -338.05774312036385, - "y": -1466.6668409654785, + "id": "378", + "name": "comment_likes", + "x": -1435.9285690968027, + "y": 209.11179406446968, "fields": [ { - "id": "335", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778766471107 - }, - { - "id": "336", - "name": "collection_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766493931 - }, - { - "id": "337", + "id": "379", "name": "user_id", "type": { "id": "uuid", "name": "uuid" }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766580515 - }, - { - "id": "338", - "name": "access_level", - "type": { - "id": "collection_access_level", - "name": "collection_access_level" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766832324 - }, - { - "id": "339", - "name": "invited_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778766846050 - }, - { - "id": "340", - "name": "joined_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766841216 - } - ], - "indexes": [ - { - "id": "341", - "name": "", - "fieldIds": [ - "335" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778766471107 - } - ], - "color": "#9ef07a", - "createdAt": 1778766471107, - "isView": false, - "order": 38, - "schema": "public", - "width": 337 - }, - { - "id": "342", - "name": "home_media_banner", - "x": -1034.714934672103, - "y": -969.0938770634809, - "fields": [ - { - "id": "343", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, "unique": true, "nullable": false, - "primaryKey": true, - "createdAt": 1778771594518 - }, - { - "id": "344", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, "primaryKey": false, - "createdAt": 1778771625245 + "createdAt": 1778808096764 }, { - "id": "345", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771632111 - }, - { - "id": "346", - "name": "priority", - "type": { - "id": "smallint", - "name": "smallint" - }, - "unique": true, - "nullable": true, - "primaryKey": false, - "createdAt": 1778771638786 - }, - { - "id": "347", - "name": "start_show", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771679920 - }, - { - "id": "348", - "name": "end_show", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778771687135 - }, - { - "id": "349", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771693471 - } - ], - "indexes": [ - { - "id": "350", - "name": "", - "fieldIds": [ - "343" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778771594518 - } - ], - "color": "#b067e9", - "createdAt": 1778771594518, - "isView": false, - "order": 39, - "schema": "public" - }, - { - "id": "351", - "name": "comment_audit_logs", - "x": -1031.768269593756, - "y": -322.47738647771854, - "fields": [ - { - "id": "352", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778772275091 - }, - { - "id": "353", + "id": "380", "name": "comment_id", "type": { "id": "uuid", @@ -4438,34 +4775,22 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778772293834 + "createdAt": 1778808185625 }, { - "id": "354", - "name": "performed_by", + "id": "381", + "name": "type", "type": { - "id": "uuid", - "name": "uuid" + "id": "like_type", + "name": "like_type" }, "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778772315274 + "createdAt": 1778808192863 }, { - "id": "355", - "name": "action", - "type": { - "id": "audit_action", - "name": "audit_action" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772326253 - }, - { - "id": "356", + "id": "382", "name": "created_at", "type": { "id": "timestamp", @@ -4474,252 +4799,157 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778772335038 + "createdAt": 1778808284226 } ], "indexes": [ { - "id": "357", - "name": "", + "id": "383", + "name": "index_1", "fieldIds": [ - "352" + "380", + "379" ], "unique": true, - "isPrimaryKey": true, - "createdAt": 1778772275091 - } - ], - "color": "#b067e9", - "createdAt": 1778772275091, - "isView": false, - "order": 40, - "schema": "public" - }, - { - "id": "358", - "name": "comments", - "x": -1035.4972528190797, - "y": -21.831519473281823, - "fields": [ - { - "id": "359", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778772484798 - }, - { - "id": "360", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772536237 - }, - { - "id": "361", - "name": "episode_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772542751 - }, - { - "id": "362", - "name": "content", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772548786, - "characterMaximumLength": "255" - }, - { - "id": "363", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777149915 - }, - { - "id": "364", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777198204 - }, - { - "id": "365", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777213469 - } - ], - "indexes": [ - { - "id": "366", - "name": "", - "fieldIds": [ - "359" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778772484798 + "createdAt": 1778808299354 } ], "color": "#ff9f74", - "createdAt": 1778772484798, + "createdAt": 1778808096764, "isView": false, - "order": 41, - "schema": "public" - }, - { - "id": "367", - "name": "comment_reports", - "x": -1032.5934799775514, - "y": -655.2659179217417, - "fields": [ - { - "id": "368", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777460892 - }, - { - "id": "369", - "name": "reporter_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777475869 - }, - { - "id": "370", - "name": "comment_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777483534 - }, - { - "id": "371", - "name": "title", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777515056, - "characterMaximumLength": "115" - }, - { - "id": "372", - "name": "status", - "type": { - "id": "status_submission", - "name": "status_submission" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777836090 - }, - { - "id": "373", - "name": "description", - "type": { - "id": "text", - "name": "text" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777519944 - }, - { - "id": "374", - "name": "reported_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777537682 - }, - { - "id": "375", - "name": "closed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777545373 - } - ], - "indexes": [], - "color": "#b067e9", - "createdAt": 1778777460892, - "isView": false, - "order": 42, + "order": 43, "schema": "public" } ], "relationships": [ { - "id": "377", + "id": "384", + "name": "collection_members_collection_id_fk", + "sourceSchema": "public", + "sourceTableId": "291", + "targetSchema": "public", + "targetTableId": "136", + "sourceFieldId": "292", + "targetFieldId": "138", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766565819, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "385", + "name": "collection_members_invited_by_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "136", + "sourceFieldId": "246", + "targetFieldId": "141", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766863110, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "386", + "name": "collection_members_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "136", + "sourceFieldId": "246", + "targetFieldId": "139", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778766807732, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "388", + "name": "comment_audit_logs_comment_id_fk", + "sourceSchema": "public", + "sourceTableId": "208", + "targetSchema": "public", + "targetTableId": "118", + "sourceFieldId": "209", + "targetFieldId": "120", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777327740, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "389", + "name": "comment_audit_logs_performed_by_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "118", + "sourceFieldId": "246", + "targetFieldId": "121", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777342519, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "391", + "name": "comment_reports_comment_id_fk", + "sourceSchema": "public", + "sourceTableId": "208", + "targetSchema": "public", + "targetTableId": "275", + "sourceFieldId": "209", + "targetFieldId": "278", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777586444, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "392", + "name": "comment_reports_reporter_id_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "275", + "sourceFieldId": "246", + "targetFieldId": "277", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777570446, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "393", + "name": "comments_episode_id_fk", + "sourceSchema": "public", + "sourceTableId": "5", + "targetSchema": "public", + "targetTableId": "208", + "sourceFieldId": "6", + "targetFieldId": "211", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777292243, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "394", + "name": "comments_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "208", + "sourceFieldId": "246", + "targetFieldId": "210", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778777252269, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "395", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4733,7 +4963,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "378", + "id": "396", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4747,55 +4977,83 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "379", + "id": "397", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "240", + "sourceTableId": "284", "targetSchema": "public", - "targetTableId": "180", - "sourceFieldId": "241", - "targetFieldId": "182", + "targetTableId": "197", + "sourceFieldId": "285", + "targetFieldId": "199", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, "diagramId": "yqwsqwccoj6v" }, { - "id": "380", + "id": "398", "name": "genre_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "167", + "sourceTableId": "182", "targetSchema": "public", - "targetTableId": "180", - "sourceFieldId": "168", - "targetFieldId": "181", + "targetTableId": "197", + "sourceFieldId": "183", + "targetFieldId": "198", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, "diagramId": "yqwsqwccoj6v" }, { - "id": "381", + "id": "399", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "240", + "sourceTableId": "284", "targetSchema": "public", - "targetTableId": "330", - "sourceFieldId": "241", - "targetFieldId": "332", + "targetTableId": "374", + "sourceFieldId": "285", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "382", + "id": "400", + "name": "home_media_banner_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "236", + "sourceFieldId": "246", + "targetFieldId": "239", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771806907, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "401", + "name": "home_media_banner_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "37", + "targetSchema": "public", + "targetTableId": "236", + "sourceFieldId": "38", + "targetFieldId": "238", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771781222, + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "402", "name": "media_characters_characters_characters_id", "sourceSchema": "public", - "sourceTableId": "118", + "sourceTableId": "125", "targetSchema": "public", "targetTableId": "24", - "sourceFieldId": "121", + "sourceFieldId": "128", "targetFieldId": "25", "sourceCardinality": "many", "targetCardinality": "one", @@ -4803,97 +5061,97 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "383", + "id": "403", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", - "sourceTableId": "118", + "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "255", - "sourceFieldId": "122", - "targetFieldId": "256", + "targetTableId": "299", + "sourceFieldId": "129", + "targetFieldId": "300", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "384", + "id": "404", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "185", - "sourceFieldId": "211", - "targetFieldId": "188", + "targetTableId": "202", + "sourceFieldId": "246", + "targetFieldId": "205", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733368958, "diagramId": "yqwsqwccoj6v" }, { - "id": "385", + "id": "405", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "247", + "sourceTableId": "291", "targetSchema": "public", - "targetTableId": "185", - "sourceFieldId": "248", - "targetFieldId": "186", + "targetTableId": "202", + "sourceFieldId": "292", + "targetFieldId": "203", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733702652, "diagramId": "yqwsqwccoj6v" }, { - "id": "386", + "id": "406", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "240", + "sourceTableId": "284", "targetSchema": "public", - "targetTableId": "137", - "sourceFieldId": "241", - "targetFieldId": "139", + "targetTableId": "152", + "sourceFieldId": "285", + "targetFieldId": "154", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283900006, "diagramId": "yqwsqwccoj6v" }, { - "id": "387", + "id": "407", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "137", + "targetTableId": "152", "sourceFieldId": "70", - "targetFieldId": "138", + "targetFieldId": "153", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283887322, "diagramId": "yqwsqwccoj6v" }, { - "id": "388", + "id": "408", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "141", + "targetTableId": "156", "sourceFieldId": "38", - "targetFieldId": "143", + "targetFieldId": "158", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299855251, "diagramId": "yqwsqwccoj6v" }, { - "id": "389", + "id": "409", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "141", + "sourceTableId": "156", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "143", + "sourceFieldId": "158", "targetFieldId": "38", "sourceCardinality": "many", "targetCardinality": "one", @@ -4901,41 +5159,41 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "390", + "id": "410", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "240", + "sourceTableId": "284", "targetSchema": "public", - "targetTableId": "270", - "sourceFieldId": "241", - "targetFieldId": "272", + "targetTableId": "314", + "sourceFieldId": "285", + "targetFieldId": "316", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "391", + "id": "411", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "270", + "targetTableId": "314", "sourceFieldId": "68", - "targetFieldId": "271", + "targetFieldId": "315", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "392", + "id": "412", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "151", + "sourceTableId": "166", "targetSchema": "public", "targetTableId": "109", - "sourceFieldId": "152", + "sourceFieldId": "167", "targetFieldId": "111", "sourceCardinality": "one", "targetCardinality": "many", @@ -4943,7 +5201,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "393", + "id": "413", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -4957,7 +5215,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "394", + "id": "414", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4971,7 +5229,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "395", + "id": "415", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -4985,7 +5243,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "396", + "id": "416", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -4999,13 +5257,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "397", + "id": "417", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "292", + "sourceTableId": "336", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "294", + "sourceFieldId": "338", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", @@ -5013,13 +5271,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "398", + "id": "418", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "292", + "sourceTableId": "336", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "294", + "sourceFieldId": "338", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", @@ -5027,13 +5285,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "399", + "id": "419", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "321", + "sourceTableId": "365", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "322", + "sourceFieldId": "366", "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", @@ -5041,7 +5299,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "400", + "id": "420", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5055,27 +5313,27 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "401", + "id": "421", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "118", + "targetTableId": "125", "sourceFieldId": "75", - "targetFieldId": "119", + "targetFieldId": "126", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "402", + "id": "422", "name": "medias_country_fk", "sourceSchema": "public", - "sourceTableId": "129", + "sourceTableId": "144", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "130", + "sourceFieldId": "145", "targetFieldId": "63", "sourceCardinality": "one", "targetCardinality": "many", @@ -5083,7 +5341,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "403", + "id": "423", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5097,49 +5355,49 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "404", + "id": "424", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "141", + "targetTableId": "156", "sourceFieldId": "74", - "targetFieldId": "142", + "targetFieldId": "157", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "405", + "id": "425", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "185", + "targetTableId": "202", "sourceFieldId": "38", - "targetFieldId": "187", + "targetFieldId": "204", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733359073, "diagramId": "yqwsqwccoj6v" }, { - "id": "406", + "id": "426", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "236", + "targetTableId": "271", "sourceFieldId": "66", - "targetFieldId": "237", + "targetFieldId": "272", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "yqwsqwccoj6v" }, { - "id": "407", + "id": "427", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5153,7 +5411,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "408", + "id": "428", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5167,7 +5425,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "409", + "id": "429", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5181,119 +5439,119 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "410", + "id": "430", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "147", + "targetTableId": "162", "sourceFieldId": "51", - "targetFieldId": "148", + "targetFieldId": "163", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "411", + "id": "431", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "232", + "targetTableId": "267", "sourceFieldId": "67", - "targetFieldId": "233", + "targetFieldId": "268", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "412", + "id": "432", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "330", + "targetTableId": "374", "sourceFieldId": "71", - "targetFieldId": "331", + "targetFieldId": "375", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "413", + "id": "433", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "312", + "targetTableId": "356", "sourceFieldId": "44", - "targetFieldId": "313", + "targetFieldId": "357", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "414", + "id": "434", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "151", + "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "236", - "sourceFieldId": "152", - "targetFieldId": "238", + "targetTableId": "271", + "sourceFieldId": "167", + "targetFieldId": "273", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "415", + "id": "435", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "151", + "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "232", - "sourceFieldId": "152", - "targetFieldId": "234", + "targetTableId": "267", + "sourceFieldId": "167", + "targetFieldId": "269", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "416", + "id": "436", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "124", - "sourceFieldId": "211", - "targetFieldId": "125", + "targetTableId": "131", + "sourceFieldId": "246", + "targetFieldId": "132", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517515380, "diagramId": "yqwsqwccoj6v" }, { - "id": "417", + "id": "437", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "124", - "sourceFieldId": "211", - "targetFieldId": "126", + "targetTableId": "131", + "sourceFieldId": "246", + "targetFieldId": "133", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517541887, "diagramId": "yqwsqwccoj6v" }, { - "id": "418", + "id": "438", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -5307,13 +5565,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "419", + "id": "439", "name": "rating_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "167", + "sourceTableId": "182", "targetSchema": "public", "targetTableId": "1", - "sourceFieldId": "168", + "sourceFieldId": "183", "targetFieldId": "2", "sourceCardinality": "one", "targetCardinality": "many", @@ -5321,13 +5579,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "422", + "id": "442", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", - "sourceTableId": "129", + "sourceTableId": "144", "targetSchema": "public", "targetTableId": "105", - "sourceFieldId": "130", + "sourceFieldId": "145", "targetFieldId": "107", "sourceCardinality": "one", "targetCardinality": "many", @@ -5335,13 +5593,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "423", + "id": "443", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "167", + "sourceTableId": "182", "targetSchema": "public", "targetTableId": "105", - "sourceFieldId": "168", + "sourceFieldId": "183", "targetFieldId": "106", "sourceCardinality": "one", "targetCardinality": "many", @@ -5349,167 +5607,167 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "424", + "id": "444", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "325", - "sourceFieldId": "211", - "targetFieldId": "326", + "targetTableId": "369", + "sourceFieldId": "246", + "targetFieldId": "370", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "425", + "id": "445", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "325", - "sourceFieldId": "211", - "targetFieldId": "327", + "targetTableId": "369", + "sourceFieldId": "246", + "targetFieldId": "371", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "426", + "id": "446", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "191", - "sourceFieldId": "211", - "targetFieldId": "192", + "targetTableId": "217", + "sourceFieldId": "246", + "targetFieldId": "218", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778516921506, "diagramId": "yqwsqwccoj6v" }, { - "id": "427", + "id": "447", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", "targetSchema": "public", - "targetTableId": "167", + "targetTableId": "182", "sourceFieldId": "25", - "targetFieldId": "169", + "targetFieldId": "184", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778518451836, "diagramId": "yqwsqwccoj6v" }, { - "id": "430", + "id": "450", "name": "user_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "167", + "sourceTableId": "182", "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "168", - "targetFieldId": "211", + "targetTableId": "245", + "sourceFieldId": "183", + "targetFieldId": "246", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "yqwsqwccoj6v" }, { - "id": "431", + "id": "451", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "162", + "targetTableId": "177", "sourceFieldId": "6", - "targetFieldId": "164", + "targetFieldId": "179", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732139998, "diagramId": "yqwsqwccoj6v" }, { - "id": "432", + "id": "452", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "162", - "sourceFieldId": "211", - "targetFieldId": "163", + "targetTableId": "177", + "sourceFieldId": "246", + "targetFieldId": "178", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778731708617, "diagramId": "yqwsqwccoj6v" }, { - "id": "433", + "id": "453", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "129", - "sourceFieldId": "223", - "targetFieldId": "130", + "targetTableId": "144", + "sourceFieldId": "258", + "targetFieldId": "145", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778401651979, "diagramId": "yqwsqwccoj6v" }, { - "id": "434", + "id": "454", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "302", + "sourceTableId": "346", "targetSchema": "public", - "targetTableId": "275", - "sourceFieldId": "304", - "targetFieldId": "276", + "targetTableId": "319", + "sourceFieldId": "348", + "targetFieldId": "320", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "yqwsqwccoj6v" }, { - "id": "435", + "id": "455", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "260", - "sourceFieldId": "211", - "targetFieldId": "263", + "targetTableId": "304", + "sourceFieldId": "246", + "targetFieldId": "307", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "yqwsqwccoj6v" }, { - "id": "436", + "id": "456", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "260", - "sourceFieldId": "211", - "targetFieldId": "264", + "targetTableId": "304", + "sourceFieldId": "246", + "targetFieldId": "308", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "yqwsqwccoj6v" }, { - "id": "437", + "id": "457", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "260", + "sourceTableId": "304", "targetSchema": "public", "targetTableId": "92", - "sourceFieldId": "262", + "sourceFieldId": "306", "targetFieldId": "93", "sourceCardinality": "one", "targetCardinality": "one", @@ -5517,195 +5775,65 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "438", + "id": "458", "name": "videos_service_id_video_services_id", "sourceSchema": "public", "sourceTableId": "92", "targetSchema": "public", - "targetTableId": "275", + "targetTableId": "319", "sourceFieldId": "94", - "targetFieldId": "276", + "targetFieldId": "320", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "439", + "id": "459", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "255", + "sourceTableId": "299", "targetSchema": "public", - "targetTableId": "200", - "sourceFieldId": "258", - "targetFieldId": "201", + "targetTableId": "226", + "sourceFieldId": "302", + "targetFieldId": "227", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "440", - "name": "collection_members_collection_id_fk", - "sourceSchema": "public", - "sourceTableId": "247", - "targetSchema": "public", - "targetTableId": "334", - "sourceFieldId": "248", - "targetFieldId": "336", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778766565819 - }, - { - "id": "441", - "name": "collection_members_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "210", - "targetSchema": "public", - "targetTableId": "334", - "sourceFieldId": "211", - "targetFieldId": "337", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778766807732 - }, - { - "id": "442", - "name": "collection_members_invited_by_fk", - "sourceSchema": "public", - "sourceTableId": "210", - "targetSchema": "public", - "targetTableId": "334", - "sourceFieldId": "211", - "targetFieldId": "339", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778766863110 - }, - { - "id": "443", - "name": "home_media_banner_media_id_fk", + "id": "460", + "name": "comment_likes_user_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "342", + "targetTableId": "378", "sourceFieldId": "38", - "targetFieldId": "344", + "targetFieldId": "379", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778771781222 + "createdAt": 1778808338630 }, { - "id": "444", - "name": "home_media_banner_created_by_fk", + "id": "461", + "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "210", + "sourceTableId": "208", "targetSchema": "public", - "targetTableId": "342", - "sourceFieldId": "211", - "targetFieldId": "345", + "targetTableId": "378", + "sourceFieldId": "209", + "targetFieldId": "380", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778771806907 - }, - { - "id": "445", - "name": "comments_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "210", - "targetSchema": "public", - "targetTableId": "358", - "sourceFieldId": "211", - "targetFieldId": "360", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777252269 - }, - { - "id": "446", - "name": "comments_episode_id_fk", - "sourceSchema": "public", - "sourceTableId": "5", - "targetSchema": "public", - "targetTableId": "358", - "sourceFieldId": "6", - "targetFieldId": "361", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777292243 - }, - { - "id": "447", - "name": "comment_audit_logs_comment_id_fk", - "sourceSchema": "public", - "sourceTableId": "358", - "targetSchema": "public", - "targetTableId": "351", - "sourceFieldId": "359", - "targetFieldId": "353", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777327740 - }, - { - "id": "448", - "name": "comment_audit_logs_performed_by_fk", - "sourceSchema": "public", - "sourceTableId": "210", - "targetSchema": "public", - "targetTableId": "351", - "sourceFieldId": "211", - "targetFieldId": "354", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777342519 - }, - { - "id": "449", - "name": "comment_reports_reporter_id_fk", - "sourceSchema": "public", - "sourceTableId": "210", - "targetSchema": "public", - "targetTableId": "367", - "sourceFieldId": "211", - "targetFieldId": "369", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777570446 - }, - { - "id": "450", - "name": "comment_reports_comment_id_fk", - "sourceSchema": "public", - "sourceTableId": "358", - "targetSchema": "public", - "targetTableId": "367", - "sourceFieldId": "359", - "targetFieldId": "370", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777586444 + "createdAt": 1778808350916 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "452", - "name": "collection_access_level", - "kind": "enum", - "values": [ - "viewer", - "contributor", - "moderator", - "owner" - ], - "fields": [], - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "453", + "id": "462", "name": "address", "kind": "composite", "values": [], @@ -5738,7 +5866,33 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "454", + "id": "463", + "name": "audit_action", + "kind": "enum", + "values": [ + "delete", + "restore", + "edit", + "flag" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "464", + "name": "collection_access_level", + "kind": "enum", + "values": [ + "viewer", + "contributor", + "moderator", + "owner" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "465", "name": "privacy_level", "kind": "enum", "values": [ @@ -5750,7 +5904,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "455", + "id": "466", "name": "status_submission", "kind": "enum", "values": [ @@ -5762,7 +5916,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "456", + "id": "467", "name": "user_preference_state", "kind": "enum", "values": [ @@ -5773,7 +5927,20 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "457", + "id": "468", + "name": "user_role", + "kind": "enum", + "values": [ + "user", + "contributor", + "curator", + "administrator" + ], + "fields": [], + "diagramId": "yqwsqwccoj6v" + }, + { + "id": "469", "name": "user_sex", "kind": "enum", "values": [ @@ -5784,26 +5951,12 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "458", - "name": "user_role", + "id": "470", + "name": "like_type", "kind": "enum", "values": [ - "user", - "contributor", - "curator", - "administrator" - ], - "fields": [] - }, - { - "id": "459", - "name": "audit_action", - "kind": "enum", - "values": [ - "delete", - "restore", - "edit", - "flag" + "like", + "dislike" ], "fields": [] } From 22ff7568a90070766ac344490b31bfb64d1a1922 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 4 May 2026 21:00:00 +0700 Subject: [PATCH 09/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20update=20DBML=20wi?= =?UTF-8?q?th=20latest=20schema=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/dbml/schema.dbml | 1204 +++++++++++++++------------------------ 1 file changed, 467 insertions(+), 737 deletions(-) diff --git a/prisma/dbml/schema.dbml b/prisma/dbml/schema.dbml index 9abb82f..c33ad74 100644 --- a/prisma/dbml/schema.dbml +++ b/prisma/dbml/schema.dbml @@ -1,808 +1,538 @@ -//// ------------------------------------------------------ -//// THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) -//// ------------------------------------------------------ - -Table medias { - id String [pk] - title String [not null] - titleAlternative Json [not null] - slug String [unique, not null] - malId Int [unique] - pictureMedium String [not null] - pictureLarge String [not null] - genres genres [not null] - country Country [not null, default: 'JP'] - score Decimal [not null, default: 0] - status String [not null] - startAiring DateTime - endAiring DateTime - synopsis String [not null] - ageRating String [not null] - mediaType MediaType [not null] - source String - studios studios [not null] - characters characters [not null] - onDraft Boolean [not null, default: true] - uploader users [not null] - uploadedBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - bannerPromotion hero_banner [not null] - logs media_logs [not null] - episodes episodes [not null] - reviews movie_reviews [not null] - inCollections CollectionMedia [not null] +Enum "audit_action" { + "delete" + "restore" + "edit" + "flag" } -Table media_logs { - id String [pk] - status MediaOperation [not null] - approval Boolean [not null, default: false] - proposer users [not null] - proposedBy String [not null] - approver users [not null] - approvedBy String [not null] - media medias [not null] - mediaId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Enum "collection_access_level" { + "viewer" + "contributor" + "moderator" + "owner" } -Table genres { - id String [pk] - name String [not null] - slug String [unique, not null] - malId Int [unique, not null] - malUrl String [not null] - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - medias medias [not null] - user_favourite_genres user_preferences [not null] +Enum "privacy_level" { + "private" + "unlisted" + "public" } -Table studios { - id String [pk] - name String [not null] - slug String [unique, not null] - linkAbout String [not null] - malId Int [unique, not null] - logoUrl String - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - medias medias [not null] +Enum "status_submission" { + "pending" + "approved" + "rejected" } -Table characters { - id String [pk] - malId Int [unique, not null] - name String [not null] - role CharacterRole [not null] - favorites Int [not null, default: 0] - imageUrl String - smallImageUrl String - createdBy users [not null] - creatorId String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - medias medias [not null] - voice_actors lang_va_char [not null] +Enum "user_preference_state" { + "exclude" + "include" } -Table voice_actors { - id String [pk] - malId Int [unique, not null] - name String [not null] - birthday DateTime - description String - aboutUrl String - imageUrl String - websiteUrl String - createdBy users [not null] - creatorId String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - characters lang_va_char [not null] +Enum "user_role" { + "user" + "contributor" + "curator" + "administrator" } -Table lang_va_char { - id String [pk] - language String [not null] - voiceActor voice_actors [not null] - vaId String [not null] - character characters [not null] - charId String [not null] - createdBy users [not null] - creatorId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Enum "user_sex" { + "female" + "male" +} - indexes { - (language, vaId, charId) [unique] +Enum "like_type" { + "like" + "dislike" +} + +Table "public"."user_rating_preferences" { + "user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"] + "rating_id" uuid [not null, ref: > "public"."media_age_ratings"."id"] + "state" user_preference_state [not null] +} + +Table "public"."episodes" { + "id" uuid [pk, not null, ref: > "public"."medias"."episodes"] + "media_id" uuid [not null, ref: > "public"."medias"."id"] + "episode" smallint + "mal_url" varchar(255) + "mal_forum_url" varchar(255) + "title" varchar(155) [not null] + "title_origin" varchar(155) + "title_romanji" varchar(155) + "aired" date + "filler" boolean [not null, default: false] + "recap" boolean [not null, default: false] + "total_score" int [not null] + "scored_by" int [not null] + "videos" uuid + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} + +Table "public"."characters" { + "id" uuid [pk, not null] + "name" varchar(255) [not null] + "image" varchar(255) + "small_image" varchar(255) + "mal_id" int + "mal_url" varchar(255) + "liked" int [not null, default: 0] + "connections" int [default: 0] + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} + +Table "public"."medias" { + "id" uuid [pk, not null, ref: > "public"."media_submissions"."media_id"] + "mal_id" int [not null] + "title" varchar(255) [not null] + "title_secondary" varchar(255) + "title_original" varchar(255) + "title_synonyms" varchar(255) [note: 'This is Array'] + "trailers" uuid + "synopsis" text [not null] + "small_image_url" varchar(255) + "medium_image_url" varchar(255) [not null] + "large_image_url" varchar(255) + "type" uuid [not null, ref: > "public"."media_types"."id"] + "source" uuid [not null, ref: > "public"."media_sources"."id"] + "status" uuid [not null, ref: > "public"."media_statuses"."id"] + "airing" boolean [not null, default: false] + "start_airing" date + "end_airing" date + "age_rating" uuid [ref: > "public"."media_age_ratings"."id"] + "score" numeric(2,2) [not null, default: 0] + "score_total" int [not null, default: 0] + "scored_by" int [not null, default: 0] + "favourites" int [not null, default: 0] + "background" text + "season" varchar(15) [not null, note: 'enum(winter, spring, summer, fall)'] + "year" smallint [not null] + "country" uuid [not null, ref: > "public"."system_country"."id"] + "broadcast_date" varchar(64) + "producers" uuid [not null] + "licensors" uuid [not null] + "studios" uuid [not null] + "genres" uuid + "episodes" uuid + "explicit_genres" uuid + "themes" uuid + "demographics" uuid + "relations" uuid + "external_links" uuid + "characters" uuid + "approved" boolean [default: false] + "approved_by" uuid + "created_by" uuid [not null] + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} + +Table "public"."media_relations" { + "id" uuid [pk, not null, ref: > "public"."medias"."relations"] + "relation" varchar(16) + "target_media" uuid [ref: > "public"."medias"."id"] +} + +Table "public"."media_sources" { + "id" uuid [pk, not null] + "name" varchar(18) [not null] +} + +Table "public"."videos" { + "id" uuid [pk, not null, ref: > "public"."episodes"."videos", ref: - "public"."video_submissions"."video_id"] + "service_id" uuid [not null, ref: > "public"."video_services"."id"] + "video_code" varchar(255) [not null] + "short_code" varchar(255) + "thumbnail_code" varchar(255) + "download_code" varchar(255) + "pending_upload" boolean [default: true] + "created_by" uuid [not null] + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} + +Table "public"."user_country_preferences" { + "user_id" uuid [not null, ref: > "public"."user_preferences"."user_id"] + "country_id" uuid [unique, not null, ref: > "public"."system_country"."id"] + "state" user_preference_state [not null] +} + +Table "public"."media_producers" { + "media_id" uuid [not null, ref: > "public"."medias"."producers"] + "producer_id" uuid [not null, ref: > "public"."producers"."id"] + + Indexes { + (media_id, producer_id) [pk] } } -Table episodes { - id String [pk] - media medias [not null] - mediaId String [not null] - episode Int [not null] - name String [not null] - score Decimal [not null, default: 0] - pictureThumbnail String - viewed BigInt [not null, default: 0] - likes BigInt [not null, default: 0] - dislikes BigInt [not null, default: 0] - pendingUpload Boolean [not null, default: true] - uploader users [not null] - uploadedBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - user_likes episode_likes [not null] - videos videos [not null] - user_histories watch_histories [not null] - comments comments [not null] +Table "public"."media_age_ratings" { + "id" uuid [pk, not null] + "name" varchar(64) [not null] + "min_age" smallint [not null] +} - indexes { - (mediaId, episode) [unique] +Table "public"."comment_audit_logs" { + "id" uuid [pk, not null] + "comment_id" uuid [not null, ref: > "public"."comments"."id"] + "performed_by" uuid [not null, ref: > "public"."users"."id"] + "action" audit_action [not null] + "created_at" timestamp [not null] +} + +Table "public"."media_characters" { + "id" uuid [pk, not null, ref: > "public"."medias"."characters"] + "role" text [not null, note: 'main, supporting'] + "characters" uuid [not null, ref: > "public"."characters"."id"] + "voice_actor" uuid [not null] +} + +Table "public"."provisioned_users" { + "provisioned_by" uuid [unique, not null, ref: > "public"."users"."id"] + "provisioned_to" uuid [not null, ref: > "public"."users"."id"] + "provisioned_at" timestamp [not null] + "reason" bigint +} + +Table "public"."collection_members" { + "id" uuid [pk, not null] + "collection_id" uuid [not null, ref: > "public"."collections"."id"] + "user_id" uuid [not null, ref: > "public"."users"."id"] + "access_level" collection_access_level [not null] + "invited_by" uuid [ref: > "public"."users"."id"] + "joined_at" timestamp [not null] +} + +Table "public"."system_country" { + "id" uuid [pk, not null, ref: - "public"."users"."country"] + "name" varchar(155) [not null] + "slug" varchar(165) [not null] + "code" varchar(3) [not null] + "flag" varchar(255) + "banner" varchar(255) +} + +Table "public"."media_explicit_genres" { + "media_id" uuid [not null, ref: > "public"."medias"."explicit_genres"] + "genre_id" uuid [not null, ref: > "public"."genres"."id"] + + Indexes { + (media_id, genre_id) [pk] + } + + Note: 'composite primary key = media_id + genre_id' +} + +Table "public"."media_external_links" { + "id" uuid [pk, not null, ref: > "public"."medias"."external_links"] + "media_id" uuid [ref: > "public"."medias"."id"] + "name" varchar(64) + "url" varchar(255) +} + +Table "public"."media_statuses" { + "id" uuid [pk, not null] + "name" varchar(64) [unique, not null] +} + +Table "public"."producers" { + "id" uuid [pk, not null] + "mal_id" int [not null] + "type" varchar(24) [not null] + "name" varchar(155) [not null] + "url" varchar(255) + "created_by" uuid [not null] + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} + +Table "public"."user_watch_histories" { + "user_id" uuid [not null, ref: > "public"."users"."id"] + "episode_id" uuid [not null, ref: > "public"."episodes"."id"] + "updated_at" timestamp [not null] + + Indexes { + (episode_id, user_id) [unique, name: "index_1"] } } -Table episode_likes { - id String [pk] - user users [not null] - userId String [not null] - session user_sessions [not null] - sessionId String [not null] - episode episodes [not null] - episodeId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."user_preferences" { + "user_id" uuid [pk, not null] + "character_as_partner" uuid [ref: > "public"."characters"."id"] + "comment_picture" varchar(255) + "watch_history" boolean [not null, default: true] + "search_history" boolean [not null, default: false] + "private_account" boolean [not null, default: false] + "message_open" boolean [not null, default: true] + "birthday_open" boolean [not null, default: false] + "email_open" boolean [not null, default: false] + "number_open" boolean [not null, default: false] + "partner_open" boolean [not null, default: true] + "subscribe_newsletter" boolean [not null, default: true] + "security_notification" boolean [not null, default: true] } -Table videos { - id String [pk] - episode episodes [not null] - episodeId String [not null] - service video_services [not null] - serviceId String [not null] - videoCode String [not null] - thumbnailCode String - pendingUpload Boolean [not null, default: true] - uploader users [not null] - uploadedBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."user_genre_preferences" { + "user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"] + "genre_id" uuid [not null, ref: > "public"."genres"."id"] + "state" user_preference_state [not null] - indexes { - (serviceId, videoCode) [unique] + Indexes { + (user_id, genre_id) [unique, name: "index_1_1"] } } -Table video_services { - id String [pk] - name String [unique, not null] - domain String [not null] - logo String - hexColor String [not null] - endpointVideo String [not null] - endpointThumbnail String - endpointDownload String - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - videos videos [not null] - user_preferences user_preferences [not null] -} +Table "public"."media_collections" { + "collection_id" uuid [unique, not null, ref: > "public"."collections"."id"] + "media_id" uuid [not null, ref: > "public"."medias"."id"] + "added_by" uuid [not null, ref: > "public"."users"."id"] + "added_at" bigint [not null] -Table users { - id String [pk] - name String [not null] - username String [unique, not null] - email String [unique, not null] - password String [not null] - birthDate DateTime - gender UserGender - phoneCC Int - phoneNumber Int - assignedRoles user_role_assignments [not null] - bioProfile String - avatar String - commentBackground String - provider String - providerId String [unique] - providerToken String - providerPayload Json - preference user_preferences - verifiedAt DateTime - disabledAt DateTime - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - medias medias [not null] - media_proposeds media_logs [not null] - media_approveds media_logs [not null] - genres genres [not null] - studios studios [not null] - characters characters [not null] - voice_actor voice_actors [not null] - lang_va_char lang_va_char [not null] - episodes episodes [not null] - episode_likes episode_likes [not null] - videos videos [not null] - video_services video_services [not null] - create_roles user_roles [not null] - notifications user_notifications [not null] - sessions user_sessions [not null] - logs user_logs [not null] - collections collections [not null] - allowed_collections collections [not null] - watch_histories watch_histories [not null] - media_reviews movie_reviews [not null] - comments comments [not null] - liked_comments comment_likes [not null] - reported_comments comment_reports [not null] - approved_comments comment_reports [not null] - create_languages languages [not null] - user_create_email email_system_accounts [not null] - user_emails email_system_histories [not null] - user_hero_banner hero_banner [not null] - sys_notifications system_notifications [not null] - sys_logs system_logs [not null] -} - -Table user_preferences { - id String [pk] - user users [not null] - userId String [unique, not null] - lang languages - langPreference String - adultFiltering AdultFiltering [not null, default: 'hide'] - adultAlert AdultAlert [not null, default: 'show'] - videoQuality VideoQuality [not null, default: 'Q1080'] - serviceDefault video_services - serviceDefaultId String - hideContries Country[] [not null] - favoriteGenres genres [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] -} - -Table user_roles { - id String [pk] - name String [unique, not null] - description String - primaryColor String - secondaryColor String - pictureImage String - badgeImage String - isSuperadmin Boolean [not null, default: false] - canEditMedia Boolean [not null, default: false] - canManageMedia Boolean [not null, default: false] - canEditEpisodes Boolean [not null, default: false] - canManageEpisodes Boolean [not null, default: false] - canEditComment Boolean [not null, default: false] - canManageComment Boolean [not null, default: false] - canEditUser Boolean [not null, default: false] - canManageUser Boolean [not null, default: false] - canEditSystem Boolean [not null, default: false] - canManageSystem Boolean [not null, default: false] - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - assignedUser user_role_assignments [not null] -} - -Table user_role_assignments { - user users [not null] - userId String [not null] - role user_roles [not null] - roleId String [not null] - assignmentAt DateTime [default: `now()`, not null] - - indexes { - (userId, roleId) [pk] + Indexes { + (collection_id, media_id) [unique, name: "index_1_2"] } } -Table user_notifications { - id String [pk] - title String [not null] - content String [not null] - picture String [not null] - state UserNotificationState [not null] - ctaLink String [not null] - user users [not null] - userId String [not null] - isReaded Boolean [not null, default: false] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."comments" { + "id" uuid [pk, not null] + "user_id" uuid [not null, ref: > "public"."users"."id"] + "episode_id" uuid [not null, ref: > "public"."episodes"."id"] + "content" varchar(255) [not null] + "created_at" timestamp [not null] + "updated_at" timestamp [not null] + "deleted_at" timestamp } -Table user_sessions { - id String [pk] - isAuthenticated Boolean [not null, default: false] - user users [not null] - userId String [not null] - deviceType String [not null] - deviceOs String [not null] - deviceIp String [not null] - browser String [not null] - isOnline Boolean [not null, default: false] - lastOnline DateTime [default: `now()`, not null] - validUntil DateTime [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - logs user_logs [not null] - episode_likes episode_likes [not null] - watch_histories watch_histories [not null] -} +Table "public"."user_oauth_credentials" { + "id" uuid [pk, not null, ref: > "public"."users"."id"] + "user_id" uuid [not null] + "oauth_id" uuid [not null] + "provider_token" varchar(500) + "provider_sub" varchar(500) + "last_action" timestamp [not null] -Table user_logs { - id String [pk] - title String [not null] - notes String [not null] - user users [not null] - userId String [not null] - session user_sessions [not null] - sessionId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] -} - -Table collections { - id String [pk] - name String [not null] - slug String [not null] - owner users [not null] - ownerId String [not null] - accessStatus AccessStatus [not null, default: 'private'] - password String - usersAllowed users [not null] - accessScope AccessScope [not null, default: 'viewer'] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - media_saved CollectionMedia [not null] - - indexes { - (slug, ownerId) [unique] + Indexes { + (oauth_id, user_id) [unique, name: "index_2"] } } -Table CollectionMedia { - id String [pk] - collection collections [not null] - collectionId String [not null] - media medias [not null] - mediaId String [not null] - savedAt DateTime [default: `now()`, not null] +Table "public"."staff" { + "id" uuid [pk, not null] + "name" varchar(255) [not null] + "image" varchar(255) + "mal_id" int + "mal_url" varchar(255) + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] +} - indexes { - (collectionId, mediaId) [unique] +Table "public"."home_media_banner" { + "id" uuid [pk, not null] + "media_id" uuid [not null, ref: > "public"."medias"."id"] + "created_by" uuid [not null, ref: > "public"."users"."id"] + "priority" smallint [unique] + "start_show" timestamp [not null] + "end_show" timestamp + "created_at" timestamp [not null] +} + +Table "public"."users" { + "id" uuid [pk, not null, ref: - "public"."user_preferences"."user_id"] + "email" varchar(500) [unique, not null] + "password" varchar(255) + "username" varchar(28) [unique, not null] + "fullname" varchar(32) [not null] + "avatar" varchar(255) + "bio" text + "datebirth" date + "role" user_role [not null] + "sex" user_sex [not null] + "phone_number" varchar(15) + "address" address + "country" uuid + "auth_provider" varchar(64) + "provider_token" varchar(255) + "created_at" timestamp [not null, default: `now()`] + "updated_at" timestamp [not null] + "deleted_at" timestamp + + Indexes { + username [unique, name: "index_2_3"] + email [unique, name: "index_3"] } } -Table watch_histories { - id String [pk] - episode episodes [not null] - episodeId String [not null] - user users [not null] - userId String [not null] - session user_sessions [not null] - sessionId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."media_studios" { + "media_id" uuid [not null, ref: > "public"."medias"."studios"] + "producer_id" uuid [not null, ref: > "public"."producers"."id"] + + Indexes { + (media_id, producer_id) [pk] + } } -Table movie_reviews { - id String [pk] - media medias [not null] - mediaId String [not null] - rating Int [not null] - title String [not null] - text String [not null] - reaction MediaReviewReaction [not null] - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."media_licencors" { + "media_id" uuid [not null, ref: > "public"."medias"."licensors"] + "producer_id" uuid [not null, ref: > "public"."producers"."id"] + + Indexes { + (media_id, producer_id) [pk] + } } -Table comments { - id String [pk] - episode episodes [not null] - episodeId String [not null] - text String [not null] - isParent Boolean [not null, default: false] - parent comments - parentId String - user users [not null] - userId String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - replies comments [not null] - likes comment_likes [not null] +Table "public"."comment_reports" { + "id" uuid [unique, not null] + "reporter_id" uuid [not null, ref: > "public"."users"."id"] + "comment_id" uuid [not null, ref: > "public"."comments"."id"] + "title" varchar(115) [not null] + "status" status_submission [not null] + "description" text + "reported_at" timestamp [not null] + "closed_at" timestamp } -Table comment_likes { - id String [pk] - comment comments [not null] - commentId String [not null] - user users [not null] - userLiked String [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."genres" { + "id" uuid [pk, not null] + "mal_id" smallint + "type" varchar(16) [not null] + "name" varchar(32) [not null] + "url" varchar(155) } -Table comment_reports { - id String [pk] - reporter users [not null] - userReporter String [not null] - commentReported String [not null] - isSupervisorReport Boolean [not null, default: false] - reason ReportReason [not null] - status ReportStatus [not null] - description String [not null] - approver users - approvedBy String - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."collections" { + "id" uuid [pk, not null] + "name" varchar(64) [not null] + "cover_url" varchar(255) [not null] + "privacy_level" privacy_level [not null] + "created_at" timestamp [not null] + "updated_at" timestamp [not null] } -Table languages { - id String [pk] - name String [not null] - code String [unique, not null] - countryFlag String [not null] - fileLocation String [not null] - creator users [not null] - craetedBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - user_used user_preferences [not null] +Table "public"."voice_actors" { + "id" uuid [pk, not null, ref: > "public"."media_characters"."voice_actor"] + "language" varchar(115) + "actor_staff" uuid [ref: > "public"."staff"."id"] } -Table email_system_accounts { - id String [pk] - name String [unique, not null] - host String [not null] - port Int [not null] - secure Boolean [not null] - email String [unique, not null] - username String [unique, not null] - password String [not null] - purpose EmailPorpose [not null] - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."video_submissions" { + "id" uuid [pk, not null] + "video_id" uuid [not null] + "created_by" uuid [not null, ref: > "public"."users"."id"] + "reviewed_by" uuid [ref: > "public"."users"."id"] + "status" status_submission [not null, default: 'pending'] + "reviewed_at" timestamp + "reason" text + "created_at" timestamp [not null, default: `now()`] } -Table email_system_histories { - id String [pk] - purpose EmailPorpose [not null] - fromEmail String [not null] - toEmail String [not null] - user users [not null] - userRelated String [not null] - title String [not null] - htmlContent String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."media_genres" { + "media_id" uuid [unique, not null, ref: > "public"."medias"."genres"] + "genre_id" uuid [pk, not null, ref: > "public"."genres"."id"] + + Indexes { + (media_id, genre_id) [unique, name: "index_1_4"] + } + + Note: 'composite primary key = media_id + genre_id' } -Table hero_banner { - id String [pk] - orderPriority Int [unique] - mediaId String [not null] - media medias [not null] - imageUrl String - startDate DateTime [not null] - endDate DateTime [not null] - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] - creatorId String [not null] - createdBy users [not null] +Table "public"."video_services" { + "id" uuid [pk, not null, ref: - "public"."video_service_submissions"."video_service_id"] + "name" varchar(155) [not null] + "resolution" smallint [not null] + "domain" varchar(255) [not null] + "image_url" varchar(255) + "hex_color" varchar(10) + "endpoint_video" varchar(255) [not null] + "endpoint_short" varchar(255) + "endpoint_image" varchar(255) + "endpoint_download" varchar(255) + "created_by" uuid [not null] + "deleted_at" timestamp + "updated_at" timestamp [not null] + "created_at" timestamp [not null] + + Indexes { + (name, resolution) [unique, name: "idx_video_services_name_resolution"] + } } -Table system_preferences { - id String [pk] - key String [unique, not null] - value String [not null] - description String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."media_submissions" { + "id" uuid [pk, not null] + "media_id" uuid [not null] + "created_by" uuid [not null] + "status" status_submission [not null] + "reviewed_by" uuid + "reviewed_at" timestamp + "reason" text + "created_at" timestamp [not null, default: `now()`] } -Table system_notifications { - id String [pk] - type TypeSystemNotification [not null] - componentName String - popupImage String - titleToast String - contentToast String - creator users [not null] - createdBy String [not null] - deletedAt DateTime - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."video_service_submissions" { + "id" uuid [pk, not null] + "video_service_id" uuid [not null] + "created_by" uuid [not null] + "status" status_submission [not null, default: 'pending'] + "reviewed_by" uuid + "reviewed_at" timestamp + "reason" text + "created_at" timestamp [not null, default: `now()`] } -Table system_logs { - id String [pk] - title String [not null] - notes String [not null] - user users - relatedUser String - createdAt DateTime [default: `now()`, not null] - updatedAt DateTime [default: `now()`, not null] +Table "public"."media_trailers" { + "id" uuid [pk, not null, ref: - "public"."medias"."trailers"] + "url" varchar(255) + "embed_url" varchar(255) + "small_image_url" varchar(255) + "medium_image_url" varchar(255) + "large_image_url" varchar(255) + "maximum_image_url" varchar(255) } -Table MediaGenres { - genresId String [ref: > genres.id] - mediasId String [ref: > medias.id] +Table "public"."media_types" { + "id" uuid [pk, not null] + "name" varchar(18) [not null] } -Table MediaStudios { - studiosId String [ref: > studios.id] - mediasId String [ref: > medias.id] +Table "public"."user_follows" { + "follower_id" uuid [unique, not null, ref: > "public"."users"."id"] + "following_id" uuid [not null, ref: > "public"."users"."id"] + "followed_at" timestamp [not null] + + Indexes { + (following_id, follower_id) [unique, name: "index_1_5"] + } + + checks { + `follower_id <> following_id` + } } -Table MediaCharacters { - charactersId String [ref: > characters.id] - mediasId String [ref: > medias.id] +Table "public"."media_themes" { + "media_id" uuid [not null, ref: > "public"."medias"."themes"] + "genre_id" uuid [not null, ref: > "public"."genres"."id"] + + Indexes { + (media_id, genre_id) [pk] + } } -Table CollectionMedia { - incollectionsId String [ref: > CollectionMedia.id] - media_savedId String [ref: > CollectionMedia.id] +Table "public"."comment_likes" { + "user_id" uuid [unique, not null, ref: > "public"."medias"."id"] + "comment_id" uuid [not null, ref: > "public"."comments"."id"] + "type" like_type [not null] + "created_at" timestamp [not null] + + Indexes { + (comment_id, user_id) [unique, name: "index_1_6"] + } } - -Table UserFavoriteGenres { - user_favourite_genresId String [ref: > user_preferences.id] - favoritegenresId String [ref: > genres.id] -} - -Table UserSelectedSharingCollention { - allowed_collectionsId String [ref: > collections.id] - usersallowedId String [ref: > users.id] -} - -Enum MediaType { - TV - ONA - OVA - Movie - Special - Music -} - -Enum Country { - JP - EN - ID - KR -} - -Enum CharacterRole { - Main - Supporting -} - -Enum MediaOperation { - create - update - delete -} - -Enum UserGender { - male - female -} - -Enum AdultFiltering { - hide - show - explicit -} - -Enum AdultAlert { - hide - show -} - -Enum VideoQuality { - Q2160 - Q1440 - Q1080 - Q720 - Q480 - Q360 - Q240 - Q144 -} - -Enum UserNotificationState { - info - warning - danger -} - -Enum ReportStatus { - pending - resolved - rejected -} - -Enum ReportReason { - sexualize - violent - explicit - hateful - political - racist - spam - other -} - -Enum AccessStatus { - private - selected - protected - public -} - -Enum AccessScope { - viewer - editor -} - -Enum MediaReviewReaction { - angry - sad - awesome - happy - sleepy - annoyed - disgusting - disappointed -} - -Enum EmailPorpose { - forgot_password - account_activation - account_notification - subscribtion -} - -Enum TypeSystemNotification { - component - popup - toast -} - -Ref: medias.uploadedBy > users.id - -Ref: media_logs.proposedBy > users.id - -Ref: media_logs.approvedBy > users.id - -Ref: media_logs.mediaId > medias.id - -Ref: genres.createdBy > users.id - -Ref: studios.createdBy > users.id - -Ref: characters.creatorId > users.id - -Ref: voice_actors.creatorId > users.id - -Ref: lang_va_char.vaId > voice_actors.id - -Ref: lang_va_char.charId > characters.id - -Ref: lang_va_char.creatorId > users.id - -Ref: episodes.mediaId > medias.id - -Ref: episodes.uploadedBy > users.id - -Ref: episode_likes.userId > users.id - -Ref: episode_likes.sessionId > user_sessions.id - -Ref: episode_likes.episodeId > episodes.id - -Ref: videos.episodeId > episodes.id - -Ref: videos.serviceId > video_services.id - -Ref: videos.uploadedBy > users.id - -Ref: video_services.createdBy > users.id - -Ref: user_preferences.userId - users.id - -Ref: user_preferences.langPreference > languages.code - -Ref: user_preferences.serviceDefaultId > video_services.id - -Ref: user_roles.createdBy > users.id - -Ref: user_role_assignments.userId > users.id - -Ref: user_role_assignments.roleId > user_roles.id - -Ref: user_notifications.userId > users.id - -Ref: user_sessions.userId > users.id - -Ref: user_logs.userId > users.id - -Ref: user_logs.sessionId > user_sessions.id - -Ref: collections.ownerId > users.id - -Ref: CollectionMedia.collectionId > collections.id - -Ref: CollectionMedia.mediaId > medias.id - -Ref: watch_histories.id > episodes.id - -Ref: watch_histories.userId > users.id - -Ref: watch_histories.sessionId > user_sessions.id - -Ref: movie_reviews.mediaId > medias.id - -Ref: movie_reviews.createdBy > users.id - -Ref: comments.episodeId > episodes.id - -Ref: comments.parentId - comments.id - -Ref: comments.userId > users.id - -Ref: comment_likes.commentId > comments.id - -Ref: comment_likes.userLiked > users.id - -Ref: comment_reports.userReporter > users.id - -Ref: comment_reports.approvedBy > users.id - -Ref: languages.craetedBy > users.id - -Ref: email_system_accounts.createdBy > users.id - -Ref: email_system_histories.userRelated > users.id - -Ref: hero_banner.mediaId > medias.id - -Ref: hero_banner.creatorId > users.id - -Ref: system_notifications.createdBy > users.id - -Ref: system_logs.relatedUser > users.id \ No newline at end of file From cc4bb95fcd7d270525f660e2fb683623fc389f22 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 5 May 2026 21:00:00 +0700 Subject: [PATCH 10/42] =?UTF-8?q?=F0=9F=94=A5=20chore:=20remove=20structur?= =?UTF-8?q?e.example.rmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structure.example.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 structure.example.md diff --git a/structure.example.md b/structure.example.md deleted file mode 100644 index b2f7c0a..0000000 --- a/structure.example.md +++ /dev/null @@ -1,16 +0,0 @@ -src/ -└── modules/ -└── movie/ -├── controller/ -│ ├── createMovie.controller.ts -│ ├── getAllMovies.controller.ts -│ ├── getSimilarByGenre.controller.ts -├── services/ -│ ├── createMovie.service.ts -│ ├── getAllMovies.service.ts -│ ├── getSimilarByGenre.service.ts -├── movie.model.ts -├── movie.repository.ts -├── movie.schema.ts -├── movie.types.ts -└── index.ts From 2fa48123a02d21a3e3b090c7cb52b82eb2041a7e Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Wed, 6 May 2026 21:00:00 +0700 Subject: [PATCH 11/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20user=5Fsessi?= =?UTF-8?q?on=20table=20to=20database=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 785 +++++++++++++++++++++++++++----------------- 1 file changed, 490 insertions(+), 295 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 5acd76b..91485ba 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-15T01:29:39.850Z", + "updatedAt": "2026-05-15T03:19:18.427Z", "databaseType": "postgresql", "tables": [ { @@ -463,8 +463,8 @@ "id": "37", "name": "medias", "schema": "public", - "x": -335, - "y": -337.5, + "x": -338.2943640690703, + "y": -279.84862879126985, "fields": [ { "id": "38", @@ -3273,6 +3273,18 @@ }, { "id": "262", + "name": "verified_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778815129265 + }, + { + "id": "263", "name": "updated_at", "type": { "id": "timestamp", @@ -3284,7 +3296,7 @@ "createdAt": 1778517127447 }, { - "id": "263", + "id": "264", "name": "deleted_at", "type": { "id": "timestamp", @@ -3298,7 +3310,7 @@ ], "indexes": [ { - "id": "264", + "id": "265", "name": "", "fieldIds": [ "246" @@ -3308,7 +3320,7 @@ "createdAt": 1778390635628 }, { - "id": "265", + "id": "266", "name": "index_2", "fieldIds": [ "249" @@ -3317,7 +3329,7 @@ "createdAt": 1778401234711 }, { - "id": "266", + "id": "267", "name": "index_3", "fieldIds": [ "247" @@ -3337,14 +3349,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "267", + "id": "268", "name": "media_studios", "schema": "public", "x": 199.29817359050787, "y": 347.7468004324893, "fields": [ { - "id": "268", + "id": "269", "name": "media_id", "type": { "id": "uuid", @@ -3356,7 +3368,7 @@ "createdAt": 1777360514222 }, { - "id": "269", + "id": "270", "name": "producer_id", "type": { "id": "uuid", @@ -3370,12 +3382,12 @@ ], "indexes": [ { - "id": "270", + "id": "271", "name": "", "unique": true, "fieldIds": [ - "268", - "269" + "269", + "270" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -3388,14 +3400,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "271", + "id": "272", "name": "media_licencors", "schema": "public", "x": 196.51843134292955, "y": 207.07984381762645, "fields": [ { - "id": "272", + "id": "273", "name": "media_id", "type": { "id": "uuid", @@ -3407,7 +3419,7 @@ "createdAt": 1777360331507 }, { - "id": "273", + "id": "274", "name": "producer_id", "type": { "id": "uuid", @@ -3421,12 +3433,12 @@ ], "indexes": [ { - "id": "274", + "id": "275", "name": "", "unique": true, "fieldIds": [ - "272", - "273" + "273", + "274" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3439,13 +3451,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "275", + "id": "276", "name": "comment_reports", "x": -1032.5934799775514, "y": -655.2659179217417, "fields": [ { - "id": "276", + "id": "277", "name": "id", "type": { "id": "uuid", @@ -3457,7 +3469,7 @@ "createdAt": 1778777460892 }, { - "id": "277", + "id": "278", "name": "reporter_id", "type": { "id": "uuid", @@ -3469,7 +3481,7 @@ "createdAt": 1778777475869 }, { - "id": "278", + "id": "279", "name": "comment_id", "type": { "id": "uuid", @@ -3481,7 +3493,7 @@ "createdAt": 1778777483534 }, { - "id": "279", + "id": "280", "name": "title", "type": { "id": "varchar", @@ -3494,7 +3506,7 @@ "characterMaximumLength": "115" }, { - "id": "280", + "id": "281", "name": "status", "type": { "id": "status_submission", @@ -3506,7 +3518,7 @@ "createdAt": 1778777836090 }, { - "id": "281", + "id": "282", "name": "description", "type": { "id": "text", @@ -3518,7 +3530,7 @@ "createdAt": 1778777519944 }, { - "id": "282", + "id": "283", "name": "reported_at", "type": { "id": "timestamp", @@ -3530,7 +3542,7 @@ "createdAt": 1778777537682 }, { - "id": "283", + "id": "284", "name": "closed_at", "type": { "id": "timestamp", @@ -3551,14 +3563,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "284", + "id": "285", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 289.93770102274635, "fields": [ { - "id": "285", + "id": "286", "name": "id", "type": { "id": "uuid", @@ -3570,7 +3582,7 @@ "createdAt": 1777282589094 }, { - "id": "286", + "id": "287", "name": "mal_id", "type": { "id": "smallint", @@ -3582,7 +3594,7 @@ "createdAt": 1777282589094 }, { - "id": "287", + "id": "288", "name": "type", "type": { "id": "varchar", @@ -3595,7 +3607,7 @@ "characterMaximumLength": "16" }, { - "id": "288", + "id": "289", "name": "name", "type": { "id": "varchar", @@ -3608,7 +3620,7 @@ "characterMaximumLength": "32" }, { - "id": "289", + "id": "290", "name": "url", "type": { "id": "varchar", @@ -3623,11 +3635,11 @@ ], "indexes": [ { - "id": "290", + "id": "291", "name": "", "unique": true, "fieldIds": [ - "285" + "286" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -3640,13 +3652,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "291", + "id": "292", "name": "collections", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "292", + "id": "293", "name": "id", "type": { "id": "uuid", @@ -3658,7 +3670,7 @@ "createdAt": 1778733394970 }, { - "id": "293", + "id": "294", "name": "name", "type": { "id": "varchar", @@ -3672,7 +3684,7 @@ "default": null }, { - "id": "294", + "id": "295", "name": "cover_url", "type": { "id": "varchar", @@ -3685,7 +3697,7 @@ "characterMaximumLength": "255" }, { - "id": "295", + "id": "296", "name": "privacy_level", "type": { "id": "privacy_level", @@ -3697,7 +3709,7 @@ "createdAt": 1778766528943 }, { - "id": "296", + "id": "297", "name": "created_at", "type": { "id": "timestamp", @@ -3709,7 +3721,7 @@ "createdAt": 1778733453130 }, { - "id": "297", + "id": "298", "name": "updated_at", "type": { "id": "timestamp", @@ -3723,10 +3735,10 @@ ], "indexes": [ { - "id": "298", + "id": "299", "name": "", "fieldIds": [ - "292" + "293" ], "unique": true, "isPrimaryKey": true, @@ -3741,14 +3753,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "299", + "id": "300", "name": "voice_actors", "schema": "public", "x": -1038.3471892955995, "y": 525.1907371208936, "fields": [ { - "id": "300", + "id": "301", "name": "id", "type": { "id": "uuid", @@ -3760,7 +3772,7 @@ "createdAt": 1777282589093 }, { - "id": "301", + "id": "302", "name": "language", "type": { "id": "varchar", @@ -3773,7 +3785,7 @@ "characterMaximumLength": "115" }, { - "id": "302", + "id": "303", "name": "actor_staff", "type": { "id": "uuid", @@ -3787,11 +3799,11 @@ ], "indexes": [ { - "id": "303", + "id": "304", "name": "", "unique": true, "fieldIds": [ - "300" + "301" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3804,13 +3816,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "304", + "id": "305", "name": "video_submissions", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "305", + "id": "306", "name": "id", "type": { "id": "uuid", @@ -3822,7 +3834,7 @@ "createdAt": 1777362610195 }, { - "id": "306", + "id": "307", "name": "video_id", "type": { "id": "uuid", @@ -3834,7 +3846,7 @@ "createdAt": 1777362624424 }, { - "id": "307", + "id": "308", "name": "created_by", "type": { "id": "uuid", @@ -3847,7 +3859,7 @@ "comments": "" }, { - "id": "308", + "id": "309", "name": "reviewed_by", "type": { "id": "uuid", @@ -3859,7 +3871,7 @@ "createdAt": 1777362758238 }, { - "id": "309", + "id": "310", "name": "status", "type": { "id": "status_submission", @@ -3873,7 +3885,7 @@ "comments": "" }, { - "id": "310", + "id": "311", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3885,7 +3897,7 @@ "createdAt": 1777363627973 }, { - "id": "311", + "id": "312", "name": "reason", "type": { "id": "text", @@ -3897,7 +3909,7 @@ "createdAt": 1777363674757 }, { - "id": "312", + "id": "313", "name": "created_at", "type": { "id": "timestamp", @@ -3912,11 +3924,11 @@ ], "indexes": [ { - "id": "313", + "id": "314", "name": "", "unique": true, "fieldIds": [ - "305" + "306" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3931,14 +3943,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "314", + "id": "315", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "315", + "id": "316", "name": "media_id", "type": { "id": "uuid", @@ -3950,7 +3962,7 @@ "createdAt": 1777283473368 }, { - "id": "316", + "id": "317", "name": "genre_id", "type": { "id": "uuid", @@ -3964,21 +3976,21 @@ ], "indexes": [ { - "id": "317", + "id": "318", "name": "", "unique": true, "fieldIds": [ - "316" + "317" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "318", + "id": "319", "name": "index_1", "fieldIds": [ - "315", - "316" + "316", + "317" ], "unique": true, "createdAt": 1778570545534 @@ -3993,14 +4005,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "319", + "id": "320", "name": "video_services", "schema": "public", "x": 76.84794405482987, "y": 1174.3220047083446, "fields": [ { - "id": "320", + "id": "321", "name": "id", "type": { "id": "uuid", @@ -4012,7 +4024,7 @@ "createdAt": 1777282589094 }, { - "id": "321", + "id": "322", "name": "name", "type": { "id": "varchar", @@ -4025,7 +4037,7 @@ "characterMaximumLength": "155" }, { - "id": "322", + "id": "323", "name": "resolution", "type": { "id": "smallint", @@ -4037,7 +4049,7 @@ "createdAt": 1777282589094 }, { - "id": "323", + "id": "324", "name": "domain", "type": { "id": "varchar", @@ -4050,7 +4062,7 @@ "characterMaximumLength": "255" }, { - "id": "324", + "id": "325", "name": "image_url", "type": { "id": "varchar", @@ -4063,7 +4075,7 @@ "characterMaximumLength": "255" }, { - "id": "325", + "id": "326", "name": "hex_color", "type": { "id": "varchar", @@ -4076,7 +4088,7 @@ "characterMaximumLength": "10" }, { - "id": "326", + "id": "327", "name": "endpoint_video", "type": { "id": "varchar", @@ -4089,7 +4101,7 @@ "characterMaximumLength": "255" }, { - "id": "327", + "id": "328", "name": "endpoint_short", "type": { "id": "varchar", @@ -4102,7 +4114,7 @@ "characterMaximumLength": "255" }, { - "id": "328", + "id": "329", "name": "endpoint_image", "type": { "id": "varchar", @@ -4115,7 +4127,7 @@ "characterMaximumLength": "255" }, { - "id": "329", + "id": "330", "name": "endpoint_download", "type": { "id": "varchar", @@ -4128,7 +4140,7 @@ "characterMaximumLength": "255" }, { - "id": "330", + "id": "331", "name": "created_by", "type": { "id": "uuid", @@ -4140,7 +4152,7 @@ "createdAt": 1777282589094 }, { - "id": "331", + "id": "332", "name": "deleted_at", "type": { "id": "timestamp", @@ -4152,7 +4164,7 @@ "createdAt": 1777282589094 }, { - "id": "332", + "id": "333", "name": "updated_at", "type": { "id": "timestamp", @@ -4164,7 +4176,7 @@ "createdAt": 1777282589094 }, { - "id": "333", + "id": "334", "name": "created_at", "type": { "id": "timestamp", @@ -4178,22 +4190,22 @@ ], "indexes": [ { - "id": "334", + "id": "335", "name": "", "unique": true, "fieldIds": [ - "320" + "321" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "335", + "id": "336", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "321", - "322" + "322", + "323" ], "createdAt": 1777282589094 } @@ -4207,14 +4219,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "336", + "id": "337", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "337", + "id": "338", "name": "id", "type": { "id": "uuid", @@ -4226,7 +4238,7 @@ "createdAt": 1777362610195 }, { - "id": "338", + "id": "339", "name": "media_id", "type": { "id": "uuid", @@ -4238,7 +4250,7 @@ "createdAt": 1777362624424 }, { - "id": "339", + "id": "340", "name": "created_by", "type": { "id": "uuid", @@ -4251,7 +4263,7 @@ "comments": "" }, { - "id": "340", + "id": "341", "name": "status", "type": { "id": "status_submission", @@ -4264,7 +4276,7 @@ "comments": "" }, { - "id": "341", + "id": "342", "name": "reviewed_by", "type": { "id": "uuid", @@ -4276,7 +4288,7 @@ "createdAt": 1777362758238 }, { - "id": "342", + "id": "343", "name": "reviewed_at", "type": { "id": "timestamp", @@ -4288,7 +4300,7 @@ "createdAt": 1777363627973 }, { - "id": "343", + "id": "344", "name": "reason", "type": { "id": "text", @@ -4300,7 +4312,7 @@ "createdAt": 1777363674757 }, { - "id": "344", + "id": "345", "name": "created_at", "type": { "id": "timestamp", @@ -4315,11 +4327,11 @@ ], "indexes": [ { - "id": "345", + "id": "346", "name": "", "unique": true, "fieldIds": [ - "337" + "338" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -4332,14 +4344,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "346", + "id": "347", "name": "video_service_submissions", "schema": "public", - "x": -384.3622441138489, - "y": 1244.8737470115275, + "x": -371.1847878375677, + "y": 1294.289208047582, "fields": [ { - "id": "347", + "id": "348", "name": "id", "type": { "id": "uuid", @@ -4351,7 +4363,7 @@ "createdAt": 1777362610195 }, { - "id": "348", + "id": "349", "name": "video_service_id", "type": { "id": "uuid", @@ -4363,7 +4375,7 @@ "createdAt": 1777362624424 }, { - "id": "349", + "id": "350", "name": "created_by", "type": { "id": "uuid", @@ -4376,7 +4388,7 @@ "comments": "" }, { - "id": "350", + "id": "351", "name": "status", "type": { "id": "status_submission", @@ -4390,7 +4402,7 @@ "comments": "" }, { - "id": "351", + "id": "352", "name": "reviewed_by", "type": { "id": "uuid", @@ -4402,7 +4414,7 @@ "createdAt": 1777362758238 }, { - "id": "352", + "id": "353", "name": "reviewed_at", "type": { "id": "timestamp", @@ -4414,7 +4426,7 @@ "createdAt": 1777363627973 }, { - "id": "353", + "id": "354", "name": "reason", "type": { "id": "text", @@ -4426,7 +4438,7 @@ "createdAt": 1777363674757 }, { - "id": "354", + "id": "355", "name": "created_at", "type": { "id": "timestamp", @@ -4441,11 +4453,11 @@ ], "indexes": [ { - "id": "355", + "id": "356", "name": "", "unique": true, "fieldIds": [ - "347" + "348" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -4459,14 +4471,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "356", + "id": "357", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "357", + "id": "358", "name": "id", "type": { "id": "uuid", @@ -4478,7 +4490,7 @@ "createdAt": 1777282589092 }, { - "id": "358", + "id": "359", "name": "url", "type": { "id": "varchar", @@ -4491,7 +4503,7 @@ "characterMaximumLength": "255" }, { - "id": "359", + "id": "360", "name": "embed_url", "type": { "id": "varchar", @@ -4504,7 +4516,7 @@ "characterMaximumLength": "255" }, { - "id": "360", + "id": "361", "name": "small_image_url", "type": { "id": "varchar", @@ -4517,7 +4529,7 @@ "characterMaximumLength": "255" }, { - "id": "361", + "id": "362", "name": "medium_image_url", "type": { "id": "varchar", @@ -4530,7 +4542,7 @@ "characterMaximumLength": "255" }, { - "id": "362", + "id": "363", "name": "large_image_url", "type": { "id": "varchar", @@ -4543,7 +4555,7 @@ "characterMaximumLength": "255" }, { - "id": "363", + "id": "364", "name": "maximum_image_url", "type": { "id": "varchar", @@ -4558,11 +4570,11 @@ ], "indexes": [ { - "id": "364", + "id": "365", "name": "", "unique": true, "fieldIds": [ - "357" + "358" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4575,14 +4587,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "365", + "id": "366", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "366", + "id": "367", "name": "id", "type": { "id": "uuid", @@ -4594,7 +4606,7 @@ "createdAt": 1777282589093 }, { - "id": "367", + "id": "368", "name": "name", "type": { "id": "varchar", @@ -4609,11 +4621,11 @@ ], "indexes": [ { - "id": "368", + "id": "369", "name": "", "unique": true, "fieldIds": [ - "366" + "367" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4626,13 +4638,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "369", + "id": "370", "name": "user_follows", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "370", + "id": "371", "name": "follower_id", "type": { "id": "uuid", @@ -4644,7 +4656,7 @@ "createdAt": 1778401701334 }, { - "id": "371", + "id": "372", "name": "following_id", "type": { "id": "uuid", @@ -4656,7 +4668,7 @@ "createdAt": 1778401722682 }, { - "id": "372", + "id": "373", "name": "followed_at", "type": { "id": "timestamp", @@ -4670,11 +4682,11 @@ ], "indexes": [ { - "id": "373", + "id": "374", "name": "index_1", "fieldIds": [ - "371", - "370" + "372", + "371" ], "unique": true, "createdAt": 1778401874053 @@ -4696,14 +4708,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "374", + "id": "375", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "375", + "id": "376", "name": "media_id", "type": { "id": "uuid", @@ -4715,7 +4727,7 @@ "createdAt": 1777295294621 }, { - "id": "376", + "id": "377", "name": "genre_id", "type": { "id": "uuid", @@ -4729,12 +4741,12 @@ ], "indexes": [ { - "id": "377", + "id": "378", "name": "", "unique": true, "fieldIds": [ - "375", - "376" + "376", + "377" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -4748,13 +4760,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "378", + "id": "379", "name": "comment_likes", "x": -1435.9285690968027, "y": 209.11179406446968, "fields": [ { - "id": "379", + "id": "380", "name": "user_id", "type": { "id": "uuid", @@ -4766,7 +4778,7 @@ "createdAt": 1778808096764 }, { - "id": "380", + "id": "381", "name": "comment_id", "type": { "id": "uuid", @@ -4778,7 +4790,7 @@ "createdAt": 1778808185625 }, { - "id": "381", + "id": "382", "name": "type", "type": { "id": "like_type", @@ -4790,7 +4802,7 @@ "createdAt": 1778808192863 }, { - "id": "382", + "id": "383", "name": "created_at", "type": { "id": "timestamp", @@ -4804,11 +4816,11 @@ ], "indexes": [ { - "id": "383", + "id": "384", "name": "index_1", "fieldIds": [ - "380", - "379" + "381", + "380" ], "unique": true, "createdAt": 1778808299354 @@ -4819,17 +4831,175 @@ "isView": false, "order": 43, "schema": "public" + }, + { + "id": "385", + "name": "user_sessions", + "x": -1381.9054198604924, + "y": -1329.3058623634636, + "fields": [ + { + "id": "386", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778814742487 + }, + { + "id": "387", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778814761364 + }, + { + "id": "388", + "name": "device_type", + "type": { + "id": "device_type", + "name": "device_type" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778814807191 + }, + { + "id": "389", + "name": "os_type", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814771991 + }, + { + "id": "390", + "name": "os_version", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814781826 + }, + { + "id": "391", + "name": "browser_name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814787821 + }, + { + "id": "392", + "name": "browser_version", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814794245 + }, + { + "id": "393", + "name": "ip_login", + "type": { + "id": "inet", + "name": "inet" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778814801981 + }, + { + "id": "394", + "name": "last_activity_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814857539 + }, + { + "id": "395", + "name": "login_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778814816604 + }, + { + "id": "396", + "name": "logout_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778814877334 + } + ], + "indexes": [ + { + "id": "397", + "name": "", + "fieldIds": [ + "386" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778814742487 + } + ], + "color": "#4dee8a", + "createdAt": 1778814742487, + "isView": false, + "order": 44, + "schema": "public", + "expanded": true } ], "relationships": [ { - "id": "384", + "id": "398", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "291", + "sourceTableId": "292", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "292", + "sourceFieldId": "293", "targetFieldId": "138", "sourceCardinality": "one", "targetCardinality": "many", @@ -4837,7 +5007,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "385", + "id": "399", "name": "collection_members_invited_by_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -4851,7 +5021,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "386", + "id": "400", "name": "collection_members_user_id_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -4865,7 +5035,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "388", + "id": "402", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", "sourceTableId": "208", @@ -4879,7 +5049,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "389", + "id": "403", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -4893,35 +5063,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "391", + "id": "405", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", "sourceTableId": "208", "targetSchema": "public", - "targetTableId": "275", + "targetTableId": "276", "sourceFieldId": "209", - "targetFieldId": "278", + "targetFieldId": "279", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777586444, "diagramId": "yqwsqwccoj6v" }, { - "id": "392", + "id": "406", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "275", + "targetTableId": "276", "sourceFieldId": "246", - "targetFieldId": "277", + "targetFieldId": "278", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777570446, "diagramId": "yqwsqwccoj6v" }, { - "id": "393", + "id": "407", "name": "comments_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -4935,7 +5105,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "394", + "id": "408", "name": "comments_user_id_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -4949,7 +5119,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "395", + "id": "409", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4963,7 +5133,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "396", + "id": "410", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -4977,13 +5147,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "397", + "id": "411", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "284", + "sourceTableId": "285", "targetSchema": "public", "targetTableId": "197", - "sourceFieldId": "285", + "sourceFieldId": "286", "targetFieldId": "199", "sourceCardinality": "one", "targetCardinality": "many", @@ -4991,7 +5161,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "398", + "id": "412", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5005,21 +5175,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "399", + "id": "413", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "284", + "sourceTableId": "285", "targetSchema": "public", - "targetTableId": "374", - "sourceFieldId": "285", - "targetFieldId": "376", + "targetTableId": "375", + "sourceFieldId": "286", + "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "400", + "id": "414", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5033,7 +5203,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "401", + "id": "415", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5047,7 +5217,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "402", + "id": "416", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "125", @@ -5061,21 +5231,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "403", + "id": "417", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "299", + "targetTableId": "300", "sourceFieldId": "129", - "targetFieldId": "300", + "targetFieldId": "301", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "404", + "id": "418", "name": "media_collections_added_by_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5089,13 +5259,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "405", + "id": "419", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "291", + "sourceTableId": "292", "targetSchema": "public", "targetTableId": "202", - "sourceFieldId": "292", + "sourceFieldId": "293", "targetFieldId": "203", "sourceCardinality": "one", "targetCardinality": "many", @@ -5103,13 +5273,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "406", + "id": "420", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "284", + "sourceTableId": "285", "targetSchema": "public", "targetTableId": "152", - "sourceFieldId": "285", + "sourceFieldId": "286", "targetFieldId": "154", "sourceCardinality": "one", "targetCardinality": "many", @@ -5117,7 +5287,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "407", + "id": "421", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5131,7 +5301,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "408", + "id": "422", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5145,7 +5315,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "409", + "id": "423", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "156", @@ -5159,35 +5329,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "410", + "id": "424", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "284", + "sourceTableId": "285", "targetSchema": "public", - "targetTableId": "314", - "sourceFieldId": "285", - "targetFieldId": "316", + "targetTableId": "315", + "sourceFieldId": "286", + "targetFieldId": "317", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "411", + "id": "425", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "314", + "targetTableId": "315", "sourceFieldId": "68", - "targetFieldId": "315", + "targetFieldId": "316", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "412", + "id": "426", "name": "media_producers_producer_id_fk", "sourceSchema": "public", "sourceTableId": "166", @@ -5201,7 +5371,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "413", + "id": "427", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5215,7 +5385,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "414", + "id": "428", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5229,7 +5399,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "415", + "id": "429", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5243,7 +5413,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "416", + "id": "430", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -5257,13 +5427,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "417", + "id": "431", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "336", + "sourceTableId": "337", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "338", + "sourceFieldId": "339", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", @@ -5271,13 +5441,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "418", + "id": "432", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "336", + "sourceTableId": "337", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "338", + "sourceFieldId": "339", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", @@ -5285,13 +5455,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "419", + "id": "433", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "365", + "sourceTableId": "366", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "366", + "sourceFieldId": "367", "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", @@ -5299,7 +5469,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "420", + "id": "434", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5313,7 +5483,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "421", + "id": "435", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5327,7 +5497,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "422", + "id": "436", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5341,7 +5511,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "423", + "id": "437", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5355,7 +5525,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "424", + "id": "438", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5369,7 +5539,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "425", + "id": "439", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5383,21 +5553,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "426", + "id": "440", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "271", + "targetTableId": "272", "sourceFieldId": "66", - "targetFieldId": "272", + "targetFieldId": "273", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "yqwsqwccoj6v" }, { - "id": "427", + "id": "441", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5411,7 +5581,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "428", + "id": "442", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5425,7 +5595,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "429", + "id": "443", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5439,7 +5609,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "430", + "id": "444", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5453,77 +5623,77 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "431", + "id": "445", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "267", + "targetTableId": "268", "sourceFieldId": "67", - "targetFieldId": "268", + "targetFieldId": "269", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "432", + "id": "446", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "374", + "targetTableId": "375", "sourceFieldId": "71", - "targetFieldId": "375", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "433", + "id": "447", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "356", + "targetTableId": "357", "sourceFieldId": "44", - "targetFieldId": "357", + "targetFieldId": "358", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "434", + "id": "448", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "271", + "targetTableId": "272", "sourceFieldId": "167", - "targetFieldId": "273", + "targetFieldId": "274", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "435", + "id": "449", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "267", + "targetTableId": "268", "sourceFieldId": "167", - "targetFieldId": "269", + "targetFieldId": "270", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "436", + "id": "450", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5537,7 +5707,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "437", + "id": "451", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5551,7 +5721,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "438", + "id": "452", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -5565,7 +5735,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "439", + "id": "453", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5579,7 +5749,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "442", + "id": "456", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5593,7 +5763,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "443", + "id": "457", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5607,35 +5777,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "444", + "id": "458", "name": "user_follows_follower_id_fk", "sourceSchema": "public", "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "369", + "targetTableId": "370", "sourceFieldId": "246", - "targetFieldId": "370", + "targetFieldId": "371", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "445", + "id": "459", "name": "user_follows_following_id_fk", "sourceSchema": "public", "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "369", + "targetTableId": "370", "sourceFieldId": "246", - "targetFieldId": "371", + "targetFieldId": "372", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "446", + "id": "460", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5649,7 +5819,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "447", + "id": "461", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", @@ -5663,7 +5833,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "450", + "id": "464", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5677,7 +5847,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "451", + "id": "465", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -5691,7 +5861,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "452", + "id": "466", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5705,7 +5875,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "453", + "id": "467", "name": "users_country_fk", "sourceSchema": "public", "sourceTableId": "245", @@ -5719,55 +5889,55 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "454", + "id": "468", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "346", + "sourceTableId": "347", "targetSchema": "public", - "targetTableId": "319", - "sourceFieldId": "348", - "targetFieldId": "320", + "targetTableId": "320", + "sourceFieldId": "349", + "targetFieldId": "321", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "yqwsqwccoj6v" }, { - "id": "455", + "id": "469", "name": "video_submissions_created_by_fk", "sourceSchema": "public", "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "304", + "targetTableId": "305", "sourceFieldId": "246", - "targetFieldId": "307", + "targetFieldId": "308", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "yqwsqwccoj6v" }, { - "id": "456", + "id": "470", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", "sourceTableId": "245", "targetSchema": "public", - "targetTableId": "304", + "targetTableId": "305", "sourceFieldId": "246", - "targetFieldId": "308", + "targetFieldId": "309", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "yqwsqwccoj6v" }, { - "id": "457", + "id": "471", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "304", + "sourceTableId": "305", "targetSchema": "public", "targetTableId": "92", - "sourceFieldId": "306", + "sourceFieldId": "307", "targetFieldId": "93", "sourceCardinality": "one", "targetCardinality": "one", @@ -5775,27 +5945,27 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "458", + "id": "472", "name": "videos_service_id_video_services_id", "sourceSchema": "public", "sourceTableId": "92", "targetSchema": "public", - "targetTableId": "319", + "targetTableId": "320", "sourceFieldId": "94", - "targetFieldId": "320", + "targetFieldId": "321", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "459", + "id": "473", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "299", + "sourceTableId": "300", "targetSchema": "public", "targetTableId": "226", - "sourceFieldId": "302", + "sourceFieldId": "303", "targetFieldId": "227", "sourceCardinality": "many", "targetCardinality": "one", @@ -5803,37 +5973,50 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "460", + "id": "474", "name": "comment_likes_user_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "378", + "targetTableId": "379", "sourceFieldId": "38", - "targetFieldId": "379", + "targetFieldId": "380", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808338630 }, { - "id": "461", + "id": "475", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", "sourceTableId": "208", "targetSchema": "public", - "targetTableId": "378", + "targetTableId": "379", "sourceFieldId": "209", - "targetFieldId": "380", + "targetFieldId": "381", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916 + }, + { + "id": "476", + "name": "user_sessions_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "245", + "targetSchema": "public", + "targetTableId": "385", + "sourceFieldId": "246", + "targetFieldId": "387", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778815073839 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "462", + "id": "477", "name": "address", "kind": "composite", "values": [], @@ -5866,7 +6049,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "463", + "id": "478", "name": "audit_action", "kind": "enum", "values": [ @@ -5879,7 +6062,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "464", + "id": "479", "name": "collection_access_level", "kind": "enum", "values": [ @@ -5892,7 +6075,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "465", + "id": "480", "name": "privacy_level", "kind": "enum", "values": [ @@ -5904,7 +6087,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "466", + "id": "481", "name": "status_submission", "kind": "enum", "values": [ @@ -5916,7 +6099,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "467", + "id": "482", "name": "user_preference_state", "kind": "enum", "values": [ @@ -5927,7 +6110,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "468", + "id": "483", "name": "user_role", "kind": "enum", "values": [ @@ -5940,7 +6123,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "469", + "id": "484", "name": "user_sex", "kind": "enum", "values": [ @@ -5951,7 +6134,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "470", + "id": "485", "name": "like_type", "kind": "enum", "values": [ @@ -5959,6 +6142,18 @@ "dislike" ], "fields": [] + }, + { + "id": "486", + "name": "device_type", + "kind": "enum", + "values": [ + "mobile", + "tablet", + "desktop", + "unknown" + ], + "fields": [] } ], "notes": [] From 2e81242ca5a0f301f5f18d52a10202fb45cbd078 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Thu, 7 May 2026 21:00:00 +0700 Subject: [PATCH 12/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20update=20DBML=20wi?= =?UTF-8?q?th=20new=20database=20diagram=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/dbml/schema.dbml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/prisma/dbml/schema.dbml b/prisma/dbml/schema.dbml index c33ad74..ac92e80 100644 --- a/prisma/dbml/schema.dbml +++ b/prisma/dbml/schema.dbml @@ -46,6 +46,13 @@ Enum "like_type" { "dislike" } +Enum "device_type" { + "mobile" + "tablet" + "desktop" + "unknown" +} + Table "public"."user_rating_preferences" { "user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"] "rating_id" uuid [not null, ref: > "public"."media_age_ratings"."id"] @@ -362,6 +369,7 @@ Table "public"."users" { "auth_provider" varchar(64) "provider_token" varchar(255) "created_at" timestamp [not null, default: `now()`] + "verified_at" timestamp "updated_at" timestamp [not null] "deleted_at" timestamp @@ -536,3 +544,17 @@ Table "public"."comment_likes" { (comment_id, user_id) [unique, name: "index_1_6"] } } + +Table "public"."user_sessions" { + "id" uuid [pk, not null] + "user_id" uuid [not null, ref: > "public"."users"."id"] + "device_type" device_type [not null] + "os_type" varchar(500) + "os_version" varchar(500) + "browser_name" varchar(500) + "browser_version" varchar(500) + "ip_login" inet [not null] + "last_activity_at" timestamp + "login_at" timestamp [not null] + "logout_at" timestamp +} From ea28ce0d6f774796829cd370167c9053e393fa28 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 8 May 2026 21:00:00 +0700 Subject: [PATCH 13/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20refine=20database?= =?UTF-8?q?=20diagram=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 662 +++++++++++++++++++++++++------------------- 1 file changed, 382 insertions(+), 280 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 91485ba..ede45f7 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-15T03:19:18.427Z", + "updatedAt": "2026-05-15T04:05:13.690Z", "databaseType": "postgresql", "tables": [ { @@ -1801,7 +1801,7 @@ }, { "id": "144", - "name": "system_country", + "name": "countries", "x": -675.4825871206289, "y": -936.5527418709639, "fields": [ @@ -1837,7 +1837,7 @@ "id": "varchar", "name": "varchar" }, - "unique": false, + "unique": true, "nullable": false, "primaryKey": false, "createdAt": 1778401182473, @@ -1850,7 +1850,7 @@ "id": "varchar", "name": "varchar" }, - "unique": false, + "unique": true, "nullable": false, "primaryKey": false, "createdAt": 1778401186425, @@ -2326,7 +2326,7 @@ }, { "id": "186", - "name": "watch_history", + "name": "enable_watch_history", "type": { "id": "boolean", "name": "boolean" @@ -2339,7 +2339,7 @@ }, { "id": "187", - "name": "search_history", + "name": "enable_search_history", "type": { "id": "boolean", "name": "boolean" @@ -2352,7 +2352,7 @@ }, { "id": "188", - "name": "private_account", + "name": "is_private_account", "type": { "id": "boolean", "name": "boolean" @@ -2365,7 +2365,7 @@ }, { "id": "189", - "name": "message_open", + "name": "can_message_me", "type": { "id": "boolean", "name": "boolean" @@ -2378,7 +2378,7 @@ }, { "id": "190", - "name": "birthday_open", + "name": "publish_birthday", "type": { "id": "boolean", "name": "boolean" @@ -2391,7 +2391,7 @@ }, { "id": "191", - "name": "email_open", + "name": "publish_email", "type": { "id": "boolean", "name": "boolean" @@ -2404,7 +2404,7 @@ }, { "id": "192", - "name": "number_open", + "name": "publish_phone_number", "type": { "id": "boolean", "name": "boolean" @@ -2417,7 +2417,20 @@ }, { "id": "193", - "name": "partner_open", + "name": "publish_country", + "type": { + "id": "boolean", + "name": "boolean" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778817885185, + "default": "false" + }, + { + "id": "194", + "name": "publish_partner", "type": { "id": "boolean", "name": "boolean" @@ -2429,8 +2442,8 @@ "default": "true" }, { - "id": "194", - "name": "subscribe_newsletter", + "id": "195", + "name": "subscribe_to_newsletter", "type": { "id": "boolean", "name": "boolean" @@ -2442,8 +2455,8 @@ "default": "true" }, { - "id": "195", - "name": "security_notification", + "id": "196", + "name": "enable_security_alerts", "type": { "id": "boolean", "name": "boolean" @@ -2457,7 +2470,7 @@ ], "indexes": [ { - "id": "196", + "id": "197", "name": "", "fieldIds": [ "183" @@ -2476,13 +2489,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "197", + "id": "198", "name": "user_genre_preferences", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "198", + "id": "199", "name": "user_id", "type": { "id": "uuid", @@ -2494,7 +2507,7 @@ "createdAt": 1778548513047 }, { - "id": "199", + "id": "200", "name": "genre_id", "type": { "id": "uuid", @@ -2506,7 +2519,7 @@ "createdAt": 1778548529915 }, { - "id": "200", + "id": "201", "name": "state", "type": { "id": "user_preference_state", @@ -2520,11 +2533,11 @@ ], "indexes": [ { - "id": "201", + "id": "202", "name": "index_1", "fieldIds": [ - "198", - "199" + "199", + "200" ], "unique": true, "createdAt": 1778548614328 @@ -2538,13 +2551,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "202", + "id": "203", "name": "media_collections", "x": 197.36608531341386, "y": -529.0272597527102, "fields": [ { - "id": "203", + "id": "204", "name": "collection_id", "type": { "id": "uuid", @@ -2556,7 +2569,7 @@ "createdAt": 1778733152986 }, { - "id": "204", + "id": "205", "name": "media_id", "type": { "id": "uuid", @@ -2568,7 +2581,7 @@ "createdAt": 1778733195744 }, { - "id": "205", + "id": "206", "name": "added_by", "type": { "id": "uuid", @@ -2580,7 +2593,7 @@ "createdAt": 1778733169676 }, { - "id": "206", + "id": "207", "name": "added_at", "type": { "id": "bigint", @@ -2594,11 +2607,11 @@ ], "indexes": [ { - "id": "207", + "id": "208", "name": "index_1", "fieldIds": [ - "203", - "204" + "204", + "205" ], "unique": true, "createdAt": 1778733335908 @@ -2612,13 +2625,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "208", + "id": "209", "name": "comments", "x": -1035.4972528190797, "y": -21.831519473281823, "fields": [ { - "id": "209", + "id": "210", "name": "id", "type": { "id": "uuid", @@ -2630,7 +2643,7 @@ "createdAt": 1778772484798 }, { - "id": "210", + "id": "211", "name": "user_id", "type": { "id": "uuid", @@ -2642,7 +2655,7 @@ "createdAt": 1778772536237 }, { - "id": "211", + "id": "212", "name": "episode_id", "type": { "id": "uuid", @@ -2654,7 +2667,7 @@ "createdAt": 1778772542751 }, { - "id": "212", + "id": "213", "name": "content", "type": { "id": "varchar", @@ -2667,7 +2680,7 @@ "characterMaximumLength": "255" }, { - "id": "213", + "id": "214", "name": "created_at", "type": { "id": "timestamp", @@ -2679,7 +2692,7 @@ "createdAt": 1778777149915 }, { - "id": "214", + "id": "215", "name": "updated_at", "type": { "id": "timestamp", @@ -2691,7 +2704,7 @@ "createdAt": 1778777198204 }, { - "id": "215", + "id": "216", "name": "deleted_at", "type": { "id": "timestamp", @@ -2705,10 +2718,10 @@ ], "indexes": [ { - "id": "216", + "id": "217", "name": "", "fieldIds": [ - "209" + "210" ], "unique": true, "isPrimaryKey": true, @@ -2723,13 +2736,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "217", + "id": "218", "name": "user_oauth_credentials", "x": 198.86057563155222, "y": -819.0509320845548, "fields": [ { - "id": "218", + "id": "219", "name": "id", "type": { "id": "uuid", @@ -2741,7 +2754,7 @@ "createdAt": 1778516299633 }, { - "id": "219", + "id": "220", "name": "user_id", "type": { "id": "uuid", @@ -2753,7 +2766,7 @@ "createdAt": 1778516366928 }, { - "id": "220", + "id": "221", "name": "oauth_id", "type": { "id": "uuid", @@ -2765,7 +2778,7 @@ "createdAt": 1778516373206 }, { - "id": "221", + "id": "222", "name": "provider_token", "type": { "id": "varchar", @@ -2777,7 +2790,7 @@ "createdAt": 1778516403942 }, { - "id": "222", + "id": "223", "name": "provider_sub", "type": { "id": "varchar", @@ -2789,7 +2802,7 @@ "createdAt": 1778516761873 }, { - "id": "223", + "id": "224", "name": "last_action", "type": { "id": "timestamp", @@ -2803,21 +2816,21 @@ ], "indexes": [ { - "id": "224", + "id": "225", "name": "", "fieldIds": [ - "218" + "219" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778516299633 }, { - "id": "225", + "id": "226", "name": "index_2", "fieldIds": [ - "220", - "219" + "221", + "220" ], "unique": true, "createdAt": 1778516903425 @@ -2831,14 +2844,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "226", + "id": "227", "name": "staff", "schema": "public", "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "227", + "id": "228", "name": "id", "type": { "id": "uuid", @@ -2850,7 +2863,7 @@ "createdAt": 1777282589093 }, { - "id": "228", + "id": "229", "name": "name", "type": { "id": "varchar", @@ -2863,7 +2876,7 @@ "characterMaximumLength": "255" }, { - "id": "229", + "id": "230", "name": "image", "type": { "id": "varchar", @@ -2876,7 +2889,7 @@ "characterMaximumLength": "255" }, { - "id": "230", + "id": "231", "name": "mal_id", "type": { "id": "int", @@ -2888,7 +2901,7 @@ "createdAt": 1777282589093 }, { - "id": "231", + "id": "232", "name": "mal_url", "type": { "id": "varchar", @@ -2901,7 +2914,7 @@ "characterMaximumLength": "255" }, { - "id": "232", + "id": "233", "name": "deleted_at", "type": { "id": "timestamp", @@ -2913,7 +2926,7 @@ "createdAt": 1777282589093 }, { - "id": "233", + "id": "234", "name": "updated_at", "type": { "id": "timestamp", @@ -2925,7 +2938,7 @@ "createdAt": 1777282589093 }, { - "id": "234", + "id": "235", "name": "created_at", "type": { "id": "timestamp", @@ -2939,11 +2952,11 @@ ], "indexes": [ { - "id": "235", + "id": "236", "name": "", "unique": true, "fieldIds": [ - "227" + "228" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2956,13 +2969,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "236", + "id": "237", "name": "home_media_banner", "x": -1034.714934672103, "y": -969.0938770634809, "fields": [ { - "id": "237", + "id": "238", "name": "id", "type": { "id": "uuid", @@ -2974,7 +2987,7 @@ "createdAt": 1778771594518 }, { - "id": "238", + "id": "239", "name": "media_id", "type": { "id": "uuid", @@ -2986,7 +2999,7 @@ "createdAt": 1778771625245 }, { - "id": "239", + "id": "240", "name": "created_by", "type": { "id": "uuid", @@ -2998,7 +3011,7 @@ "createdAt": 1778771632111 }, { - "id": "240", + "id": "241", "name": "priority", "type": { "id": "smallint", @@ -3010,7 +3023,7 @@ "createdAt": 1778771638786 }, { - "id": "241", + "id": "242", "name": "start_show", "type": { "id": "timestamp", @@ -3022,7 +3035,7 @@ "createdAt": 1778771679920 }, { - "id": "242", + "id": "243", "name": "end_show", "type": { "id": "timestamp", @@ -3034,7 +3047,7 @@ "createdAt": 1778771687135 }, { - "id": "243", + "id": "244", "name": "created_at", "type": { "id": "timestamp", @@ -3048,10 +3061,10 @@ ], "indexes": [ { - "id": "244", + "id": "245", "name": "", "fieldIds": [ - "237" + "238" ], "unique": true, "isPrimaryKey": true, @@ -3066,13 +3079,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "245", + "id": "246", "name": "users", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "246", + "id": "247", "name": "id", "type": { "id": "uuid", @@ -3084,7 +3097,7 @@ "createdAt": 1778390635628 }, { - "id": "247", + "id": "248", "name": "email", "type": { "id": "varchar", @@ -3096,7 +3109,7 @@ "createdAt": 1778391266880 }, { - "id": "248", + "id": "249", "name": "password", "type": { "id": "varchar", @@ -3109,7 +3122,7 @@ "characterMaximumLength": "255" }, { - "id": "249", + "id": "250", "name": "username", "type": { "id": "varchar", @@ -3122,7 +3135,7 @@ "characterMaximumLength": "28" }, { - "id": "250", + "id": "251", "name": "fullname", "type": { "id": "varchar", @@ -3135,7 +3148,7 @@ "characterMaximumLength": "32" }, { - "id": "251", + "id": "252", "name": "avatar", "type": { "id": "varchar", @@ -3148,7 +3161,7 @@ "characterMaximumLength": "255" }, { - "id": "252", + "id": "253", "name": "bio", "type": { "id": "text", @@ -3160,7 +3173,7 @@ "createdAt": 1778390888222 }, { - "id": "253", + "id": "254", "name": "datebirth", "type": { "id": "date", @@ -3172,7 +3185,7 @@ "createdAt": 1778391007890 }, { - "id": "254", + "id": "255", "name": "role", "type": { "id": "user_role", @@ -3184,7 +3197,7 @@ "createdAt": 1778771211530 }, { - "id": "255", + "id": "256", "name": "sex", "type": { "id": "user_sex", @@ -3196,7 +3209,7 @@ "createdAt": 1778391031530 }, { - "id": "256", + "id": "257", "name": "phone_number", "type": { "id": "varchar", @@ -3208,18 +3221,6 @@ "createdAt": 1778391449319, "characterMaximumLength": "15" }, - { - "id": "257", - "name": "address", - "type": { - "id": "address", - "name": "address" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778401066100 - }, { "id": "258", "name": "country", @@ -3313,7 +3314,7 @@ "id": "265", "name": "", "fieldIds": [ - "246" + "247" ], "unique": true, "isPrimaryKey": true, @@ -3323,7 +3324,7 @@ "id": "266", "name": "index_2", "fieldIds": [ - "249" + "250" ], "unique": true, "createdAt": 1778401234711 @@ -3332,7 +3333,7 @@ "id": "267", "name": "index_3", "fieldIds": [ - "247" + "248" ], "unique": true, "createdAt": 1778401248519 @@ -4989,11 +4990,132 @@ "order": 44, "schema": "public", "expanded": true + }, + { + "id": "398", + "name": "user_addresses", + "x": 656.4651961039559, + "y": -1010.0698801871713, + "fields": [ + { + "id": "399", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1778816506150 + }, + { + "id": "400", + "name": "street_address", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816542685 + }, + { + "id": "401", + "name": "district", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816551994 + }, + { + "id": "402", + "name": "city", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816560720 + }, + { + "id": "403", + "name": "province", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816564935 + }, + { + "id": "404", + "name": "postal_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816568904 + }, + { + "id": "405", + "name": "coordinate", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778816577336 + }, + { + "id": "406", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778816585545 + } + ], + "indexes": [ + { + "id": "407", + "name": "", + "fieldIds": [ + "399" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1778816506150 + } + ], + "color": "#4dee8a", + "createdAt": 1778816506150, + "isView": false, + "order": 45, + "schema": "public" } ], "relationships": [ { - "id": "398", + "id": "408", "name": "collection_members_collection_id_fk", "sourceSchema": "public", "sourceTableId": "292", @@ -5007,13 +5129,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "399", + "id": "409", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "141", "sourceCardinality": "one", "targetCardinality": "many", @@ -5021,13 +5143,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "400", + "id": "410", "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "139", "sourceCardinality": "one", "targetCardinality": "many", @@ -5035,13 +5157,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "402", + "id": "412", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "208", + "sourceTableId": "209", "targetSchema": "public", "targetTableId": "118", - "sourceFieldId": "209", + "sourceFieldId": "210", "targetFieldId": "120", "sourceCardinality": "one", "targetCardinality": "many", @@ -5049,13 +5171,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "403", + "id": "413", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "118", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "121", "sourceCardinality": "one", "targetCardinality": "many", @@ -5063,13 +5185,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "405", + "id": "415", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "208", + "sourceTableId": "209", "targetSchema": "public", "targetTableId": "276", - "sourceFieldId": "209", + "sourceFieldId": "210", "targetFieldId": "279", "sourceCardinality": "one", "targetCardinality": "many", @@ -5077,13 +5199,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "406", + "id": "416", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "276", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "278", "sourceCardinality": "one", "targetCardinality": "many", @@ -5091,35 +5213,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "407", + "id": "417", "name": "comments_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "208", + "targetTableId": "209", "sourceFieldId": "6", - "targetFieldId": "211", + "targetFieldId": "212", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777292243, "diagramId": "yqwsqwccoj6v" }, { - "id": "408", + "id": "418", "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", - "targetTableId": "208", - "sourceFieldId": "246", - "targetFieldId": "210", + "targetTableId": "209", + "sourceFieldId": "247", + "targetFieldId": "211", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777252269, "diagramId": "yqwsqwccoj6v" }, { - "id": "409", + "id": "419", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -5133,7 +5255,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "410", + "id": "420", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -5147,35 +5269,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "411", + "id": "421", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", "sourceTableId": "285", "targetSchema": "public", - "targetTableId": "197", + "targetTableId": "198", "sourceFieldId": "286", - "targetFieldId": "199", + "targetFieldId": "200", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, "diagramId": "yqwsqwccoj6v" }, { - "id": "412", + "id": "422", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", "targetSchema": "public", - "targetTableId": "197", + "targetTableId": "198", "sourceFieldId": "183", - "targetFieldId": "198", + "targetFieldId": "199", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, "diagramId": "yqwsqwccoj6v" }, { - "id": "413", + "id": "423", "name": "genres_id_fk", "sourceSchema": "public", "sourceTableId": "285", @@ -5189,35 +5311,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "414", + "id": "424", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", - "targetTableId": "236", - "sourceFieldId": "246", - "targetFieldId": "239", + "targetTableId": "237", + "sourceFieldId": "247", + "targetFieldId": "240", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771806907, "diagramId": "yqwsqwccoj6v" }, { - "id": "415", + "id": "425", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "236", + "targetTableId": "237", "sourceFieldId": "38", - "targetFieldId": "238", + "targetFieldId": "239", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771781222, "diagramId": "yqwsqwccoj6v" }, { - "id": "416", + "id": "426", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "125", @@ -5231,7 +5353,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "417", + "id": "427", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "125", @@ -5245,35 +5367,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "418", + "id": "428", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", - "targetTableId": "202", - "sourceFieldId": "246", - "targetFieldId": "205", + "targetTableId": "203", + "sourceFieldId": "247", + "targetFieldId": "206", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733368958, "diagramId": "yqwsqwccoj6v" }, { - "id": "419", + "id": "429", "name": "media_collections_collection_id_fk", "sourceSchema": "public", "sourceTableId": "292", "targetSchema": "public", - "targetTableId": "202", + "targetTableId": "203", "sourceFieldId": "293", - "targetFieldId": "203", + "targetFieldId": "204", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733702652, "diagramId": "yqwsqwccoj6v" }, { - "id": "420", + "id": "430", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", "sourceTableId": "285", @@ -5287,7 +5409,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "421", + "id": "431", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5301,7 +5423,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "422", + "id": "432", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5315,7 +5437,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "423", + "id": "433", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "156", @@ -5329,7 +5451,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "424", + "id": "434", "name": "media_genres_genre_id_fk", "sourceSchema": "public", "sourceTableId": "285", @@ -5343,7 +5465,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "425", + "id": "435", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5357,7 +5479,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "426", + "id": "436", "name": "media_producers_producer_id_fk", "sourceSchema": "public", "sourceTableId": "166", @@ -5371,7 +5493,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "427", + "id": "437", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5385,7 +5507,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "428", + "id": "438", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5399,7 +5521,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "429", + "id": "439", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5413,7 +5535,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "430", + "id": "440", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -5427,7 +5549,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "431", + "id": "441", "name": "media_submissions_media_id_fk", "sourceSchema": "public", "sourceTableId": "337", @@ -5441,7 +5563,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "432", + "id": "442", "name": "media_submissions_media_id_fk", "sourceSchema": "public", "sourceTableId": "337", @@ -5455,7 +5577,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "433", + "id": "443", "name": "media_types_id_medias_type", "sourceSchema": "public", "sourceTableId": "366", @@ -5469,7 +5591,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "434", + "id": "444", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5483,7 +5605,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "435", + "id": "445", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5497,7 +5619,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "436", + "id": "446", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5511,7 +5633,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "437", + "id": "447", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5525,7 +5647,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "438", + "id": "448", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5539,21 +5661,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "439", + "id": "449", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "202", + "targetTableId": "203", "sourceFieldId": "38", - "targetFieldId": "204", + "targetFieldId": "205", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733359073, "diagramId": "yqwsqwccoj6v" }, { - "id": "440", + "id": "450", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5567,7 +5689,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "441", + "id": "451", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5581,7 +5703,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "442", + "id": "452", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5595,7 +5717,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "443", + "id": "453", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5609,7 +5731,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "444", + "id": "454", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5623,7 +5745,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "445", + "id": "455", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5637,7 +5759,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "446", + "id": "456", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5651,7 +5773,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "447", + "id": "457", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5665,7 +5787,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "448", + "id": "458", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", @@ -5679,7 +5801,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "449", + "id": "459", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", @@ -5693,13 +5815,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "450", + "id": "460", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "131", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "132", "sourceCardinality": "one", "targetCardinality": "many", @@ -5707,13 +5829,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "451", + "id": "461", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "131", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "133", "sourceCardinality": "one", "targetCardinality": "many", @@ -5721,7 +5843,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "452", + "id": "462", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -5735,7 +5857,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "453", + "id": "463", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5749,7 +5871,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "456", + "id": "466", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5763,7 +5885,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "457", + "id": "467", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5777,13 +5899,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "458", + "id": "468", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "370", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "371", "sourceCardinality": "one", "targetCardinality": "many", @@ -5791,13 +5913,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "459", + "id": "469", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "370", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "372", "sourceCardinality": "one", "targetCardinality": "many", @@ -5805,21 +5927,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "460", + "id": "470", "name": "user_oauth_credentials_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", - "targetTableId": "217", - "sourceFieldId": "246", - "targetFieldId": "218", + "targetTableId": "218", + "sourceFieldId": "247", + "targetFieldId": "219", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778516921506, "diagramId": "yqwsqwccoj6v" }, { - "id": "461", + "id": "471", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", @@ -5833,21 +5955,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "464", + "id": "474", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", "targetSchema": "public", - "targetTableId": "245", + "targetTableId": "246", "sourceFieldId": "183", - "targetFieldId": "246", + "targetFieldId": "247", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "yqwsqwccoj6v" }, { - "id": "465", + "id": "475", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -5861,13 +5983,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "466", + "id": "476", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "177", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "178", "sourceCardinality": "one", "targetCardinality": "many", @@ -5875,10 +5997,10 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "467", + "id": "477", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "144", "sourceFieldId": "258", @@ -5889,7 +6011,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "468", + "id": "478", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", "sourceTableId": "347", @@ -5903,13 +6025,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "469", + "id": "479", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "305", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "308", "sourceCardinality": "one", "targetCardinality": "many", @@ -5917,13 +6039,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "470", + "id": "480", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "305", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "309", "sourceCardinality": "one", "targetCardinality": "many", @@ -5931,7 +6053,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "471", + "id": "481", "name": "video_submissions_video_id_fk", "sourceSchema": "public", "sourceTableId": "305", @@ -5945,7 +6067,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "472", + "id": "482", "name": "videos_service_id_video_services_id", "sourceSchema": "public", "sourceTableId": "92", @@ -5959,21 +6081,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "473", + "id": "483", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", "sourceTableId": "300", "targetSchema": "public", - "targetTableId": "226", + "targetTableId": "227", "sourceFieldId": "303", - "targetFieldId": "227", + "targetFieldId": "228", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "474", + "id": "484", "name": "comment_likes_user_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5986,70 +6108,50 @@ "createdAt": 1778808338630 }, { - "id": "475", + "id": "485", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "208", + "sourceTableId": "209", "targetSchema": "public", "targetTableId": "379", - "sourceFieldId": "209", + "sourceFieldId": "210", "targetFieldId": "381", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916 }, { - "id": "476", + "id": "486", "name": "user_sessions_user_id_fk", "sourceSchema": "public", - "sourceTableId": "245", + "sourceTableId": "246", "targetSchema": "public", "targetTableId": "385", - "sourceFieldId": "246", + "sourceFieldId": "247", "targetFieldId": "387", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778815073839 + }, + { + "id": "487", + "name": "user_addresses_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "398", + "targetSchema": "public", + "targetTableId": "246", + "sourceFieldId": "399", + "targetFieldId": "247", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778816615538 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "477", - "name": "address", - "kind": "composite", - "values": [], - "fields": [ - { - "field": "street_address", - "type": "varchar" - }, - { - "field": "subdistrict", - "type": "varchar" - }, - { - "field": "district", - "type": "varchar" - }, - { - "field": "city", - "type": "varchar" - }, - { - "field": "province", - "type": "varchar" - }, - { - "field": "postal_code", - "type": "int" - } - ], - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "478", + "id": "488", "name": "audit_action", "kind": "enum", "values": [ @@ -6062,7 +6164,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "479", + "id": "489", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6075,7 +6177,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "480", + "id": "490", "name": "privacy_level", "kind": "enum", "values": [ @@ -6087,7 +6189,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "481", + "id": "491", "name": "status_submission", "kind": "enum", "values": [ @@ -6099,7 +6201,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "482", + "id": "492", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6110,7 +6212,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "483", + "id": "493", "name": "user_role", "kind": "enum", "values": [ @@ -6123,7 +6225,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "484", + "id": "494", "name": "user_sex", "kind": "enum", "values": [ @@ -6134,7 +6236,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "485", + "id": "495", "name": "like_type", "kind": "enum", "values": [ @@ -6144,7 +6246,7 @@ "fields": [] }, { - "id": "486", + "id": "496", "name": "device_type", "kind": "enum", "values": [ From 20b84d3fc495c6d10181d8ca1d5f34401bc1e5ea Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 8 May 2026 21:00:00 +0700 Subject: [PATCH 14/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20sync=20DBML=20with?= =?UTF-8?q?=20latest=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/dbml/schema.dbml | 45 +++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/prisma/dbml/schema.dbml b/prisma/dbml/schema.dbml index ac92e80..82b6762 100644 --- a/prisma/dbml/schema.dbml +++ b/prisma/dbml/schema.dbml @@ -119,7 +119,7 @@ Table "public"."medias" { "background" text "season" varchar(15) [not null, note: 'enum(winter, spring, summer, fall)'] "year" smallint [not null] - "country" uuid [not null, ref: > "public"."system_country"."id"] + "country" uuid [not null, ref: > "public"."countries"."id"] "broadcast_date" varchar(64) "producers" uuid [not null] "licensors" uuid [not null] @@ -167,7 +167,7 @@ Table "public"."videos" { Table "public"."user_country_preferences" { "user_id" uuid [not null, ref: > "public"."user_preferences"."user_id"] - "country_id" uuid [unique, not null, ref: > "public"."system_country"."id"] + "country_id" uuid [unique, not null, ref: > "public"."countries"."id"] "state" user_preference_state [not null] } @@ -217,11 +217,11 @@ Table "public"."collection_members" { "joined_at" timestamp [not null] } -Table "public"."system_country" { +Table "public"."countries" { "id" uuid [pk, not null, ref: - "public"."users"."country"] "name" varchar(155) [not null] - "slug" varchar(165) [not null] - "code" varchar(3) [not null] + "slug" varchar(165) [unique, not null] + "code" varchar(3) [unique, not null] "flag" varchar(255) "banner" varchar(255) } @@ -275,16 +275,17 @@ Table "public"."user_preferences" { "user_id" uuid [pk, not null] "character_as_partner" uuid [ref: > "public"."characters"."id"] "comment_picture" varchar(255) - "watch_history" boolean [not null, default: true] - "search_history" boolean [not null, default: false] - "private_account" boolean [not null, default: false] - "message_open" boolean [not null, default: true] - "birthday_open" boolean [not null, default: false] - "email_open" boolean [not null, default: false] - "number_open" boolean [not null, default: false] - "partner_open" boolean [not null, default: true] - "subscribe_newsletter" boolean [not null, default: true] - "security_notification" boolean [not null, default: true] + "enable_watch_history" boolean [not null, default: true] + "enable_search_history" boolean [not null, default: false] + "is_private_account" boolean [not null, default: false] + "can_message_me" boolean [not null, default: true] + "publish_birthday" boolean [not null, default: false] + "publish_email" boolean [not null, default: false] + "publish_phone_number" boolean [not null, default: false] + "publish_country" boolean [not null, default: false] + "publish_partner" boolean [not null, default: true] + "subscribe_to_newsletter" boolean [not null, default: true] + "enable_security_alerts" boolean [not null, default: true] } Table "public"."user_genre_preferences" { @@ -353,7 +354,7 @@ Table "public"."home_media_banner" { } Table "public"."users" { - "id" uuid [pk, not null, ref: - "public"."user_preferences"."user_id"] + "id" uuid [pk, not null, ref: - "public"."user_preferences"."user_id", ref: - "public"."user_addresses"."user_id"] "email" varchar(500) [unique, not null] "password" varchar(255) "username" varchar(28) [unique, not null] @@ -364,7 +365,6 @@ Table "public"."users" { "role" user_role [not null] "sex" user_sex [not null] "phone_number" varchar(15) - "address" address "country" uuid "auth_provider" varchar(64) "provider_token" varchar(255) @@ -558,3 +558,14 @@ Table "public"."user_sessions" { "login_at" timestamp [not null] "logout_at" timestamp } + +Table "public"."user_addresses" { + "user_id" uuid [pk, not null] + "street_address" varchar(500) [not null] + "district" varchar(500) [not null] + "city" varchar(500) [not null] + "province" varchar(500) [not null] + "postal_code" varchar(500) [not null] + "coordinate" varchar(500) + "updated_at" timestamp [not null] +} From a5a11d026ff0c2125a5cb31335000989b080c7e2 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 8 May 2026 21:00:00 +0700 Subject: [PATCH 15/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20create=20ne?= =?UTF-8?q?w=20prisma=20schema=20based=20on=20updated=20database=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a02ff9d..6186675 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -9,3 +9,69 @@ generator dbml { datasource db { provider = "postgresql" } + +enum user_role { + user + contributor + curator + admin +} +enum user_sex { + male + female +} + + + +model User { + id String @id @db.Uuid @default(uuid(7)) + email String @unique + password String? @db.VarChar(255) + username String @unique @db.VarChar(28) + fullname String @db.VarChar(32) + avatar String? @db.VarChar(255) + bio String? @db.Text + datebirth DateTime? @db.Date + role user_role @default(user) + sex user_sex? + phone_number String? @db.VarChar(20) + country Country? @relation(fields: [countryId], references: [id], name: "UserCountry") + auth_provider String? @db.VarChar(64) + provider_token String? @db.VarChar(255) + created_at DateTime @default(now()) @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + deleted_at DateTime? @db.Timestamptz() + + countryId String? @db.Uuid + @@map("users") +} + +model UserPreference { + user_id String @id @db.Uuid + // char_as_partner + comment_picture String? @db.VarChar(255) + enable_watch_history Boolean @default(true) + enable_search_history Boolean @default(false) + is_private_account Boolean @default(false) + can_message_me Boolean @default(true) + publish_birthday Boolean @default(false) + publish_email Boolean @default(false) + publish_phone_number Boolean @default(false) + publish_country Boolean @default(false) + publish_partner Boolean @default(true) + subscribe_to_newsletter Boolean @default(true) + enable_security_alerts Boolean @default(true) + @@map("user_preferences") +} + +model Country { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(155) + slug String @db.VarChar(165) + code String @db.VarChar(3) + flag String? @db.VarChar(255) + banner String? @db.VarChar(255) + + UserCountry User[] @relation("UserCountry") + @@map("countries") +} \ No newline at end of file From 0fec37e3379468ca1a7054b3aca64a6b1f54daf2 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 8 May 2026 21:00:00 +0700 Subject: [PATCH 16/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20user?= =?UTF-8?q?=5Faddress=20table=20to=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6186675..4b49296 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -38,10 +38,12 @@ model User { country Country? @relation(fields: [countryId], references: [id], name: "UserCountry") auth_provider String? @db.VarChar(64) provider_token String? @db.VarChar(255) + address UserAddress? + preferences UserPreference? created_at DateTime @default(now()) @db.Timestamptz() updated_at DateTime @updatedAt @db.Timestamptz() deleted_at DateTime? @db.Timestamptz() - + countryId String? @db.Uuid @@map("users") } @@ -61,9 +63,25 @@ model UserPreference { publish_partner Boolean @default(true) subscribe_to_newsletter Boolean @default(true) enable_security_alerts Boolean @default(true) + + user User @relation(fields: [user_id], references: [id]) @@map("user_preferences") } +model UserAddress { + user_id String @id @db.Uuid + address String @db.VarChar(255) + district String @db.VarChar(100) + city String @db.VarChar(100) + province String @db.VarChar(100) + postal_code String @db.VarChar(20) + coordinate String? @db.VarChar(50) + updated_at DateTime @updatedAt @db.Timestamptz() + + user User @relation(fields: [user_id], references: [id]) + @@map("user_addresses") +} + model Country { id String @id @db.Uuid @default(uuid(7)) name String @db.VarChar(155) From 85ef765da88463f061f14160151a61c8354b7643 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 8 May 2026 21:00:00 +0700 Subject: [PATCH 17/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20fix=20oauth=20tabl?= =?UTF-8?q?e=20in=20database=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1020 +++++++++++++++++++++++-------------------- 1 file changed, 551 insertions(+), 469 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index ede45f7..54cc191 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-15T04:05:13.690Z", + "updatedAt": "2026-05-15T05:21:25.030Z", "databaseType": "postgresql", "tables": [ { @@ -61,7 +61,7 @@ "name": "episodes", "schema": "public", "x": 196.42495741544377, - "y": 484.48992450910697, + "y": 550.6255135491608, "fields": [ { "id": "6", @@ -1038,8 +1038,8 @@ "id": "83", "name": "media_relations", "schema": "public", - "x": 196.76101626573526, - "y": -96.79417551573586, + "x": 194.39903094287618, + "y": -61.06914750749248, "fields": [ { "id": "84", @@ -1366,8 +1366,8 @@ "id": "109", "name": "media_producers", "schema": "public", - "x": 197.29835902390482, - "y": 69.49260163533236, + "x": 194.9363737010458, + "y": 104.92238147821836, "fields": [ { "id": "110", @@ -1958,8 +1958,8 @@ "id": "156", "name": "media_external_links", "schema": "public", - "x": 196.86867462069478, - "y": -298.9741574566786, + "x": 194.5066892978357, + "y": -264.72537027522213, "fields": [ { "id": "157", @@ -2554,7 +2554,7 @@ "id": "203", "name": "media_collections", "x": 197.36608531341386, - "y": -529.0272597527102, + "y": -468.796634019804, "fields": [ { "id": "204", @@ -2737,9 +2737,9 @@ }, { "id": "218", - "name": "user_oauth_credentials", - "x": 198.86057563155222, - "y": -819.0509320845548, + "name": "user_oauth_accounts", + "x": 200.04156829298174, + "y": -928.8832495975014, "fields": [ { "id": "219", @@ -2767,30 +2767,18 @@ }, { "id": "221", - "name": "oauth_id", + "name": "provider_name", "type": { - "id": "uuid", - "name": "uuid" + "id": "oauth_provider", + "name": "oauth_provider" }, "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778516373206 + "createdAt": 1778822365657 }, { "id": "222", - "name": "provider_token", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778516403942 - }, - { - "id": "223", "name": "provider_sub", "type": { "id": "varchar", @@ -2799,24 +2787,102 @@ "unique": false, "nullable": true, "primaryKey": false, - "createdAt": 1778516761873 + "createdAt": 1778516403942, + "characterMaximumLength": "255" + }, + { + "id": "223", + "name": "provider_email", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778822096844, + "characterMaximumLength": "255", + "default": null }, { "id": "224", - "name": "last_action", + "name": "access_token", "type": { - "id": "timestamp", - "name": "timestamp" + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778516373206, + "characterMaximumLength": "255", + "default": null + }, + { + "id": "225", + "name": "refresh_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778822164872, + "characterMaximumLength": "255" + }, + { + "id": "226", + "name": "last_login", + "type": { + "id": "timestamptz", + "name": "timestamptz" }, "unique": false, "nullable": false, "primaryKey": false, "createdAt": 1778516872367 + }, + { + "id": "227", + "name": "expires_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1778822177415 + }, + { + "id": "228", + "name": "created_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778822183677 + }, + { + "id": "229", + "name": "updated_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1778822185523 } ], "indexes": [ { - "id": "225", + "id": "230", "name": "", "fieldIds": [ "219" @@ -2826,11 +2892,11 @@ "createdAt": 1778516299633 }, { - "id": "226", + "id": "231", "name": "index_2", "fieldIds": [ - "221", - "220" + "220", + "221" ], "unique": true, "createdAt": 1778516903425 @@ -2841,17 +2907,18 @@ "isView": false, "order": 29, "schema": "public", - "diagramId": "yqwsqwccoj6v" + "diagramId": "yqwsqwccoj6v", + "expanded": true }, { - "id": "227", + "id": "232", "name": "staff", "schema": "public", "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "228", + "id": "233", "name": "id", "type": { "id": "uuid", @@ -2863,7 +2930,7 @@ "createdAt": 1777282589093 }, { - "id": "229", + "id": "234", "name": "name", "type": { "id": "varchar", @@ -2876,7 +2943,7 @@ "characterMaximumLength": "255" }, { - "id": "230", + "id": "235", "name": "image", "type": { "id": "varchar", @@ -2889,7 +2956,7 @@ "characterMaximumLength": "255" }, { - "id": "231", + "id": "236", "name": "mal_id", "type": { "id": "int", @@ -2901,7 +2968,7 @@ "createdAt": 1777282589093 }, { - "id": "232", + "id": "237", "name": "mal_url", "type": { "id": "varchar", @@ -2914,7 +2981,7 @@ "characterMaximumLength": "255" }, { - "id": "233", + "id": "238", "name": "deleted_at", "type": { "id": "timestamp", @@ -2926,7 +2993,7 @@ "createdAt": 1777282589093 }, { - "id": "234", + "id": "239", "name": "updated_at", "type": { "id": "timestamp", @@ -2938,7 +3005,7 @@ "createdAt": 1777282589093 }, { - "id": "235", + "id": "240", "name": "created_at", "type": { "id": "timestamp", @@ -2952,11 +3019,11 @@ ], "indexes": [ { - "id": "236", + "id": "241", "name": "", "unique": true, "fieldIds": [ - "228" + "233" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2969,13 +3036,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "237", + "id": "242", "name": "home_media_banner", "x": -1034.714934672103, "y": -969.0938770634809, "fields": [ { - "id": "238", + "id": "243", "name": "id", "type": { "id": "uuid", @@ -2987,7 +3054,7 @@ "createdAt": 1778771594518 }, { - "id": "239", + "id": "244", "name": "media_id", "type": { "id": "uuid", @@ -2999,7 +3066,7 @@ "createdAt": 1778771625245 }, { - "id": "240", + "id": "245", "name": "created_by", "type": { "id": "uuid", @@ -3011,7 +3078,7 @@ "createdAt": 1778771632111 }, { - "id": "241", + "id": "246", "name": "priority", "type": { "id": "smallint", @@ -3023,7 +3090,7 @@ "createdAt": 1778771638786 }, { - "id": "242", + "id": "247", "name": "start_show", "type": { "id": "timestamp", @@ -3035,7 +3102,7 @@ "createdAt": 1778771679920 }, { - "id": "243", + "id": "248", "name": "end_show", "type": { "id": "timestamp", @@ -3047,7 +3114,7 @@ "createdAt": 1778771687135 }, { - "id": "244", + "id": "249", "name": "created_at", "type": { "id": "timestamp", @@ -3061,10 +3128,10 @@ ], "indexes": [ { - "id": "245", + "id": "250", "name": "", "fieldIds": [ - "238" + "243" ], "unique": true, "isPrimaryKey": true, @@ -3079,13 +3146,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "246", + "id": "251", "name": "users", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "247", + "id": "252", "name": "id", "type": { "id": "uuid", @@ -3097,7 +3164,7 @@ "createdAt": 1778390635628 }, { - "id": "248", + "id": "253", "name": "email", "type": { "id": "varchar", @@ -3109,7 +3176,7 @@ "createdAt": 1778391266880 }, { - "id": "249", + "id": "254", "name": "password", "type": { "id": "varchar", @@ -3122,7 +3189,7 @@ "characterMaximumLength": "255" }, { - "id": "250", + "id": "255", "name": "username", "type": { "id": "varchar", @@ -3135,7 +3202,7 @@ "characterMaximumLength": "28" }, { - "id": "251", + "id": "256", "name": "fullname", "type": { "id": "varchar", @@ -3148,7 +3215,7 @@ "characterMaximumLength": "32" }, { - "id": "252", + "id": "257", "name": "avatar", "type": { "id": "varchar", @@ -3161,7 +3228,7 @@ "characterMaximumLength": "255" }, { - "id": "253", + "id": "258", "name": "bio", "type": { "id": "text", @@ -3173,7 +3240,7 @@ "createdAt": 1778390888222 }, { - "id": "254", + "id": "259", "name": "datebirth", "type": { "id": "date", @@ -3185,7 +3252,7 @@ "createdAt": 1778391007890 }, { - "id": "255", + "id": "260", "name": "role", "type": { "id": "user_role", @@ -3197,7 +3264,7 @@ "createdAt": 1778771211530 }, { - "id": "256", + "id": "261", "name": "sex", "type": { "id": "user_sex", @@ -3209,7 +3276,7 @@ "createdAt": 1778391031530 }, { - "id": "257", + "id": "262", "name": "phone_number", "type": { "id": "varchar", @@ -3222,7 +3289,7 @@ "characterMaximumLength": "15" }, { - "id": "258", + "id": "263", "name": "country", "type": { "id": "uuid", @@ -3234,7 +3301,7 @@ "createdAt": 1778401621258 }, { - "id": "259", + "id": "264", "name": "auth_provider", "type": { "id": "varchar", @@ -3247,7 +3314,7 @@ "characterMaximumLength": "64" }, { - "id": "260", + "id": "265", "name": "provider_token", "type": { "id": "varchar", @@ -3260,7 +3327,7 @@ "characterMaximumLength": "255" }, { - "id": "261", + "id": "266", "name": "created_at", "type": { "id": "timestamp", @@ -3273,7 +3340,7 @@ "default": "now()" }, { - "id": "262", + "id": "267", "name": "verified_at", "type": { "id": "timestamp", @@ -3285,7 +3352,7 @@ "createdAt": 1778815129265 }, { - "id": "263", + "id": "268", "name": "updated_at", "type": { "id": "timestamp", @@ -3297,7 +3364,7 @@ "createdAt": 1778517127447 }, { - "id": "264", + "id": "269", "name": "deleted_at", "type": { "id": "timestamp", @@ -3311,29 +3378,29 @@ ], "indexes": [ { - "id": "265", + "id": "270", "name": "", "fieldIds": [ - "247" + "252" ], "unique": true, "isPrimaryKey": true, "createdAt": 1778390635628 }, { - "id": "266", + "id": "271", "name": "index_2", "fieldIds": [ - "250" + "255" ], "unique": true, "createdAt": 1778401234711 }, { - "id": "267", + "id": "272", "name": "index_3", "fieldIds": [ - "248" + "253" ], "unique": true, "createdAt": 1778401248519 @@ -3350,14 +3417,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "268", + "id": "273", "name": "media_studios", "schema": "public", - "x": 199.29817359050787, - "y": 347.7468004324893, + "x": 194.57420294478976, + "y": 402.07246285824783, "fields": [ { - "id": "269", + "id": "274", "name": "media_id", "type": { "id": "uuid", @@ -3369,7 +3436,7 @@ "createdAt": 1777360514222 }, { - "id": "270", + "id": "275", "name": "producer_id", "type": { "id": "uuid", @@ -3383,12 +3450,12 @@ ], "indexes": [ { - "id": "271", + "id": "276", "name": "", "unique": true, "fieldIds": [ - "269", - "270" + "274", + "275" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -3401,14 +3468,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "272", + "id": "277", "name": "media_licencors", "schema": "public", - "x": 196.51843134292955, - "y": 207.07984381762645, + "x": 194.15644602007046, + "y": 251.9575649519487, "fields": [ { - "id": "273", + "id": "278", "name": "media_id", "type": { "id": "uuid", @@ -3420,7 +3487,7 @@ "createdAt": 1777360331507 }, { - "id": "274", + "id": "279", "name": "producer_id", "type": { "id": "uuid", @@ -3434,12 +3501,12 @@ ], "indexes": [ { - "id": "275", + "id": "280", "name": "", "unique": true, "fieldIds": [ - "273", - "274" + "278", + "279" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3452,13 +3519,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "276", + "id": "281", "name": "comment_reports", "x": -1032.5934799775514, "y": -655.2659179217417, "fields": [ { - "id": "277", + "id": "282", "name": "id", "type": { "id": "uuid", @@ -3470,7 +3537,7 @@ "createdAt": 1778777460892 }, { - "id": "278", + "id": "283", "name": "reporter_id", "type": { "id": "uuid", @@ -3482,7 +3549,7 @@ "createdAt": 1778777475869 }, { - "id": "279", + "id": "284", "name": "comment_id", "type": { "id": "uuid", @@ -3494,7 +3561,7 @@ "createdAt": 1778777483534 }, { - "id": "280", + "id": "285", "name": "title", "type": { "id": "varchar", @@ -3507,7 +3574,7 @@ "characterMaximumLength": "115" }, { - "id": "281", + "id": "286", "name": "status", "type": { "id": "status_submission", @@ -3519,7 +3586,7 @@ "createdAt": 1778777836090 }, { - "id": "282", + "id": "287", "name": "description", "type": { "id": "text", @@ -3531,7 +3598,7 @@ "createdAt": 1778777519944 }, { - "id": "283", + "id": "288", "name": "reported_at", "type": { "id": "timestamp", @@ -3543,7 +3610,7 @@ "createdAt": 1778777537682 }, { - "id": "284", + "id": "289", "name": "closed_at", "type": { "id": "timestamp", @@ -3564,14 +3631,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "285", + "id": "290", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 289.93770102274635, "fields": [ { - "id": "286", + "id": "291", "name": "id", "type": { "id": "uuid", @@ -3583,7 +3650,7 @@ "createdAt": 1777282589094 }, { - "id": "287", + "id": "292", "name": "mal_id", "type": { "id": "smallint", @@ -3595,7 +3662,7 @@ "createdAt": 1777282589094 }, { - "id": "288", + "id": "293", "name": "type", "type": { "id": "varchar", @@ -3608,7 +3675,7 @@ "characterMaximumLength": "16" }, { - "id": "289", + "id": "294", "name": "name", "type": { "id": "varchar", @@ -3621,7 +3688,7 @@ "characterMaximumLength": "32" }, { - "id": "290", + "id": "295", "name": "url", "type": { "id": "varchar", @@ -3636,11 +3703,11 @@ ], "indexes": [ { - "id": "291", + "id": "296", "name": "", "unique": true, "fieldIds": [ - "286" + "291" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -3653,13 +3720,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "292", + "id": "297", "name": "collections", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "293", + "id": "298", "name": "id", "type": { "id": "uuid", @@ -3671,7 +3738,7 @@ "createdAt": 1778733394970 }, { - "id": "294", + "id": "299", "name": "name", "type": { "id": "varchar", @@ -3685,7 +3752,7 @@ "default": null }, { - "id": "295", + "id": "300", "name": "cover_url", "type": { "id": "varchar", @@ -3698,7 +3765,7 @@ "characterMaximumLength": "255" }, { - "id": "296", + "id": "301", "name": "privacy_level", "type": { "id": "privacy_level", @@ -3710,7 +3777,7 @@ "createdAt": 1778766528943 }, { - "id": "297", + "id": "302", "name": "created_at", "type": { "id": "timestamp", @@ -3722,7 +3789,7 @@ "createdAt": 1778733453130 }, { - "id": "298", + "id": "303", "name": "updated_at", "type": { "id": "timestamp", @@ -3736,10 +3803,10 @@ ], "indexes": [ { - "id": "299", + "id": "304", "name": "", "fieldIds": [ - "293" + "298" ], "unique": true, "isPrimaryKey": true, @@ -3754,14 +3821,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "300", + "id": "305", "name": "voice_actors", "schema": "public", "x": -1038.3471892955995, "y": 525.1907371208936, "fields": [ { - "id": "301", + "id": "306", "name": "id", "type": { "id": "uuid", @@ -3773,7 +3840,7 @@ "createdAt": 1777282589093 }, { - "id": "302", + "id": "307", "name": "language", "type": { "id": "varchar", @@ -3786,7 +3853,7 @@ "characterMaximumLength": "115" }, { - "id": "303", + "id": "308", "name": "actor_staff", "type": { "id": "uuid", @@ -3800,11 +3867,11 @@ ], "indexes": [ { - "id": "304", + "id": "309", "name": "", "unique": true, "fieldIds": [ - "301" + "306" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -3817,13 +3884,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "305", + "id": "310", "name": "video_submissions", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "306", + "id": "311", "name": "id", "type": { "id": "uuid", @@ -3835,7 +3902,7 @@ "createdAt": 1777362610195 }, { - "id": "307", + "id": "312", "name": "video_id", "type": { "id": "uuid", @@ -3847,7 +3914,7 @@ "createdAt": 1777362624424 }, { - "id": "308", + "id": "313", "name": "created_by", "type": { "id": "uuid", @@ -3860,7 +3927,7 @@ "comments": "" }, { - "id": "309", + "id": "314", "name": "reviewed_by", "type": { "id": "uuid", @@ -3872,7 +3939,7 @@ "createdAt": 1777362758238 }, { - "id": "310", + "id": "315", "name": "status", "type": { "id": "status_submission", @@ -3886,7 +3953,7 @@ "comments": "" }, { - "id": "311", + "id": "316", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3898,7 +3965,7 @@ "createdAt": 1777363627973 }, { - "id": "312", + "id": "317", "name": "reason", "type": { "id": "text", @@ -3910,7 +3977,7 @@ "createdAt": 1777363674757 }, { - "id": "313", + "id": "318", "name": "created_at", "type": { "id": "timestamp", @@ -3925,11 +3992,11 @@ ], "indexes": [ { - "id": "314", + "id": "319", "name": "", "unique": true, "fieldIds": [ - "306" + "311" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3944,14 +4011,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "315", + "id": "320", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "316", + "id": "321", "name": "media_id", "type": { "id": "uuid", @@ -3963,7 +4030,7 @@ "createdAt": 1777283473368 }, { - "id": "317", + "id": "322", "name": "genre_id", "type": { "id": "uuid", @@ -3977,21 +4044,21 @@ ], "indexes": [ { - "id": "318", + "id": "323", "name": "", "unique": true, "fieldIds": [ - "317" + "322" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "319", + "id": "324", "name": "index_1", "fieldIds": [ - "316", - "317" + "321", + "322" ], "unique": true, "createdAt": 1778570545534 @@ -4006,14 +4073,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "320", + "id": "325", "name": "video_services", "schema": "public", - "x": 76.84794405482987, - "y": 1174.3220047083446, + "x": 78.02893671625938, + "y": 1219.199725842667, "fields": [ { - "id": "321", + "id": "326", "name": "id", "type": { "id": "uuid", @@ -4025,7 +4092,7 @@ "createdAt": 1777282589094 }, { - "id": "322", + "id": "327", "name": "name", "type": { "id": "varchar", @@ -4038,7 +4105,7 @@ "characterMaximumLength": "155" }, { - "id": "323", + "id": "328", "name": "resolution", "type": { "id": "smallint", @@ -4050,7 +4117,7 @@ "createdAt": 1777282589094 }, { - "id": "324", + "id": "329", "name": "domain", "type": { "id": "varchar", @@ -4063,7 +4130,7 @@ "characterMaximumLength": "255" }, { - "id": "325", + "id": "330", "name": "image_url", "type": { "id": "varchar", @@ -4076,7 +4143,7 @@ "characterMaximumLength": "255" }, { - "id": "326", + "id": "331", "name": "hex_color", "type": { "id": "varchar", @@ -4089,7 +4156,7 @@ "characterMaximumLength": "10" }, { - "id": "327", + "id": "332", "name": "endpoint_video", "type": { "id": "varchar", @@ -4102,7 +4169,7 @@ "characterMaximumLength": "255" }, { - "id": "328", + "id": "333", "name": "endpoint_short", "type": { "id": "varchar", @@ -4115,7 +4182,7 @@ "characterMaximumLength": "255" }, { - "id": "329", + "id": "334", "name": "endpoint_image", "type": { "id": "varchar", @@ -4128,7 +4195,7 @@ "characterMaximumLength": "255" }, { - "id": "330", + "id": "335", "name": "endpoint_download", "type": { "id": "varchar", @@ -4141,7 +4208,7 @@ "characterMaximumLength": "255" }, { - "id": "331", + "id": "336", "name": "created_by", "type": { "id": "uuid", @@ -4153,7 +4220,7 @@ "createdAt": 1777282589094 }, { - "id": "332", + "id": "337", "name": "deleted_at", "type": { "id": "timestamp", @@ -4165,7 +4232,7 @@ "createdAt": 1777282589094 }, { - "id": "333", + "id": "338", "name": "updated_at", "type": { "id": "timestamp", @@ -4177,7 +4244,7 @@ "createdAt": 1777282589094 }, { - "id": "334", + "id": "339", "name": "created_at", "type": { "id": "timestamp", @@ -4191,22 +4258,22 @@ ], "indexes": [ { - "id": "335", + "id": "340", "name": "", "unique": true, "fieldIds": [ - "321" + "326" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "336", + "id": "341", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "322", - "323" + "327", + "328" ], "createdAt": 1777282589094 } @@ -4220,14 +4287,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "337", + "id": "342", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "338", + "id": "343", "name": "id", "type": { "id": "uuid", @@ -4239,7 +4306,7 @@ "createdAt": 1777362610195 }, { - "id": "339", + "id": "344", "name": "media_id", "type": { "id": "uuid", @@ -4251,7 +4318,7 @@ "createdAt": 1777362624424 }, { - "id": "340", + "id": "345", "name": "created_by", "type": { "id": "uuid", @@ -4264,7 +4331,7 @@ "comments": "" }, { - "id": "341", + "id": "346", "name": "status", "type": { "id": "status_submission", @@ -4277,7 +4344,7 @@ "comments": "" }, { - "id": "342", + "id": "347", "name": "reviewed_by", "type": { "id": "uuid", @@ -4289,7 +4356,7 @@ "createdAt": 1777362758238 }, { - "id": "343", + "id": "348", "name": "reviewed_at", "type": { "id": "timestamp", @@ -4301,7 +4368,7 @@ "createdAt": 1777363627973 }, { - "id": "344", + "id": "349", "name": "reason", "type": { "id": "text", @@ -4313,7 +4380,7 @@ "createdAt": 1777363674757 }, { - "id": "345", + "id": "350", "name": "created_at", "type": { "id": "timestamp", @@ -4328,11 +4395,11 @@ ], "indexes": [ { - "id": "346", + "id": "351", "name": "", "unique": true, "fieldIds": [ - "338" + "343" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -4345,14 +4412,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "347", + "id": "352", "name": "video_service_submissions", "schema": "public", "x": -371.1847878375677, "y": 1294.289208047582, "fields": [ { - "id": "348", + "id": "353", "name": "id", "type": { "id": "uuid", @@ -4364,7 +4431,7 @@ "createdAt": 1777362610195 }, { - "id": "349", + "id": "354", "name": "video_service_id", "type": { "id": "uuid", @@ -4376,7 +4443,7 @@ "createdAt": 1777362624424 }, { - "id": "350", + "id": "355", "name": "created_by", "type": { "id": "uuid", @@ -4389,7 +4456,7 @@ "comments": "" }, { - "id": "351", + "id": "356", "name": "status", "type": { "id": "status_submission", @@ -4403,7 +4470,7 @@ "comments": "" }, { - "id": "352", + "id": "357", "name": "reviewed_by", "type": { "id": "uuid", @@ -4415,7 +4482,7 @@ "createdAt": 1777362758238 }, { - "id": "353", + "id": "358", "name": "reviewed_at", "type": { "id": "timestamp", @@ -4427,7 +4494,7 @@ "createdAt": 1777363627973 }, { - "id": "354", + "id": "359", "name": "reason", "type": { "id": "text", @@ -4439,7 +4506,7 @@ "createdAt": 1777363674757 }, { - "id": "355", + "id": "360", "name": "created_at", "type": { "id": "timestamp", @@ -4454,11 +4521,11 @@ ], "indexes": [ { - "id": "356", + "id": "361", "name": "", "unique": true, "fieldIds": [ - "348" + "353" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -4472,14 +4539,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "357", + "id": "362", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "358", + "id": "363", "name": "id", "type": { "id": "uuid", @@ -4491,7 +4558,7 @@ "createdAt": 1777282589092 }, { - "id": "359", + "id": "364", "name": "url", "type": { "id": "varchar", @@ -4504,7 +4571,7 @@ "characterMaximumLength": "255" }, { - "id": "360", + "id": "365", "name": "embed_url", "type": { "id": "varchar", @@ -4517,7 +4584,7 @@ "characterMaximumLength": "255" }, { - "id": "361", + "id": "366", "name": "small_image_url", "type": { "id": "varchar", @@ -4530,7 +4597,7 @@ "characterMaximumLength": "255" }, { - "id": "362", + "id": "367", "name": "medium_image_url", "type": { "id": "varchar", @@ -4543,7 +4610,7 @@ "characterMaximumLength": "255" }, { - "id": "363", + "id": "368", "name": "large_image_url", "type": { "id": "varchar", @@ -4556,7 +4623,7 @@ "characterMaximumLength": "255" }, { - "id": "364", + "id": "369", "name": "maximum_image_url", "type": { "id": "varchar", @@ -4571,11 +4638,11 @@ ], "indexes": [ { - "id": "365", + "id": "370", "name": "", "unique": true, "fieldIds": [ - "358" + "363" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4588,14 +4655,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "366", + "id": "371", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "367", + "id": "372", "name": "id", "type": { "id": "uuid", @@ -4607,7 +4674,7 @@ "createdAt": 1777282589093 }, { - "id": "368", + "id": "373", "name": "name", "type": { "id": "varchar", @@ -4622,11 +4689,11 @@ ], "indexes": [ { - "id": "369", + "id": "374", "name": "", "unique": true, "fieldIds": [ - "367" + "372" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4639,13 +4706,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "370", + "id": "375", "name": "user_follows", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "371", + "id": "376", "name": "follower_id", "type": { "id": "uuid", @@ -4657,7 +4724,7 @@ "createdAt": 1778401701334 }, { - "id": "372", + "id": "377", "name": "following_id", "type": { "id": "uuid", @@ -4669,7 +4736,7 @@ "createdAt": 1778401722682 }, { - "id": "373", + "id": "378", "name": "followed_at", "type": { "id": "timestamp", @@ -4683,11 +4750,11 @@ ], "indexes": [ { - "id": "374", + "id": "379", "name": "index_1", "fieldIds": [ - "372", - "371" + "377", + "376" ], "unique": true, "createdAt": 1778401874053 @@ -4709,14 +4776,14 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "375", + "id": "380", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "376", + "id": "381", "name": "media_id", "type": { "id": "uuid", @@ -4728,7 +4795,7 @@ "createdAt": 1777295294621 }, { - "id": "377", + "id": "382", "name": "genre_id", "type": { "id": "uuid", @@ -4742,12 +4809,12 @@ ], "indexes": [ { - "id": "378", + "id": "383", "name": "", "unique": true, "fieldIds": [ - "376", - "377" + "381", + "382" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -4761,13 +4828,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "379", + "id": "384", "name": "comment_likes", "x": -1435.9285690968027, "y": 209.11179406446968, "fields": [ { - "id": "380", + "id": "385", "name": "user_id", "type": { "id": "uuid", @@ -4779,7 +4846,7 @@ "createdAt": 1778808096764 }, { - "id": "381", + "id": "386", "name": "comment_id", "type": { "id": "uuid", @@ -4791,7 +4858,7 @@ "createdAt": 1778808185625 }, { - "id": "382", + "id": "387", "name": "type", "type": { "id": "like_type", @@ -4803,7 +4870,7 @@ "createdAt": 1778808192863 }, { - "id": "383", + "id": "388", "name": "created_at", "type": { "id": "timestamp", @@ -4817,11 +4884,11 @@ ], "indexes": [ { - "id": "384", + "id": "389", "name": "index_1", "fieldIds": [ - "381", - "380" + "386", + "385" ], "unique": true, "createdAt": 1778808299354 @@ -4834,13 +4901,13 @@ "schema": "public" }, { - "id": "385", + "id": "390", "name": "user_sessions", "x": -1381.9054198604924, "y": -1329.3058623634636, "fields": [ { - "id": "386", + "id": "391", "name": "id", "type": { "id": "uuid", @@ -4852,7 +4919,7 @@ "createdAt": 1778814742487 }, { - "id": "387", + "id": "392", "name": "user_id", "type": { "id": "uuid", @@ -4864,7 +4931,7 @@ "createdAt": 1778814761364 }, { - "id": "388", + "id": "393", "name": "device_type", "type": { "id": "device_type", @@ -4876,7 +4943,7 @@ "createdAt": 1778814807191 }, { - "id": "389", + "id": "394", "name": "os_type", "type": { "id": "varchar", @@ -4888,7 +4955,7 @@ "createdAt": 1778814771991 }, { - "id": "390", + "id": "395", "name": "os_version", "type": { "id": "varchar", @@ -4900,7 +4967,7 @@ "createdAt": 1778814781826 }, { - "id": "391", + "id": "396", "name": "browser_name", "type": { "id": "varchar", @@ -4912,7 +4979,7 @@ "createdAt": 1778814787821 }, { - "id": "392", + "id": "397", "name": "browser_version", "type": { "id": "varchar", @@ -4924,7 +4991,7 @@ "createdAt": 1778814794245 }, { - "id": "393", + "id": "398", "name": "ip_login", "type": { "id": "inet", @@ -4936,7 +5003,7 @@ "createdAt": 1778814801981 }, { - "id": "394", + "id": "399", "name": "last_activity_at", "type": { "id": "timestamp", @@ -4948,7 +5015,7 @@ "createdAt": 1778814857539 }, { - "id": "395", + "id": "400", "name": "login_at", "type": { "id": "timestamp", @@ -4960,7 +5027,7 @@ "createdAt": 1778814816604 }, { - "id": "396", + "id": "401", "name": "logout_at", "type": { "id": "timestamp", @@ -4974,10 +5041,10 @@ ], "indexes": [ { - "id": "397", + "id": "402", "name": "", "fieldIds": [ - "386" + "391" ], "unique": true, "isPrimaryKey": true, @@ -4992,13 +5059,13 @@ "expanded": true }, { - "id": "398", + "id": "403", "name": "user_addresses", - "x": 656.4651961039559, - "y": -1010.0698801871713, + "x": 655.2842034425264, + "y": -1010.0698801871714, "fields": [ { - "id": "399", + "id": "404", "name": "user_id", "type": { "id": "uuid", @@ -5010,7 +5077,7 @@ "createdAt": 1778816506150 }, { - "id": "400", + "id": "405", "name": "street_address", "type": { "id": "varchar", @@ -5019,10 +5086,11 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778816542685 + "createdAt": 1778816542685, + "characterMaximumLength": "255" }, { - "id": "401", + "id": "406", "name": "district", "type": { "id": "varchar", @@ -5031,10 +5099,11 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778816551994 + "createdAt": 1778816551994, + "characterMaximumLength": "100" }, { - "id": "402", + "id": "407", "name": "city", "type": { "id": "varchar", @@ -5043,10 +5112,11 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778816560720 + "createdAt": 1778816560720, + "characterMaximumLength": "100" }, { - "id": "403", + "id": "408", "name": "province", "type": { "id": "varchar", @@ -5055,10 +5125,11 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778816564935 + "createdAt": 1778816564935, + "characterMaximumLength": "100" }, { - "id": "404", + "id": "409", "name": "postal_code", "type": { "id": "varchar", @@ -5067,10 +5138,11 @@ "unique": false, "nullable": false, "primaryKey": false, - "createdAt": 1778816568904 + "createdAt": 1778816568904, + "characterMaximumLength": "20" }, { - "id": "405", + "id": "410", "name": "coordinate", "type": { "id": "varchar", @@ -5079,10 +5151,11 @@ "unique": false, "nullable": true, "primaryKey": false, - "createdAt": 1778816577336 + "createdAt": 1778816577336, + "characterMaximumLength": "50" }, { - "id": "406", + "id": "411", "name": "updated_at", "type": { "id": "timestamp", @@ -5096,10 +5169,10 @@ ], "indexes": [ { - "id": "407", + "id": "412", "name": "", "fieldIds": [ - "399" + "404" ], "unique": true, "isPrimaryKey": true, @@ -5115,13 +5188,13 @@ ], "relationships": [ { - "id": "408", + "id": "413", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "292", + "sourceTableId": "297", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "293", + "sourceFieldId": "298", "targetFieldId": "138", "sourceCardinality": "one", "targetCardinality": "many", @@ -5129,13 +5202,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "409", + "id": "414", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "141", "sourceCardinality": "one", "targetCardinality": "many", @@ -5143,13 +5216,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "410", + "id": "415", "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "136", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "139", "sourceCardinality": "one", "targetCardinality": "many", @@ -5157,7 +5230,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "412", + "id": "417", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", "sourceTableId": "209", @@ -5171,13 +5244,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "413", + "id": "418", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "118", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "121", "sourceCardinality": "one", "targetCardinality": "many", @@ -5185,35 +5258,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "415", + "id": "420", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", "sourceTableId": "209", "targetSchema": "public", - "targetTableId": "276", + "targetTableId": "281", "sourceFieldId": "210", - "targetFieldId": "279", + "targetFieldId": "284", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777586444, "diagramId": "yqwsqwccoj6v" }, { - "id": "416", + "id": "421", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "276", - "sourceFieldId": "247", - "targetFieldId": "278", + "targetTableId": "281", + "sourceFieldId": "252", + "targetFieldId": "283", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777570446, "diagramId": "yqwsqwccoj6v" }, { - "id": "417", + "id": "422", "name": "comments_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -5227,13 +5300,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "418", + "id": "423", "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "209", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "211", "sourceCardinality": "one", "targetCardinality": "many", @@ -5241,7 +5314,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "419", + "id": "424", "name": "episodes_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "5", @@ -5255,7 +5328,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "420", + "id": "425", "name": "episodes_videos_videos_id", "sourceSchema": "public", "sourceTableId": "5", @@ -5269,13 +5342,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "421", + "id": "426", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "285", + "sourceTableId": "290", "targetSchema": "public", "targetTableId": "198", - "sourceFieldId": "286", + "sourceFieldId": "291", "targetFieldId": "200", "sourceCardinality": "one", "targetCardinality": "many", @@ -5283,7 +5356,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "422", + "id": "427", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5297,49 +5370,49 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "423", + "id": "428", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "285", + "sourceTableId": "290", "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "286", - "targetFieldId": "377", + "targetTableId": "380", + "sourceFieldId": "291", + "targetFieldId": "382", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "yqwsqwccoj6v" }, { - "id": "424", + "id": "429", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "237", - "sourceFieldId": "247", - "targetFieldId": "240", + "targetTableId": "242", + "sourceFieldId": "252", + "targetFieldId": "245", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771806907, "diagramId": "yqwsqwccoj6v" }, { - "id": "425", + "id": "430", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "237", + "targetTableId": "242", "sourceFieldId": "38", - "targetFieldId": "239", + "targetFieldId": "244", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771781222, "diagramId": "yqwsqwccoj6v" }, { - "id": "426", + "id": "431", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "125", @@ -5353,27 +5426,27 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "427", + "id": "432", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "300", + "targetTableId": "305", "sourceFieldId": "129", - "targetFieldId": "301", + "targetFieldId": "306", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "428", + "id": "433", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "203", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "206", "sourceCardinality": "one", "targetCardinality": "many", @@ -5381,13 +5454,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "429", + "id": "434", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "292", + "sourceTableId": "297", "targetSchema": "public", "targetTableId": "203", - "sourceFieldId": "293", + "sourceFieldId": "298", "targetFieldId": "204", "sourceCardinality": "one", "targetCardinality": "many", @@ -5395,13 +5468,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "430", + "id": "435", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "285", + "sourceTableId": "290", "targetSchema": "public", "targetTableId": "152", - "sourceFieldId": "286", + "sourceFieldId": "291", "targetFieldId": "154", "sourceCardinality": "one", "targetCardinality": "many", @@ -5409,7 +5482,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "431", + "id": "436", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5423,7 +5496,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "432", + "id": "437", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5437,7 +5510,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "433", + "id": "438", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "156", @@ -5451,35 +5524,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "434", + "id": "439", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "285", + "sourceTableId": "290", "targetSchema": "public", - "targetTableId": "315", - "sourceFieldId": "286", - "targetFieldId": "317", + "targetTableId": "320", + "sourceFieldId": "291", + "targetFieldId": "322", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "yqwsqwccoj6v" }, { - "id": "435", + "id": "440", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "315", + "targetTableId": "320", "sourceFieldId": "68", - "targetFieldId": "316", + "targetFieldId": "321", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "yqwsqwccoj6v" }, { - "id": "436", + "id": "441", "name": "media_producers_producer_id_fk", "sourceSchema": "public", "sourceTableId": "166", @@ -5493,7 +5566,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "437", + "id": "442", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5507,7 +5580,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "438", + "id": "443", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5521,7 +5594,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "439", + "id": "444", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "83", @@ -5535,7 +5608,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "440", + "id": "445", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "83", @@ -5549,13 +5622,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "441", + "id": "446", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "337", + "sourceTableId": "342", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "339", + "sourceFieldId": "344", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "many", @@ -5563,13 +5636,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "442", + "id": "447", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "337", + "sourceTableId": "342", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "339", + "sourceFieldId": "344", "targetFieldId": "38", "sourceCardinality": "one", "targetCardinality": "one", @@ -5577,13 +5650,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "443", + "id": "448", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "366", + "sourceTableId": "371", "targetSchema": "public", "targetTableId": "37", - "sourceFieldId": "367", + "sourceFieldId": "372", "targetFieldId": "49", "sourceCardinality": "one", "targetCardinality": "many", @@ -5591,7 +5664,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "444", + "id": "449", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5605,7 +5678,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "445", + "id": "450", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5619,7 +5692,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "446", + "id": "451", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5633,7 +5706,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "447", + "id": "452", "name": "medias_episodes_episodes_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5647,7 +5720,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "448", + "id": "453", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5661,7 +5734,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "449", + "id": "454", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5675,21 +5748,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "450", + "id": "455", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "272", + "targetTableId": "277", "sourceFieldId": "66", - "targetFieldId": "273", + "targetFieldId": "278", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "yqwsqwccoj6v" }, { - "id": "451", + "id": "456", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5703,7 +5776,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "452", + "id": "457", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5717,7 +5790,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "453", + "id": "458", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5731,7 +5804,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "454", + "id": "459", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "37", @@ -5745,83 +5818,83 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "455", + "id": "460", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "268", + "targetTableId": "273", "sourceFieldId": "67", - "targetFieldId": "269", + "targetFieldId": "274", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "yqwsqwccoj6v" }, { - "id": "456", + "id": "461", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "375", + "targetTableId": "380", "sourceFieldId": "71", - "targetFieldId": "376", + "targetFieldId": "381", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "yqwsqwccoj6v" }, { - "id": "457", + "id": "462", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "357", + "targetTableId": "362", "sourceFieldId": "44", - "targetFieldId": "358", + "targetFieldId": "363", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "458", + "id": "463", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "272", + "targetTableId": "277", "sourceFieldId": "167", - "targetFieldId": "274", + "targetFieldId": "279", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "yqwsqwccoj6v" }, { - "id": "459", + "id": "464", "name": "producers_id_fk", "sourceSchema": "public", "sourceTableId": "166", "targetSchema": "public", - "targetTableId": "268", + "targetTableId": "273", "sourceFieldId": "167", - "targetFieldId": "270", + "targetFieldId": "275", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "yqwsqwccoj6v" }, { - "id": "460", + "id": "465", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "131", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "132", "sourceCardinality": "one", "targetCardinality": "many", @@ -5829,13 +5902,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "461", + "id": "466", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "131", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "133", "sourceCardinality": "one", "targetCardinality": "many", @@ -5843,7 +5916,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "462", + "id": "467", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "113", @@ -5857,7 +5930,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "463", + "id": "468", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5871,7 +5944,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "466", + "id": "471", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "144", @@ -5885,7 +5958,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "467", + "id": "472", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", @@ -5899,49 +5972,35 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "468", + "id": "473", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "370", - "sourceFieldId": "247", - "targetFieldId": "371", + "targetTableId": "375", + "sourceFieldId": "252", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "yqwsqwccoj6v" }, { - "id": "469", + "id": "474", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "370", - "sourceFieldId": "247", - "targetFieldId": "372", + "targetTableId": "375", + "sourceFieldId": "252", + "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "yqwsqwccoj6v" }, { - "id": "470", - "name": "user_oauth_credentials_id_fk", - "sourceSchema": "public", - "sourceTableId": "246", - "targetSchema": "public", - "targetTableId": "218", - "sourceFieldId": "247", - "targetFieldId": "219", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778516921506, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "471", + "id": "475", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "24", @@ -5955,21 +6014,21 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "474", + "id": "478", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "182", "targetSchema": "public", - "targetTableId": "246", + "targetTableId": "251", "sourceFieldId": "183", - "targetFieldId": "247", + "targetFieldId": "252", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "yqwsqwccoj6v" }, { - "id": "475", + "id": "479", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", "sourceTableId": "5", @@ -5983,13 +6042,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "476", + "id": "480", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "177", - "sourceFieldId": "247", + "sourceFieldId": "252", "targetFieldId": "178", "sourceCardinality": "one", "targetCardinality": "many", @@ -5997,13 +6056,13 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "477", + "id": "481", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", "targetTableId": "144", - "sourceFieldId": "258", + "sourceFieldId": "263", "targetFieldId": "145", "sourceCardinality": "one", "targetCardinality": "one", @@ -6011,55 +6070,55 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "478", + "id": "482", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "347", + "sourceTableId": "352", "targetSchema": "public", - "targetTableId": "320", - "sourceFieldId": "349", - "targetFieldId": "321", + "targetTableId": "325", + "sourceFieldId": "354", + "targetFieldId": "326", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "yqwsqwccoj6v" }, { - "id": "479", + "id": "483", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "305", - "sourceFieldId": "247", - "targetFieldId": "308", + "targetTableId": "310", + "sourceFieldId": "252", + "targetFieldId": "313", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "yqwsqwccoj6v" }, { - "id": "480", + "id": "484", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "305", - "sourceFieldId": "247", - "targetFieldId": "309", + "targetTableId": "310", + "sourceFieldId": "252", + "targetFieldId": "314", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "yqwsqwccoj6v" }, { - "id": "481", + "id": "485", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "305", + "sourceTableId": "310", "targetSchema": "public", "targetTableId": "92", - "sourceFieldId": "307", + "sourceFieldId": "312", "targetFieldId": "93", "sourceCardinality": "one", "targetCardinality": "one", @@ -6067,91 +6126,104 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "482", + "id": "486", "name": "videos_service_id_video_services_id", "sourceSchema": "public", "sourceTableId": "92", "targetSchema": "public", - "targetTableId": "320", + "targetTableId": "325", "sourceFieldId": "94", - "targetFieldId": "321", + "targetFieldId": "326", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "yqwsqwccoj6v" }, { - "id": "483", + "id": "487", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "300", + "sourceTableId": "305", "targetSchema": "public", - "targetTableId": "227", - "sourceFieldId": "303", - "targetFieldId": "228", + "targetTableId": "232", + "sourceFieldId": "308", + "targetFieldId": "233", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "yqwsqwccoj6v" }, { - "id": "484", + "id": "488", "name": "comment_likes_user_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "379", + "targetTableId": "384", "sourceFieldId": "38", - "targetFieldId": "380", + "targetFieldId": "385", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808338630 }, { - "id": "485", + "id": "489", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", "sourceTableId": "209", "targetSchema": "public", - "targetTableId": "379", + "targetTableId": "384", "sourceFieldId": "210", - "targetFieldId": "381", + "targetFieldId": "386", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916 }, { - "id": "486", + "id": "490", "name": "user_sessions_user_id_fk", "sourceSchema": "public", - "sourceTableId": "246", + "sourceTableId": "251", "targetSchema": "public", - "targetTableId": "385", - "sourceFieldId": "247", - "targetFieldId": "387", + "targetTableId": "390", + "sourceFieldId": "252", + "targetFieldId": "392", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778815073839 }, { - "id": "487", + "id": "491", "name": "user_addresses_user_id_fk", "sourceSchema": "public", - "sourceTableId": "398", + "sourceTableId": "403", "targetSchema": "public", - "targetTableId": "246", - "sourceFieldId": "399", - "targetFieldId": "247", + "targetTableId": "251", + "sourceFieldId": "404", + "targetFieldId": "252", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778816615538 + }, + { + "id": "492", + "name": "user_oauth_credentials_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "251", + "targetSchema": "public", + "targetTableId": "218", + "sourceFieldId": "252", + "targetFieldId": "220", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778822260934 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "488", + "id": "493", "name": "audit_action", "kind": "enum", "values": [ @@ -6164,7 +6236,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "489", + "id": "494", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6177,7 +6249,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "490", + "id": "495", "name": "privacy_level", "kind": "enum", "values": [ @@ -6189,7 +6261,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "491", + "id": "496", "name": "status_submission", "kind": "enum", "values": [ @@ -6201,7 +6273,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "492", + "id": "497", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6212,7 +6284,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "493", + "id": "498", "name": "user_role", "kind": "enum", "values": [ @@ -6225,7 +6297,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "494", + "id": "499", "name": "user_sex", "kind": "enum", "values": [ @@ -6236,7 +6308,7 @@ "diagramId": "yqwsqwccoj6v" }, { - "id": "495", + "id": "500", "name": "like_type", "kind": "enum", "values": [ @@ -6246,7 +6318,7 @@ "fields": [] }, { - "id": "496", + "id": "501", "name": "device_type", "kind": "enum", "values": [ @@ -6256,6 +6328,16 @@ "unknown" ], "fields": [] + }, + { + "id": "502", + "name": "oauth_provider", + "kind": "enum", + "values": [ + "google", + "github" + ], + "fields": [] } ], "notes": [] From 21b3a7011f747db8b5f86e0fe322f607732a89a7 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 9 May 2026 21:00:00 +0700 Subject: [PATCH 18/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20user?= =?UTF-8?q?=20preference=20and=20session=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 112 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 98 insertions(+), 14 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 4b49296..b730ff8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -20,8 +20,20 @@ enum user_sex { male female } - - +enum auth_provider { + google + github +} +enum device_type { + mobile + tablet + desktop + unknown +} +enum user_preference_state { + exclude + include +} model User { id String @id @db.Uuid @default(uuid(7)) @@ -44,10 +56,59 @@ model User { updated_at DateTime @updatedAt @db.Timestamptz() deleted_at DateTime? @db.Timestamptz() - countryId String? @db.Uuid + countryId String? @db.Uuid + oauth_accounts UserOauthAccounts[] + sessions UserSession[] @@map("users") } +model UserAddress { + user_id String @id @db.Uuid + address String @db.VarChar(255) + district String @db.VarChar(100) + city String @db.VarChar(100) + province String @db.VarChar(100) + postal_code String @db.VarChar(20) + coordinate String? @db.VarChar(50) + updated_at DateTime @updatedAt @db.Timestamptz() + + user User @relation(fields: [user_id], references: [id]) + @@map("user_addresses") +} + +model UserOauthAccounts { + id String @id @db.Uuid @default(uuid(7)) + user User @relation(fields: [user_id], references: [id]) + provider_name auth_provider + provider_sub String? @db.VarChar(255) + provider_email String? @db.VarChar(255) + provider_token String? @db.VarChar(255) + refresh_token String? @db.VarChar(255) + expires_at DateTime? @db.Timestamptz() + last_login DateTime @default(now()) @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + + user_id String @db.Uuid + @@map("user_oauth_accounts") +} + +model UserSession { + id String @id @db.Uuid @default(uuid(7)) + user User @relation(fields: [user_id], references: [id]) + device_type device_type + os_type String? @db.VarChar(50) + os_version String? @db.VarChar(50) + browser_name String? @db.VarChar(50) + browser_version String? @db.VarChar(50) + ip_login String? @db.Inet() + login_at DateTime @default(now()) @db.Timestamptz() + logout_at DateTime? @db.Timestamptz() + + user_id String @db.Uuid + @@map("user_sessions") +} + model UserPreference { user_id String @id @db.Uuid // char_as_partner @@ -65,21 +126,43 @@ model UserPreference { enable_security_alerts Boolean @default(true) user User @relation(fields: [user_id], references: [id]) + genre_preferences UserGenrePreference[] + rating_preferences UserRatingPreference[] + country_preferences UserCountryPreference[] @@map("user_preferences") } -model UserAddress { - user_id String @id @db.Uuid - address String @db.VarChar(255) - district String @db.VarChar(100) - city String @db.VarChar(100) - province String @db.VarChar(100) - postal_code String @db.VarChar(20) - coordinate String? @db.VarChar(50) - updated_at DateTime @updatedAt @db.Timestamptz() +model UserGenrePreference { + user UserPreference @relation(fields: [user_id], references: [user_id]) + // genre Genre @relation(fields: [genre_id], references: [id]) + state user_preference_state - user User @relation(fields: [user_id], references: [id]) - @@map("user_addresses") + user_id String @db.Uuid + genre_id String @db.Uuid + @@id([user_id, genre_id]) + @@map("user_genre_preferences") +} + +model UserRatingPreference { + user UserPreference @relation(fields: [user_id], references: [user_id]) + // rating Rating @relation(fields: [rating_id], references: [id]) + state user_preference_state + + user_id String @db.Uuid + rating_id String @db.Uuid + @@id([user_id, rating_id]) + @@map("user_rating_preferences") +} + +model UserCountryPreference { + user UserPreference @relation(fields: [user_id], references: [user_id]) + country Country @relation(fields: [country_id], references: [id]) + state user_preference_state + + user_id String @db.Uuid + country_id String @db.Uuid + @@id([user_id, country_id]) + @@map("user_country_preferences") } model Country { @@ -91,5 +174,6 @@ model Country { banner String? @db.VarChar(255) UserCountry User[] @relation("UserCountry") + UserCountryPreference UserCountryPreference[] @@map("countries") } \ No newline at end of file From f8b63184a34290e54ca91808cafc1ad5e487010b Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 10 May 2026 21:00:00 +0700 Subject: [PATCH 19/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20follo?= =?UTF-8?q?wing=20and=20provision=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b730ff8..7858504 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -56,9 +56,13 @@ model User { updated_at DateTime @updatedAt @db.Timestamptz() deleted_at DateTime? @db.Timestamptz() - countryId String? @db.Uuid - oauth_accounts UserOauthAccounts[] - sessions UserSession[] + countryId String? @db.Uuid + oauth_accounts UserOauthAccounts[] + sessions UserSession[] + followers UserFollow[] @relation("UserFollowFollowing") + following UserFollow[] @relation("UserFollowFollower") + provisioned_as_admin ProvisionedUser[] @relation("ProvisionedUserAdmin") + provisioned_as_user ProvisionedUser[] @relation("ProvisionedUserUser") @@map("users") } @@ -165,6 +169,29 @@ model UserCountryPreference { @@map("user_country_preferences") } +model UserFollow { + follower User @relation("UserFollowFollower", fields: [follower_id], references: [id]) + following User @relation("UserFollowFollowing", fields: [following_id], references: [id]) + created_at DateTime @default(now()) @db.Timestamptz() + + follower_id String @db.Uuid + following_id String @db.Uuid + @@id([follower_id, following_id]) + @@map("user_follows") +} + +model ProvisionedUser { + provisioned_by User @relation(fields: [admin_id], references: [id], name: "ProvisionedUserAdmin") + provisioned_to User @relation(fields: [user_id], references: [id], name: "ProvisionedUserUser") + provisioned_at DateTime @default(now()) @db.Timestamptz() + reason String? @db.VarChar(255) + + admin_id String @db.Uuid + user_id String @db.Uuid + @@id([admin_id, user_id]) + @@map("provisioned_users") +} + model Country { id String @id @db.Uuid @default(uuid(7)) name String @db.VarChar(155) From 6f7a40cfd95226557ec4407a6966666cebced21b Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 11 May 2026 21:00:00 +0700 Subject: [PATCH 20/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20media?= =?UTF-8?q?=20and=20related=20support=20schemas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/dbml/schema.dbml | 55 ++++++++------- prisma/schema.prisma | 149 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 179 insertions(+), 25 deletions(-) diff --git a/prisma/dbml/schema.dbml b/prisma/dbml/schema.dbml index 82b6762..0d70e09 100644 --- a/prisma/dbml/schema.dbml +++ b/prisma/dbml/schema.dbml @@ -53,6 +53,11 @@ Enum "device_type" { "unknown" } +Enum "oauth_provider" { + "google" + "github" +} + Table "public"."user_rating_preferences" { "user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"] "rating_id" uuid [not null, ref: > "public"."media_age_ratings"."id"] @@ -99,7 +104,7 @@ Table "public"."medias" { "title" varchar(255) [not null] "title_secondary" varchar(255) "title_original" varchar(255) - "title_synonyms" varchar(255) [note: 'This is Array'] + "title_synonyms" varchar(255)[] "trailers" uuid "synopsis" text [not null] "small_image_url" varchar(255) @@ -205,7 +210,7 @@ Table "public"."provisioned_users" { "provisioned_by" uuid [unique, not null, ref: > "public"."users"."id"] "provisioned_to" uuid [not null, ref: > "public"."users"."id"] "provisioned_at" timestamp [not null] - "reason" bigint + "reason" varchar(255) } Table "public"."collection_members" { @@ -319,16 +324,21 @@ Table "public"."comments" { "deleted_at" timestamp } -Table "public"."user_oauth_credentials" { - "id" uuid [pk, not null, ref: > "public"."users"."id"] - "user_id" uuid [not null] - "oauth_id" uuid [not null] - "provider_token" varchar(500) - "provider_sub" varchar(500) - "last_action" timestamp [not null] +Table "public"."user_oauth_accounts" { + "id" uuid [pk, not null] + "user_id" uuid [not null, ref: > "public"."users"."id"] + "provider_name" oauth_provider [not null] + "provider_sub" varchar(255) + "provider_email" varchar(255) + "access_token" varchar(255) + "refresh_token" varchar(255) + "last_login" timestamptz [not null] + "expires_at" timestamptz + "created_at" timestamptz [not null] + "updated_at" timestamptz [not null] Indexes { - (oauth_id, user_id) [unique, name: "index_2"] + (user_id, provider_name) [unique, name: "index_2"] } } @@ -549,23 +559,22 @@ Table "public"."user_sessions" { "id" uuid [pk, not null] "user_id" uuid [not null, ref: > "public"."users"."id"] "device_type" device_type [not null] - "os_type" varchar(500) - "os_version" varchar(500) - "browser_name" varchar(500) - "browser_version" varchar(500) + "os_type" varchar(50) + "os_version" varchar(50) + "browser_name" varchar(50) + "browser_version" varchar(50) "ip_login" inet [not null] - "last_activity_at" timestamp - "login_at" timestamp [not null] - "logout_at" timestamp + "login_at" timestamptz [not null] + "logout_at" timestamptz } Table "public"."user_addresses" { "user_id" uuid [pk, not null] - "street_address" varchar(500) [not null] - "district" varchar(500) [not null] - "city" varchar(500) [not null] - "province" varchar(500) [not null] - "postal_code" varchar(500) [not null] - "coordinate" varchar(500) + "street_address" varchar(255) [not null] + "district" varchar(100) [not null] + "city" varchar(100) [not null] + "province" varchar(100) [not null] + "postal_code" varchar(20) [not null] + "coordinate" varchar(50) "updated_at" timestamp [not null] } diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 7858504..9d499bd 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,40 +1,73 @@ +/** + * This is the Prisma schema file for the application. It defines the data models, their relationships, and the database configuration. + * The schema is used by Prisma to generate the database migrations and the Prisma Client for querying the database. + */ + +/** + * ---------------------------------- + * Prisma Schema Configuration + * ---------------------------------- + */ generator client { provider = "prisma-client-js" } - generator dbml { provider = "prisma-dbml-generator" } - datasource db { provider = "postgresql" } + + +/** + * ---------------------------------- + * Enum Definitions + * ---------------------------------- + */ enum user_role { user contributor curator admin } + enum user_sex { male female } + enum auth_provider { google github } + enum device_type { mobile tablet desktop unknown } + enum user_preference_state { exclude include } +enum media_season { + winter + spring + summer + fall +} + + + +/** + * ---------------------------------- + * Model for User and related entities + * ---------------------------------- + */ model User { id String @id @db.Uuid @default(uuid(7)) email String @unique @@ -180,6 +213,117 @@ model UserFollow { @@map("user_follows") } + + +/** + * ---------------------------------- + * Model for Media and related entities + * ---------------------------------- + */ +model Media { + id String @id @db.Uuid @default(uuid(7)) + mal_id Int @unique + title String @db.VarChar(255) + title_secondary String? @db.VarChar(255) + title_original String? @db.VarChar(255) + title_synonyms String[] @db.VarChar(255) + trailer MediaTrailer? + synopsis String? @db.Text + small_image_url String? @db.VarChar(255) + medium_image_url String @db.VarChar(255) + large_image_url String? @db.VarChar(255) + type MediaType @relation(fields: [type_id], references: [id]) + source MediaSource? @relation(fields: [source_id], references: [id]) + status MediaStatus? @relation(fields: [status_id], references: [id]) + airing Boolean + start_airing DateTime? @db.Date + end_airing DateTime? @db.Date + age_rating MediaAgeRating? @relation(fields: [age_rating_id], references: [id]) + score Decimal? @db.Decimal(2, 2) + score_total Int @default(0) + score_count Int @default(0) + background String? @db.Text + season media_season + year Int? @db.SmallInt + country Country? @relation(fields: [country_id], references: [id]) + broadcast_day String? @db.VarChar(20) + // producers MediaProducer[] + // licensors MediaLicensor[] + // studios MediaStudio[] + // genres MediaGenre[] + // explicit_genres MediaExplicitGenre[] + // themes MediaTheme[] + // demographics MediaDemographic[] + // relations MediaRelation[] + // external_links MediaExternalLink[] + // characters MediaCharacter[] + // approved_by User? @relation(fields: [approver_id], references: [id]) + // approved_at Boolean @default(false) + // created_by User? @relation(fields: [created_by_id], references: [id]) + // created_at DateTime @default(now()) @db.Timestamptz() + // updated_by User? @relation(fields: [updated_by_id], references: [id]) + // deleted_at DateTime? @db.Timestamptz() + + + type_id String @db.Uuid + source_id String @db.Uuid + status_id String @db.Uuid + age_rating_id String? @db.Uuid + country_id String? @db.Uuid + @@map("medias") +} + +model MediaTrailer { + media_id String @id @db.Uuid + url String? @db.VarChar(255) + embed_url String? @db.VarChar(255) + small_image_url String? @db.VarChar(255) + large_image_url String? @db.VarChar(255) + maximum_image_url String? @db.VarChar(255) + + media Media @relation(fields: [media_id], references: [id]) + @@map("media_trailers") +} + +model MediaType { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(100) @unique + + Media Media[] + @@map("media_types") +} + +model MediaSource { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(100) @unique + + media Media[] + @@map("media_sources") +} + +model MediaStatus { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(100) @unique + + media Media[] + @@map("media_statuses") +} + +model MediaAgeRating { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(100) @unique + + media Media[] + @@map("media_age_ratings") +} + + + +/** + * ---------------------------------- + * Model for System Apps and related entities + * ---------------------------------- + */ model ProvisionedUser { provisioned_by User @relation(fields: [admin_id], references: [id], name: "ProvisionedUserAdmin") provisioned_to User @relation(fields: [user_id], references: [id], name: "ProvisionedUserUser") @@ -202,5 +346,6 @@ model Country { UserCountry User[] @relation("UserCountry") UserCountryPreference UserCountryPreference[] + Media Media[] @@map("countries") } \ No newline at end of file From 529a7db1a952a749915143e6fa7129ce404ea68f Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 12 May 2026 21:00:00 +0700 Subject: [PATCH 21/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20produ?= =?UTF-8?q?cer=20schema=20and=20media=20relation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 57 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 9d499bd..a365505 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -96,6 +96,7 @@ model User { following UserFollow[] @relation("UserFollowFollower") provisioned_as_admin ProvisionedUser[] @relation("ProvisionedUserAdmin") provisioned_as_user ProvisionedUser[] @relation("ProvisionedUserUser") + created_producers Producer[] @@map("users") } @@ -247,14 +248,14 @@ model Media { year Int? @db.SmallInt country Country? @relation(fields: [country_id], references: [id]) broadcast_day String? @db.VarChar(20) - // producers MediaProducer[] - // licensors MediaLicensor[] - // studios MediaStudio[] + producers MediaProducer[] + licensors MediaLicensor[] + studios MediaStudio[] // genres MediaGenre[] // explicit_genres MediaExplicitGenre[] // themes MediaTheme[] // demographics MediaDemographic[] - // relations MediaRelation[] + // relations MediaRelation[] // external_links MediaExternalLink[] // characters MediaCharacter[] // approved_by User? @relation(fields: [approver_id], references: [id]) @@ -317,6 +318,54 @@ model MediaAgeRating { @@map("media_age_ratings") } +model MediaProducer { + media Media @relation(fields: [media_id], references: [id]) + producer Producer @relation(fields: [producer_id], references: [id]) + + media_id String @db.Uuid + producer_id String @db.Uuid + @@id([media_id, producer_id]) + @@map("media_producers") +} + +model MediaLicensor { + media Media @relation(fields: [media_id], references: [id]) + licensor Producer @relation(fields: [licensor_id], references: [id]) + + media_id String @db.Uuid + licensor_id String @db.Uuid + @@id([media_id, licensor_id]) + @@map("media_licensors") +} + +model MediaStudio { + media Media @relation(fields: [media_id], references: [id]) + studio Producer @relation(fields: [studio_id], references: [id]) + + media_id String @db.Uuid + studio_id String @db.Uuid + @@id([media_id, studio_id]) + @@map("media_studios") +} + +model Producer { + id String @id @db.Uuid @default(uuid(7)) + mal_id Int @unique + type String @db.VarChar(24) + name String @db.VarChar(255) + url String? @db.VarChar(255) + created_by User @relation(fields: [created_by_id], references: [id]) + created_at DateTime @default(now()) @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + deleted_at DateTime? @db.Timestamptz() + created_by_id String @db.Uuid + + media_producers MediaProducer[] + media_licensors MediaLicensor[] + media_studios MediaStudio[] + @@map("producers") +} + /** From 1dd0bcd81139f5f590af31df06d70a81b1e51197 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Wed, 13 May 2026 21:00:00 +0700 Subject: [PATCH 22/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20editing=20genres?= =?UTF-8?q?=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 10162 +++++++++++++++++++++--------------------- 1 file changed, 5070 insertions(+), 5092 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 54cc191..742282d 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -1,70 +1,19 @@ { "id": "0", "name": "Main Diagram", - "createdAt": "2026-05-10T04:32:47.067Z", - "updatedAt": "2026-05-15T05:21:25.030Z", + "createdAt": "2026-05-19T16:28:02.086Z", + "updatedAt": "2026-05-19T16:37:21.649Z", "databaseType": "postgresql", "tables": [ { "id": "1", - "name": "user_rating_preferences", - "x": -1036.138591583759, - "y": -1328.817114710954, + "name": "characters", + "schema": "public", + "x": -1029.4414354197875, + "y": 693.766860683375, "fields": [ { "id": "2", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548671790 - }, - { - "id": "3", - "name": "rating_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548699069 - }, - { - "id": "4", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548704423 - } - ], - "indexes": [], - "color": "#4dee8a", - "createdAt": 1778548671790, - "isView": false, - "order": 32, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "5", - "name": "episodes", - "schema": "public", - "x": 196.42495741544377, - "y": 550.6255135491608, - "fields": [ - { - "id": "6", "name": "id", "type": { "id": "uuid", @@ -76,23 +25,50 @@ "createdAt": 1777282589093 }, { - "id": "7", - "name": "media_id", + "id": "3", + "name": "name", "type": { - "id": "uuid", - "name": "uuid" + "id": "varchar", + "name": "varchar" }, "primaryKey": false, "unique": false, "nullable": false, - "createdAt": 1777282589093 + "createdAt": 1777282589093, + "characterMaximumLength": "255" }, { - "id": "8", - "name": "episode", + "id": "4", + "name": "image", "type": { - "id": "smallint", - "name": "smallint" + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "5", + "name": "small_image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "6", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" }, "primaryKey": false, "unique": false, @@ -100,7 +76,7 @@ "createdAt": 1777282589093 }, { - "id": "9", + "id": "7", "name": "mal_url", "type": { "id": "varchar", @@ -112,134 +88,34 @@ "createdAt": 1777282589093, "characterMaximumLength": "255" }, + { + "id": "8", + "name": "liked", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "0" + }, + { + "id": "9", + "name": "connections", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "default": "0" + }, { "id": "10", - "name": "mal_forum_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "11", - "name": "title", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "characterMaximumLength": "155" - }, - { - "id": "12", - "name": "title_origin", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "155" - }, - { - "id": "13", - "name": "title_romanji", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "155" - }, - { - "id": "14", - "name": "aired", - "type": { - "id": "date", - "name": "date" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "15", - "name": "filler", - "type": { - "id": "boolean", - "name": "boolean" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "default": "false" - }, - { - "id": "16", - "name": "recap", - "type": { - "id": "boolean", - "name": "boolean" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "default": "false" - }, - { - "id": "17", - "name": "total_score", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777361135322 - }, - { - "id": "18", - "name": "scored_by", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777361233825 - }, - { - "id": "19", - "name": "videos", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "20", "name": "deleted_at", "type": { "id": "timestamp", @@ -251,7 +127,7 @@ "createdAt": 1777282589093 }, { - "id": "21", + "id": "11", "name": "updated_at", "type": { "id": "timestamp", @@ -263,7 +139,7 @@ "createdAt": 1777282589093 }, { - "id": "22", + "id": "12", "name": "created_at", "type": { "id": "timestamp", @@ -277,11 +153,11 @@ ], "indexes": [ { - "id": "23", + "id": "13", "name": "", "unique": true, "fieldIds": [ - "6" + "2" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -290,19 +166,235 @@ "color": "#ff9f74", "isView": false, "createdAt": 1777282589093, - "order": 9, + "order": 10, "expanded": true, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "24", - "name": "characters", + "id": "14", + "name": "media_genres", "schema": "public", - "x": -1038.1914354197875, - "y": 695.016860683375, + "x": -680.2926238134676, + "y": 498.7845736528544, "fields": [ + { + "id": "15", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1777283473368 + }, + { + "id": "16", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777283550230 + } + ], + "indexes": [ + { + "id": "17", + "name": "", + "unique": true, + "fieldIds": [ + "16" + ], + "createdAt": 1777283473368, + "isPrimaryKey": true + }, + { + "id": "18", + "name": "index_1", + "unique": true, + "fieldIds": [ + "15", + "16" + ], + "createdAt": 1778570545534 + } + ], + "checkConstraints": [], + "color": "#ffe374", + "isView": false, + "createdAt": 1777283473368, + "comments": "composite primary key = media_id + genre_id ", + "order": 18, + "diagramId": "3taaalng0ut0" + }, + { + "id": "19", + "name": "countries", + "schema": "public", + "x": -675.4825871206289, + "y": -936.5527418709639, + "fields": [ + { + "id": "20", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778401101216 + }, + { + "id": "21", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778401175441, + "characterMaximumLength": "155" + }, + { + "id": "22", + "name": "slug", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778401182473, + "characterMaximumLength": "165" + }, + { + "id": "23", + "name": "code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778401186425, + "characterMaximumLength": "3" + }, + { + "id": "24", + "name": "flag", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778401191401, + "characterMaximumLength": "255" + }, { "id": "25", + "name": "banner", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778401286123, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "26", + "name": "", + "unique": true, + "fieldIds": [ + "20" + ], + "createdAt": 1778401101216, + "isPrimaryKey": true + } + ], + "color": "#b067e9", + "isView": false, + "createdAt": 1778401101216, + "order": 27, + "diagramId": "3taaalng0ut0" + }, + { + "id": "27", + "name": "user_country_preferences", + "schema": "public", + "x": -1035.3700148414782, + "y": -1151.086340953631, + "fields": [ + { + "id": "28", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548950226 + }, + { + "id": "29", + "name": "country_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778548914423 + }, + { + "id": "30", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548957483 + } + ], + "indexes": [], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778548914423, + "order": 33, + "diagramId": "3taaalng0ut0" + }, + { + "id": "31", + "name": "media_characters", + "schema": "public", + "x": -679.8245105809615, + "y": 896.9123102253633, + "fields": [ + { + "id": "32", "name": "id", "type": { "id": "uuid", @@ -313,114 +405,25 @@ "nullable": false, "createdAt": 1777282589093 }, - { - "id": "26", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "27", - "name": "image", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "28", - "name": "small_image", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "29", - "name": "mal_id", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "30", - "name": "mal_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "31", - "name": "liked", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "default": "0" - }, - { - "id": "32", - "name": "connections", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "default": "0" - }, { "id": "33", - "name": "deleted_at", + "name": "role", "type": { - "id": "timestamp", - "name": "timestamp" + "id": "enum", + "name": "enum" }, "primaryKey": false, "unique": false, - "nullable": true, - "createdAt": 1777282589093 + "nullable": false, + "createdAt": 1777282589093, + "comments": "main, supporting" }, { "id": "34", - "name": "updated_at", + "name": "characters", "type": { - "id": "timestamp", - "name": "timestamp" + "id": "uuid", + "name": "uuid" }, "primaryKey": false, "unique": false, @@ -429,10 +432,10 @@ }, { "id": "35", - "name": "created_at", + "name": "voice_actor", "type": { - "id": "timestamp", - "name": "timestamp" + "id": "uuid", + "name": "uuid" }, "primaryKey": false, "unique": false, @@ -446,25 +449,24 @@ "name": "", "unique": true, "fieldIds": [ - "25" + "32" ], "createdAt": 1777282589093, "isPrimaryKey": true } ], - "color": "#ff9f74", + "color": "#ffe374", "isView": false, "createdAt": 1777282589093, - "order": 10, - "expanded": true, - "diagramId": "yqwsqwccoj6v" + "order": 8, + "diagramId": "3taaalng0ut0" }, { "id": "37", - "name": "medias", + "name": "media_submissions", "schema": "public", - "x": -338.2943640690703, - "y": -279.84862879126985, + "x": -677.2819917810897, + "y": -656.6674640748546, "fields": [ { "id": "38", @@ -476,10 +478,501 @@ "primaryKey": true, "unique": true, "nullable": false, - "createdAt": 1777282589092 + "createdAt": 1777362610195 }, { "id": "39", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "40", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "41", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "comments": "" + }, + { + "id": "42", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "43", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "44", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "45", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "46", + "name": "", + "unique": true, + "fieldIds": [ + "38" + ], + "createdAt": 1777362610195, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777362610195, + "order": 24, + "diagramId": "3taaalng0ut0" + }, + { + "id": "47", + "name": "home_media_banner", + "schema": "public", + "x": -1034.714934672103, + "y": -969.0938770634809, + "fields": [ + { + "id": "48", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778771594518 + }, + { + "id": "49", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778771625245 + }, + { + "id": "50", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778771632111 + }, + { + "id": "51", + "name": "priority", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": true, + "nullable": true, + "createdAt": 1778771638786 + }, + { + "id": "52", + "name": "start_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778771679920 + }, + { + "id": "53", + "name": "end_show", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778771687135 + }, + { + "id": "54", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778771693471 + } + ], + "indexes": [ + { + "id": "55", + "name": "", + "unique": true, + "fieldIds": [ + "48" + ], + "createdAt": 1778771594518, + "isPrimaryKey": true + } + ], + "color": "#b067e9", + "isView": false, + "createdAt": 1778771594518, + "order": 39, + "diagramId": "3taaalng0ut0" + }, + { + "id": "56", + "name": "media_external_links", + "schema": "public", + "x": 194.5066892978357, + "y": -264.72537027522213, + "fields": [ + { + "id": "57", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "58", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "59", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "64" + }, + { + "id": "60", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "61", + "name": "", + "unique": true, + "fieldIds": [ + "57" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 3, + "diagramId": "3taaalng0ut0" + }, + { + "id": "62", + "name": "user_addresses", + "schema": "public", + "x": 655.2842034425264, + "y": -1010.0698801871714, + "fields": [ + { + "id": "63", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778816506150 + }, + { + "id": "64", + "name": "street_address", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816542685, + "characterMaximumLength": "255" + }, + { + "id": "65", + "name": "district", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816551994, + "characterMaximumLength": "100" + }, + { + "id": "66", + "name": "city", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816560720, + "characterMaximumLength": "100" + }, + { + "id": "67", + "name": "province", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816564935, + "characterMaximumLength": "100" + }, + { + "id": "68", + "name": "postal_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816568904, + "characterMaximumLength": "20" + }, + { + "id": "69", + "name": "coordinate", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778816577336, + "characterMaximumLength": "50" + }, + { + "id": "70", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778816585545 + } + ], + "indexes": [ + { + "id": "71", + "name": "", + "unique": true, + "fieldIds": [ + "63" + ], + "createdAt": 1778816506150, + "isPrimaryKey": true + } + ], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778816506150, + "order": 45, + "diagramId": "3taaalng0ut0" + }, + { + "id": "72", + "name": "media_themes", + "schema": "public", + "x": -681.5109900103016, + "y": 752.8680228454149, + "fields": [ + { + "id": "73", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777295294621 + }, + { + "id": "74", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777295323224 + } + ], + "indexes": [ + { + "id": "75", + "name": "", + "unique": true, + "fieldIds": [ + "73", + "74" + ], + "createdAt": 1777295294621, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777295294621, + "width": 224, + "order": 20, + "diagramId": "3taaalng0ut0" + }, + { + "id": "76", + "name": "medias", + "schema": "public", + "x": -338.2943640690703, + "y": -279.84862879126985, + "fields": [ + { + "id": "77", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "78", "name": "mal_id", "type": { "id": "int", @@ -491,7 +984,7 @@ "createdAt": 1777282589092 }, { - "id": "40", + "id": "79", "name": "title", "type": { "id": "varchar", @@ -504,7 +997,7 @@ "characterMaximumLength": "255" }, { - "id": "41", + "id": "80", "name": "title_secondary", "type": { "id": "varchar", @@ -517,7 +1010,7 @@ "characterMaximumLength": "255" }, { - "id": "42", + "id": "81", "name": "title_original", "type": { "id": "varchar", @@ -530,7 +1023,7 @@ "characterMaximumLength": "255" }, { - "id": "43", + "id": "82", "name": "title_synonyms", "type": { "id": "varchar", @@ -539,12 +1032,13 @@ "primaryKey": false, "unique": false, "nullable": true, + "isArray": true, "createdAt": 1777282589092, "characterMaximumLength": "255", - "comments": "This is Array" + "comments": "" }, { - "id": "44", + "id": "83", "name": "trailers", "type": { "id": "uuid", @@ -556,7 +1050,7 @@ "createdAt": 1777282589092 }, { - "id": "45", + "id": "84", "name": "synopsis", "type": { "id": "text", @@ -568,7 +1062,7 @@ "createdAt": 1777282589092 }, { - "id": "46", + "id": "85", "name": "small_image_url", "type": { "id": "varchar", @@ -581,7 +1075,7 @@ "characterMaximumLength": "255" }, { - "id": "47", + "id": "86", "name": "medium_image_url", "type": { "id": "varchar", @@ -594,7 +1088,7 @@ "characterMaximumLength": "255" }, { - "id": "48", + "id": "87", "name": "large_image_url", "type": { "id": "varchar", @@ -607,7 +1101,7 @@ "characterMaximumLength": "255" }, { - "id": "49", + "id": "88", "name": "type", "type": { "id": "uuid", @@ -619,7 +1113,7 @@ "createdAt": 1777282589092 }, { - "id": "50", + "id": "89", "name": "source", "type": { "id": "uuid", @@ -631,7 +1125,7 @@ "createdAt": 1777282589092 }, { - "id": "51", + "id": "90", "name": "status", "type": { "id": "uuid", @@ -643,7 +1137,7 @@ "createdAt": 1777282589092 }, { - "id": "52", + "id": "91", "name": "airing", "type": { "id": "boolean", @@ -656,7 +1150,7 @@ "default": "false" }, { - "id": "53", + "id": "92", "name": "start_airing", "type": { "id": "date", @@ -668,7 +1162,7 @@ "createdAt": 1777282589092 }, { - "id": "54", + "id": "93", "name": "end_airing", "type": { "id": "date", @@ -680,7 +1174,7 @@ "createdAt": 1777282589092 }, { - "id": "55", + "id": "94", "name": "age_rating", "type": { "id": "uuid", @@ -692,22 +1186,7 @@ "createdAt": 1777282589092 }, { - "id": "56", - "name": "score", - "type": { - "id": "numeric", - "name": "numeric" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589092, - "precision": 2, - "scale": 2, - "default": "0" - }, - { - "id": "57", + "id": "95", "name": "score_total", "type": { "id": "int", @@ -720,8 +1199,8 @@ "default": "0" }, { - "id": "58", - "name": "scored_by", + "id": "96", + "name": "score_count", "type": { "id": "int", "name": "int" @@ -733,20 +1212,7 @@ "default": "0" }, { - "id": "59", - "name": "favourites", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589092, - "default": "0" - }, - { - "id": "60", + "id": "97", "name": "background", "type": { "id": "text", @@ -758,21 +1224,20 @@ "createdAt": 1777282589092 }, { - "id": "61", + "id": "98", "name": "season", "type": { - "id": "varchar", - "name": "varchar" + "id": "media_season", + "name": "media_season" }, "primaryKey": false, "unique": false, "nullable": false, "createdAt": 1777282589092, - "characterMaximumLength": "15", "comments": "enum(winter, spring, summer, fall)" }, { - "id": "62", + "id": "99", "name": "year", "type": { "id": "smallint", @@ -784,7 +1249,7 @@ "createdAt": 1777282589092 }, { - "id": "63", + "id": "100", "name": "country", "type": { "id": "uuid", @@ -796,7 +1261,7 @@ "createdAt": 1777635858846 }, { - "id": "64", + "id": "101", "name": "broadcast_date", "type": { "id": "varchar", @@ -809,7 +1274,7 @@ "characterMaximumLength": "64" }, { - "id": "65", + "id": "102", "name": "producers", "type": { "id": "uuid", @@ -821,7 +1286,7 @@ "createdAt": 1777282589092 }, { - "id": "66", + "id": "103", "name": "licensors", "type": { "id": "uuid", @@ -833,7 +1298,7 @@ "createdAt": 1777282589092 }, { - "id": "67", + "id": "104", "name": "studios", "type": { "id": "uuid", @@ -845,7 +1310,7 @@ "createdAt": 1777282589092 }, { - "id": "68", + "id": "105", "name": "genres", "type": { "id": "uuid", @@ -857,19 +1322,7 @@ "createdAt": 1777282589092 }, { - "id": "69", - "name": "episodes", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589092 - }, - { - "id": "70", + "id": "106", "name": "explicit_genres", "type": { "id": "uuid", @@ -881,7 +1334,7 @@ "createdAt": 1777282589092 }, { - "id": "71", + "id": "107", "name": "themes", "type": { "id": "uuid", @@ -893,7 +1346,7 @@ "createdAt": 1777282589092 }, { - "id": "72", + "id": "108", "name": "demographics", "type": { "id": "uuid", @@ -905,7 +1358,7 @@ "createdAt": 1777282589092 }, { - "id": "73", + "id": "109", "name": "relations", "type": { "id": "uuid", @@ -917,7 +1370,7 @@ "createdAt": 1777282589092 }, { - "id": "74", + "id": "110", "name": "external_links", "type": { "id": "uuid", @@ -929,7 +1382,7 @@ "createdAt": 1777282589092 }, { - "id": "75", + "id": "111", "name": "characters", "type": { "id": "uuid", @@ -941,7 +1394,7 @@ "createdAt": 1777282589092 }, { - "id": "76", + "id": "112", "name": "approved", "type": { "id": "boolean", @@ -954,7 +1407,7 @@ "default": "false" }, { - "id": "77", + "id": "113", "name": "approved_by", "type": { "id": "uuid", @@ -966,7 +1419,7 @@ "createdAt": 1777282589092 }, { - "id": "78", + "id": "114", "name": "created_by", "type": { "id": "uuid", @@ -978,7 +1431,7 @@ "createdAt": 1777282589092 }, { - "id": "79", + "id": "115", "name": "deleted_at", "type": { "id": "timestamp", @@ -990,7 +1443,7 @@ "createdAt": 1777282589092 }, { - "id": "80", + "id": "116", "name": "updated_at", "type": { "id": "timestamp", @@ -1002,7 +1455,7 @@ "createdAt": 1777282589092 }, { - "id": "81", + "id": "117", "name": "created_at", "type": { "id": "timestamp", @@ -1016,11 +1469,11 @@ ], "indexes": [ { - "id": "82", + "id": "118", "name": "", "unique": true, "fieldIds": [ - "38" + "77" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -1032,17 +1485,68 @@ "width": 337, "order": 0, "expanded": true, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "83", - "name": "media_relations", + "id": "119", + "name": "media_studios", "schema": "public", - "x": 194.39903094287618, - "y": -61.06914750749248, + "x": 194.57420294478976, + "y": 402.07246285824783, "fields": [ { - "id": "84", + "id": "120", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777360514222 + }, + { + "id": "121", + "name": "producer_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777360544975 + } + ], + "indexes": [ + { + "id": "122", + "name": "", + "unique": true, + "fieldIds": [ + "120", + "121" + ], + "createdAt": 1777360514222, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777360514222, + "order": 23, + "diagramId": "3taaalng0ut0" + }, + { + "id": "123", + "name": "comments", + "schema": "public", + "x": -1035.4972528190797, + "y": -21.831519473281823, + "fields": [ + { + "id": "124", "name": "id", "type": { "id": "uuid", @@ -1051,61 +1555,109 @@ "primaryKey": true, "unique": true, "nullable": false, - "createdAt": 1777282589092 + "createdAt": 1778772484798 }, { - "id": "85", - "name": "relation", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589092, - "characterMaximumLength": "16" - }, - { - "id": "86", - "name": "target_media", + "id": "125", + "name": "user_id", "type": { "id": "uuid", "name": "uuid" }, "primaryKey": false, "unique": false, + "nullable": false, + "createdAt": 1778772536237 + }, + { + "id": "126", + "name": "episode_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772542751 + }, + { + "id": "127", + "name": "content", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772548786, + "characterMaximumLength": "255" + }, + { + "id": "128", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777149915 + }, + { + "id": "129", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777198204 + }, + { + "id": "130", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, "nullable": true, - "createdAt": 1777282589092 + "createdAt": 1778777213469 } ], "indexes": [ { - "id": "87", + "id": "131", "name": "", "unique": true, "fieldIds": [ - "84" + "124" ], - "createdAt": 1777282589092, + "createdAt": 1778772484798, "isPrimaryKey": true } ], - "color": "#ffe374", + "color": "#ff9f74", "isView": false, - "createdAt": 1777282589092, - "order": 1, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778772484798, + "order": 41, + "diagramId": "3taaalng0ut0" }, { - "id": "88", - "name": "media_sources", + "id": "132", + "name": "staff", "schema": "public", - "x": -680.0105470895069, - "y": 97.06852307742538, + "x": -1434.8828256841582, + "y": 424.7769062913411, "fields": [ { - "id": "89", + "id": "133", "name": "id", "type": { "id": "uuid", @@ -1117,7 +1669,183 @@ "createdAt": 1777282589093 }, { - "id": "90", + "id": "134", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "135", + "name": "image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "136", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "137", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "138", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "139", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "140", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "141", + "name": "", + "unique": true, + "fieldIds": [ + "133" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 12, + "diagramId": "3taaalng0ut0" + }, + { + "id": "142", + "name": "user_rating_preferences", + "schema": "public", + "x": -1036.138591583759, + "y": -1328.817114710954, + "fields": [ + { + "id": "143", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778548671790 + }, + { + "id": "144", + "name": "rating_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548699069 + }, + { + "id": "145", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548704423 + } + ], + "indexes": [], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778548671790, + "order": 32, + "diagramId": "3taaalng0ut0" + }, + { + "id": "146", + "name": "media_types", + "schema": "public", + "x": -678.8247906473255, + "y": -28.0163584990978, + "fields": [ + { + "id": "147", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "148", "name": "name", "type": { "id": "varchar", @@ -1132,11 +1860,11 @@ ], "indexes": [ { - "id": "91", + "id": "149", "name": "", "unique": true, "fieldIds": [ - "89" + "147" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1145,31 +1873,19 @@ "color": "#ffe374", "isView": false, "createdAt": 1777282589093, - "order": 5, - "diagramId": "yqwsqwccoj6v" + "order": 4, + "diagramId": "3taaalng0ut0" }, { - "id": "92", - "name": "videos", + "id": "150", + "name": "user_watch_histories", "schema": "public", - "x": 613.6042418109826, - "y": 563.9662290869784, + "x": -335.9290422316319, + "y": -1189.7301850410581, "fields": [ { - "id": "93", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "94", - "name": "service_id", + "id": "151", + "name": "user_id", "type": { "id": "uuid", "name": "uuid" @@ -1177,76 +1893,11 @@ "primaryKey": false, "unique": false, "nullable": false, - "createdAt": 1777282589094 + "createdAt": 1778569467263 }, { - "id": "95", - "name": "video_code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "96", - "name": "short_code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "97", - "name": "thumbnail_code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "98", - "name": "download_code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "99", - "name": "pending_upload", - "type": { - "id": "boolean", - "name": "boolean" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "default": "true" - }, - { - "id": "100", - "name": "created_by", + "id": "152", + "name": "episode_id", "type": { "id": "uuid", "name": "uuid" @@ -1254,22 +1905,10 @@ "primaryKey": false, "unique": false, "nullable": false, - "createdAt": 1777282589094 + "createdAt": 1778569477336 }, { - "id": "101", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094 - }, - { - "id": "102", + "id": "153", "name": "updated_at", "type": { "id": "timestamp", @@ -1278,10 +1917,212 @@ "primaryKey": false, "unique": false, "nullable": false, - "createdAt": 1777282589094 + "createdAt": 1778569489813 + } + ], + "indexes": [ + { + "id": "154", + "name": "index_1", + "unique": true, + "fieldIds": [ + "152", + "151" + ], + "createdAt": 1778732177200 + } + ], + "color": "#9ef07a", + "isView": false, + "createdAt": 1778569427313, + "width": 337, + "order": 34, + "diagramId": "3taaalng0ut0" + }, + { + "id": "155", + "name": "users", + "schema": "public", + "x": -333.07222985751173, + "y": -1009.2656254027879, + "fields": [ + { + "id": "156", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778390635628 }, { - "id": "103", + "id": "157", + "name": "email", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778391266880 + }, + { + "id": "158", + "name": "password", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778391484055, + "characterMaximumLength": "255" + }, + { + "id": "159", + "name": "username", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778390646288, + "characterMaximumLength": "28" + }, + { + "id": "160", + "name": "fullname", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778390830584, + "characterMaximumLength": "32" + }, + { + "id": "161", + "name": "avatar", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778390861984, + "characterMaximumLength": "255" + }, + { + "id": "162", + "name": "bio", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778390888222 + }, + { + "id": "163", + "name": "datebirth", + "type": { + "id": "date", + "name": "date" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778391007890 + }, + { + "id": "164", + "name": "role", + "type": { + "id": "user_role", + "name": "user_role" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778771211530 + }, + { + "id": "165", + "name": "sex", + "type": { + "id": "user_sex", + "name": "user_sex" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778391031530 + }, + { + "id": "166", + "name": "phone_number", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778391449319, + "characterMaximumLength": "15" + }, + { + "id": "167", + "name": "country", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778401621258 + }, + { + "id": "168", + "name": "auth_provider", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778515919288, + "characterMaximumLength": "64" + }, + { + "id": "169", + "name": "provider_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778515934284, + "characterMaximumLength": "255" + }, + { + "id": "170", "name": "created_at", "type": { "id": "timestamp", @@ -1290,138 +2131,221 @@ "primaryKey": false, "unique": false, "nullable": false, - "createdAt": 1777282589094 + "createdAt": 1778517117468, + "default": "now()" + }, + { + "id": "171", + "name": "verified_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778815129265 + }, + { + "id": "172", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778517127447 + }, + { + "id": "173", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778517147463 } ], "indexes": [ { - "id": "104", + "id": "174", "name": "", "unique": true, "fieldIds": [ - "93" + "156" ], - "createdAt": 1777282589094, + "createdAt": 1778390635628, + "isPrimaryKey": true + }, + { + "id": "175", + "name": "index_2", + "unique": true, + "fieldIds": [ + "159" + ], + "createdAt": 1778401234711 + }, + { + "id": "176", + "name": "index_3", + "unique": true, + "fieldIds": [ + "157" + ], + "createdAt": 1778401248519 + } + ], + "checkConstraints": [], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778390635628, + "width": 337, + "order": 26, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "177", + "name": "video_submissions", + "schema": "public", + "x": 1034.3413138628948, + "y": 376.2391754093071, + "fields": [ + { + "id": "178", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777362610195 + }, + { + "id": "179", + "name": "video_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "180", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "181", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "182", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "default": "pending", + "comments": "" + }, + { + "id": "183", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "184", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "185", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "186", + "name": "", + "unique": true, + "fieldIds": [ + "178" + ], + "createdAt": 1777362610195, "isPrimaryKey": true } ], "color": "#ff9f74", "isView": false, - "createdAt": 1777282589094, - "order": 15, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1777362610195, + "width": 337, + "order": 24, + "diagramId": "3taaalng0ut0" }, { - "id": "105", - "name": "user_country_preferences", - "x": -1035.3700148414782, - "y": -1151.086340953631, - "fields": [ - { - "id": "106", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548950226 - }, - { - "id": "107", - "name": "country_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548914423 - }, - { - "id": "108", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548957483 - } - ], - "indexes": [], - "color": "#4dee8a", - "createdAt": 1778548914423, - "isView": false, - "order": 33, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "109", - "name": "media_producers", - "schema": "public", - "x": 194.9363737010458, - "y": 104.92238147821836, - "fields": [ - { - "id": "110", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777360177611 - }, - { - "id": "111", - "name": "producer_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": false, - "nullable": false, - "createdAt": 1777360209223 - } - ], - "indexes": [ - { - "id": "112", - "name": "", - "unique": true, - "fieldIds": [ - "110", - "111" - ], - "createdAt": 1777360177611, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777360177611, - "order": 21, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "113", + "id": "187", "name": "media_age_ratings", "schema": "public", "x": -679.7484316247582, "y": 342.88283833657397, "fields": [ { - "id": "114", + "id": "188", "name": "id", "type": { "id": "uuid", @@ -1433,7 +2357,7 @@ "createdAt": 1777282589093 }, { - "id": "115", + "id": "189", "name": "name", "type": { "id": "varchar", @@ -1446,7 +2370,7 @@ "characterMaximumLength": "64" }, { - "id": "116", + "id": "190", "name": "min_age", "type": { "id": "smallint", @@ -1460,11 +2384,11 @@ ], "indexes": [ { - "id": "117", + "id": "191", "name": "", "unique": true, "fieldIds": [ - "114" + "188" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1474,3079 +2398,17 @@ "isView": false, "createdAt": 1777282589093, "order": 7, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "118", - "name": "comment_audit_logs", - "x": -1031.768269593756, - "y": -322.47738647771854, - "fields": [ - { - "id": "119", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778772275091 - }, - { - "id": "120", - "name": "comment_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772293834 - }, - { - "id": "121", - "name": "performed_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772315274 - }, - { - "id": "122", - "name": "action", - "type": { - "id": "audit_action", - "name": "audit_action" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772326253 - }, - { - "id": "123", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772335038 - } - ], - "indexes": [ - { - "id": "124", - "name": "", - "fieldIds": [ - "119" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778772275091 - } - ], - "color": "#b067e9", - "createdAt": 1778772275091, - "isView": false, - "order": 40, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "125", - "name": "media_characters", - "schema": "public", - "x": -679.8245105809615, - "y": 896.9123102253633, - "fields": [ - { - "id": "126", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "127", - "name": "role", - "type": { - "id": "enum", - "name": "enum" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "comments": "main, supporting" - }, - { - "id": "128", - "name": "characters", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "129", - "name": "voice_actor", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - } - ], - "indexes": [ - { - "id": "130", - "name": "", - "unique": true, - "fieldIds": [ - "126" - ], - "createdAt": 1777282589093, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777282589093, - "order": 8, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "131", - "name": "provisioned_users", - "x": 204.8991215430349, - "y": -1369.625291260797, - "fields": [ - { - "id": "132", - "name": "provisioned_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778517368377 - }, - { - "id": "133", - "name": "provisioned_to", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778517463769 - }, - { - "id": "134", - "name": "provisioned_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778517476998 - }, - { - "id": "135", - "name": "reason", - "type": { - "id": "bigint", - "name": "bigint" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778517492646 - } - ], - "indexes": [], - "color": "#9ef07a", - "createdAt": 1778517368377, - "isView": false, - "order": 30, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "136", - "name": "collection_members", - "x": -338.05774312036385, - "y": -1466.6668409654785, - "fields": [ - { - "id": "137", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778766471107 - }, - { - "id": "138", - "name": "collection_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766493931 - }, - { - "id": "139", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766580515 - }, - { - "id": "140", - "name": "access_level", - "type": { - "id": "collection_access_level", - "name": "collection_access_level" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766832324 - }, - { - "id": "141", - "name": "invited_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778766846050 - }, - { - "id": "142", - "name": "joined_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766841216 - } - ], - "indexes": [ - { - "id": "143", - "name": "", - "fieldIds": [ - "137" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778766471107 - } - ], - "color": "#9ef07a", - "createdAt": 1778766471107, - "isView": false, - "order": 38, - "schema": "public", - "width": 337, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "144", - "name": "countries", - "x": -675.4825871206289, - "y": -936.5527418709639, - "fields": [ - { - "id": "145", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778401101216 - }, - { - "id": "146", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401175441, - "characterMaximumLength": "155" - }, - { - "id": "147", - "name": "slug", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401182473, - "characterMaximumLength": "165" - }, - { - "id": "148", - "name": "code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401186425, - "characterMaximumLength": "3" - }, - { - "id": "149", - "name": "flag", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778401191401, - "characterMaximumLength": "255" - }, - { - "id": "150", - "name": "banner", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778401286123, - "characterMaximumLength": "255" - } - ], - "indexes": [ - { - "id": "151", - "name": "", - "fieldIds": [ - "145" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778401101216 - } - ], - "color": "#b067e9", - "createdAt": 1778401101216, - "isView": false, - "order": 27, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "152", - "name": "media_explicit_genres", - "schema": "public", - "x": -681.3338818918861, - "y": 628.1224828360978, - "fields": [ - { - "id": "153", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777283776082 - }, - { - "id": "154", - "name": "genre_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": false, - "nullable": false, - "createdAt": 1777283808941 - } - ], - "indexes": [ - { - "id": "155", - "name": "", - "unique": true, - "fieldIds": [ - "153", - "154" - ], - "createdAt": 1777283776082, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777283776082, - "comments": "composite primary key = media_id + genre_id ", - "order": 19, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "156", - "name": "media_external_links", - "schema": "public", - "x": 194.5066892978357, - "y": -264.72537027522213, - "fields": [ - { - "id": "157", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "158", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "159", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "64" - }, - { - "id": "160", - "name": "url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - } - ], - "indexes": [ - { - "id": "161", - "name": "", - "unique": true, - "fieldIds": [ - "157" - ], - "createdAt": 1777282589093, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777282589093, - "order": 3, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "162", - "name": "media_statuses", - "schema": "public", - "x": -679.4669719043579, - "y": 219.3548090436041, - "fields": [ - { - "id": "163", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "164", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": true, - "nullable": false, - "createdAt": 1777282589093, - "characterMaximumLength": "64" - } - ], - "indexes": [ - { - "id": "165", - "name": "", - "unique": true, - "fieldIds": [ - "163" - ], - "createdAt": 1777282589093, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777282589093, - "order": 6, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "166", - "name": "producers", - "schema": "public", - "x": 614.2665328827337, - "y": 137.7660218436568, - "fields": [ - { - "id": "167", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "168", - "name": "mal_id", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "169", - "name": "type", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "characterMaximumLength": "24" - }, - { - "id": "170", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "155" - }, - { - "id": "171", - "name": "url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "172", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "173", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094 - }, - { - "id": "174", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "175", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - } - ], - "indexes": [ - { - "id": "176", - "name": "", - "unique": true, - "fieldIds": [ - "167" - ], - "createdAt": 1777282589094, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777282589094, - "order": 13, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "177", - "name": "user_watch_histories", - "x": -335.9290422316319, - "y": -1189.7301850410581, - "fields": [ - { - "id": "178", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778569467263 - }, - { - "id": "179", - "name": "episode_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778569477336 - }, - { - "id": "180", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778569489813 - } - ], - "indexes": [ - { - "id": "181", - "name": "index_1", - "fieldIds": [ - "179", - "178" - ], - "unique": true, - "createdAt": 1778732177200 - } - ], - "color": "#9ef07a", - "createdAt": 1778569427313, - "isView": false, - "order": 34, - "schema": "public", - "width": 337, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "182", - "name": "user_preferences", - "x": -675.7144111335546, - "y": -1493.2312805453928, - "fields": [ - { - "id": "183", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778517633815 - }, - { - "id": "184", - "name": "character_as_partner", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778518390023 - }, - { - "id": "185", - "name": "comment_picture", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778551730755, - "characterMaximumLength": "255" - }, - { - "id": "186", - "name": "enable_watch_history", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548806729, - "default": "true" - }, - { - "id": "187", - "name": "enable_search_history", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548790804, - "default": "false" - }, - { - "id": "188", - "name": "is_private_account", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518216561, - "default": "false" - }, - { - "id": "189", - "name": "can_message_me", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518177601, - "default": "true" - }, - { - "id": "190", - "name": "publish_birthday", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518242632, - "default": "false" - }, - { - "id": "191", - "name": "publish_email", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518265111, - "default": "false" - }, - { - "id": "192", - "name": "publish_phone_number", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518273456, - "default": "false" - }, - { - "id": "193", - "name": "publish_country", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778817885185, - "default": "false" - }, - { - "id": "194", - "name": "publish_partner", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778518357114, - "default": "true" - }, - { - "id": "195", - "name": "subscribe_to_newsletter", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808434279, - "default": "true" - }, - { - "id": "196", - "name": "enable_security_alerts", - "type": { - "id": "boolean", - "name": "boolean" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808466008, - "default": "true" - } - ], - "indexes": [ - { - "id": "197", - "name": "", - "fieldIds": [ - "183" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778517633815 - } - ], - "color": "#4dee8a", - "createdAt": 1778517633815, - "isView": false, - "order": 31, - "schema": "public", - "expanded": true, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "198", - "name": "user_genre_preferences", - "x": -1033.5708487432953, - "y": -1502.401339834144, - "fields": [ - { - "id": "199", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548513047 - }, - { - "id": "200", - "name": "genre_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548529915 - }, - { - "id": "201", - "name": "state", - "type": { - "id": "user_preference_state", - "name": "user_preference_state" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778548535529 - } - ], - "indexes": [ - { - "id": "202", - "name": "index_1", - "fieldIds": [ - "199", - "200" - ], - "unique": true, - "createdAt": 1778548614328 - } - ], - "color": "#4dee8a", - "createdAt": 1778548513047, - "isView": false, - "order": 31, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "203", - "name": "media_collections", - "x": 197.36608531341386, - "y": -468.796634019804, - "fields": [ - { - "id": "204", - "name": "collection_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733152986 - }, - { - "id": "205", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733195744 - }, - { - "id": "206", - "name": "added_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733169676 - }, - { - "id": "207", - "name": "added_at", - "type": { - "id": "bigint", - "name": "bigint" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733189272 - } - ], - "indexes": [ - { - "id": "208", - "name": "index_1", - "fieldIds": [ - "204", - "205" - ], - "unique": true, - "createdAt": 1778733335908 - } - ], - "color": "#ff9f74", - "createdAt": 1778733152986, - "isView": false, - "order": 36, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "209", - "name": "comments", - "x": -1035.4972528190797, - "y": -21.831519473281823, - "fields": [ - { - "id": "210", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778772484798 - }, - { - "id": "211", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772536237 - }, - { - "id": "212", - "name": "episode_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772542751 - }, - { - "id": "213", - "name": "content", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778772548786, - "characterMaximumLength": "255" - }, - { - "id": "214", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777149915 - }, - { - "id": "215", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777198204 - }, - { - "id": "216", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777213469 - } - ], - "indexes": [ - { - "id": "217", - "name": "", - "fieldIds": [ - "210" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778772484798 - } - ], - "color": "#ff9f74", - "createdAt": 1778772484798, - "isView": false, - "order": 41, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "218", - "name": "user_oauth_accounts", - "x": 200.04156829298174, - "y": -928.8832495975014, - "fields": [ - { - "id": "219", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778516299633 - }, - { - "id": "220", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778516366928 - }, - { - "id": "221", - "name": "provider_name", - "type": { - "id": "oauth_provider", - "name": "oauth_provider" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778822365657 - }, - { - "id": "222", - "name": "provider_sub", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778516403942, - "characterMaximumLength": "255" - }, - { - "id": "223", - "name": "provider_email", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778822096844, - "characterMaximumLength": "255", - "default": null - }, - { - "id": "224", - "name": "access_token", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778516373206, - "characterMaximumLength": "255", - "default": null - }, - { - "id": "225", - "name": "refresh_token", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778822164872, - "characterMaximumLength": "255" - }, - { - "id": "226", - "name": "last_login", - "type": { - "id": "timestamptz", - "name": "timestamptz" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778516872367 - }, - { - "id": "227", - "name": "expires_at", - "type": { - "id": "timestamptz", - "name": "timestamptz" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778822177415 - }, - { - "id": "228", - "name": "created_at", - "type": { - "id": "timestamptz", - "name": "timestamptz" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778822183677 - }, - { - "id": "229", - "name": "updated_at", - "type": { - "id": "timestamptz", - "name": "timestamptz" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778822185523 - } - ], - "indexes": [ - { - "id": "230", - "name": "", - "fieldIds": [ - "219" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778516299633 - }, - { - "id": "231", - "name": "index_2", - "fieldIds": [ - "220", - "221" - ], - "unique": true, - "createdAt": 1778516903425 - } - ], - "color": "#4dee8a", - "createdAt": 1778516299633, - "isView": false, - "order": 29, - "schema": "public", - "diagramId": "yqwsqwccoj6v", - "expanded": true - }, - { - "id": "232", - "name": "staff", - "schema": "public", - "x": -1434.8828256841582, - "y": 424.7769062913411, - "fields": [ - { - "id": "233", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "234", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "235", - "name": "image", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "236", - "name": "mal_id", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "237", - "name": "mal_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "238", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - }, - { - "id": "239", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "240", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - } - ], - "indexes": [ - { - "id": "241", - "name": "", - "unique": true, - "fieldIds": [ - "233" - ], - "createdAt": 1777282589093, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777282589093, - "order": 12, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "242", - "name": "home_media_banner", - "x": -1034.714934672103, - "y": -969.0938770634809, - "fields": [ - { - "id": "243", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778771594518 - }, - { - "id": "244", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771625245 - }, - { - "id": "245", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771632111 - }, - { - "id": "246", - "name": "priority", - "type": { - "id": "smallint", - "name": "smallint" - }, - "unique": true, - "nullable": true, - "primaryKey": false, - "createdAt": 1778771638786 - }, - { - "id": "247", - "name": "start_show", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771679920 - }, - { - "id": "248", - "name": "end_show", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778771687135 - }, - { - "id": "249", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771693471 - } - ], - "indexes": [ - { - "id": "250", - "name": "", - "fieldIds": [ - "243" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778771594518 - } - ], - "color": "#b067e9", - "createdAt": 1778771594518, - "isView": false, - "order": 39, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "251", - "name": "users", - "x": -333.07222985751173, - "y": -1009.2656254027879, - "fields": [ - { - "id": "252", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778390635628 - }, - { - "id": "253", - "name": "email", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778391266880 - }, - { - "id": "254", - "name": "password", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778391484055, - "characterMaximumLength": "255" - }, - { - "id": "255", - "name": "username", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778390646288, - "characterMaximumLength": "28" - }, - { - "id": "256", - "name": "fullname", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778390830584, - "characterMaximumLength": "32" - }, - { - "id": "257", - "name": "avatar", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778390861984, - "characterMaximumLength": "255" - }, - { - "id": "258", - "name": "bio", - "type": { - "id": "text", - "name": "text" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778390888222 - }, - { - "id": "259", - "name": "datebirth", - "type": { - "id": "date", - "name": "date" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778391007890 - }, - { - "id": "260", - "name": "role", - "type": { - "id": "user_role", - "name": "user_role" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778771211530 - }, - { - "id": "261", - "name": "sex", - "type": { - "id": "user_sex", - "name": "user_sex" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778391031530 - }, - { - "id": "262", - "name": "phone_number", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778391449319, - "characterMaximumLength": "15" - }, - { - "id": "263", - "name": "country", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778401621258 - }, - { - "id": "264", - "name": "auth_provider", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778515919288, - "characterMaximumLength": "64" - }, - { - "id": "265", - "name": "provider_token", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778515934284, - "characterMaximumLength": "255" - }, - { - "id": "266", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778517117468, - "default": "now()" - }, - { - "id": "267", - "name": "verified_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778815129265 - }, - { - "id": "268", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778517127447 - }, - { - "id": "269", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778517147463 - } - ], - "indexes": [ - { - "id": "270", - "name": "", - "fieldIds": [ - "252" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778390635628 - }, - { - "id": "271", - "name": "index_2", - "fieldIds": [ - "255" - ], - "unique": true, - "createdAt": 1778401234711 - }, - { - "id": "272", - "name": "index_3", - "fieldIds": [ - "253" - ], - "unique": true, - "createdAt": 1778401248519 - } - ], - "color": "#4dee8a", - "createdAt": 1778390635628, - "isView": false, - "order": 26, - "schema": "public", - "expanded": true, - "checkConstraints": [], - "width": 337, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "273", - "name": "media_studios", - "schema": "public", - "x": 194.57420294478976, - "y": 402.07246285824783, - "fields": [ - { - "id": "274", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777360514222 - }, - { - "id": "275", - "name": "producer_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": false, - "nullable": false, - "createdAt": 1777360544975 - } - ], - "indexes": [ - { - "id": "276", - "name": "", - "unique": true, - "fieldIds": [ - "274", - "275" - ], - "createdAt": 1777360514222, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777360514222, - "order": 23, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "277", - "name": "media_licencors", - "schema": "public", - "x": 194.15644602007046, - "y": 251.9575649519487, - "fields": [ - { - "id": "278", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777360331507 - }, - { - "id": "279", - "name": "producer_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": false, - "nullable": false, - "createdAt": 1777360363236 - } - ], - "indexes": [ - { - "id": "280", - "name": "", - "unique": true, - "fieldIds": [ - "278", - "279" - ], - "createdAt": 1777360331507, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777360331507, - "order": 22, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "281", - "name": "comment_reports", - "x": -1032.5934799775514, - "y": -655.2659179217417, - "fields": [ - { - "id": "282", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777460892 - }, - { - "id": "283", - "name": "reporter_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777475869 - }, - { - "id": "284", - "name": "comment_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777483534 - }, - { - "id": "285", - "name": "title", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777515056, - "characterMaximumLength": "115" - }, - { - "id": "286", - "name": "status", - "type": { - "id": "status_submission", - "name": "status_submission" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777836090 - }, - { - "id": "287", - "name": "description", - "type": { - "id": "text", - "name": "text" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777519944 - }, - { - "id": "288", - "name": "reported_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778777537682 - }, - { - "id": "289", - "name": "closed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778777545373 - } - ], - "indexes": [], - "color": "#b067e9", - "createdAt": 1778777460892, - "isView": false, - "order": 42, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "290", - "name": "genres", - "schema": "public", - "x": -1033.3879847948956, - "y": 289.93770102274635, - "fields": [ - { - "id": "291", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "292", - "name": "mal_id", - "type": { - "id": "smallint", - "name": "smallint" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094 - }, - { - "id": "293", - "name": "type", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "16" - }, - { - "id": "294", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "32" - }, - { - "id": "295", - "name": "url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "155" - } - ], - "indexes": [ - { - "id": "296", - "name": "", - "unique": true, - "fieldIds": [ - "291" - ], - "createdAt": 1777282589094, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777282589094, - "order": 14, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "297", - "name": "collections", - "x": 206.14708211340167, - "y": -1637.469796851602, - "fields": [ - { - "id": "298", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778733394970 - }, - { - "id": "299", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733410192, - "characterMaximumLength": "64", - "default": null - }, - { - "id": "300", - "name": "cover_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733428870, - "characterMaximumLength": "255" - }, - { - "id": "301", - "name": "privacy_level", - "type": { - "id": "privacy_level", - "name": "privacy_level" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778766528943 - }, - { - "id": "302", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733453130 - }, - { - "id": "303", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778733477620 - } - ], - "indexes": [ - { - "id": "304", - "name": "", - "fieldIds": [ - "298" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778733394970 - } - ], - "color": "#9ef07a", - "createdAt": 1778733394970, - "isView": false, - "order": 37, - "schema": "public", - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "305", - "name": "voice_actors", - "schema": "public", - "x": -1038.3471892955995, - "y": 525.1907371208936, - "fields": [ - { - "id": "306", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "307", - "name": "language", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "115" - }, - { - "id": "308", - "name": "actor_staff", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093 - } - ], - "indexes": [ - { - "id": "309", - "name": "", - "unique": true, - "fieldIds": [ - "306" - ], - "createdAt": 1777282589093, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777282589093, - "order": 11, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "310", - "name": "video_submissions", - "x": 1034.3413138628948, - "y": 376.2391754093071, - "fields": [ - { - "id": "311", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777362610195 - }, - { - "id": "312", - "name": "video_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362624424 - }, - { - "id": "313", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362635996, - "comments": "" - }, - { - "id": "314", - "name": "reviewed_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777362758238 - }, - { - "id": "315", - "name": "status", - "type": { - "id": "status_submission", - "name": "status_submission" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362700148, - "default": "pending", - "comments": "" - }, - { - "id": "316", - "name": "reviewed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363627973 - }, - { - "id": "317", - "name": "reason", - "type": { - "id": "text", - "name": "text" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363674757 - }, - { - "id": "318", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777363686543, - "default": "now()" - } - ], - "indexes": [ - { - "id": "319", - "name": "", - "unique": true, - "fieldIds": [ - "311" - ], - "createdAt": 1777362610195, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "createdAt": 1777362610195, - "isView": false, - "order": 24, - "schema": "public", - "width": 337, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "320", - "name": "media_genres", - "schema": "public", - "x": -680.2926238134676, - "y": 498.7845736528544, - "fields": [ - { - "id": "321", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": true, - "nullable": false, - "createdAt": 1777283473368 - }, - { - "id": "322", - "name": "genre_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": false, - "nullable": false, - "createdAt": 1777283550230 - } - ], - "indexes": [ - { - "id": "323", - "name": "", - "unique": true, - "fieldIds": [ - "322" - ], - "createdAt": 1777283473368, - "isPrimaryKey": true - }, - { - "id": "324", - "name": "index_1", - "fieldIds": [ - "321", - "322" - ], - "unique": true, - "createdAt": 1778570545534 - } - ], - "checkConstraints": [], - "color": "#ffe374", - "isView": false, - "createdAt": 1777283473368, - "comments": "composite primary key = media_id + genre_id ", - "order": 18, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "325", - "name": "video_services", - "schema": "public", - "x": 78.02893671625938, - "y": 1219.199725842667, - "fields": [ - { - "id": "326", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "327", - "name": "name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "155" - }, - { - "id": "328", - "name": "resolution", - "type": { - "id": "smallint", - "name": "smallint" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "329", - "name": "domain", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "330", - "name": "image_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "331", - "name": "hex_color", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "10" - }, - { - "id": "332", - "name": "endpoint_video", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "333", - "name": "endpoint_short", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "334", - "name": "endpoint_image", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "335", - "name": "endpoint_download", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "255" - }, - { - "id": "336", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "337", - "name": "deleted_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094 - }, - { - "id": "338", - "name": "updated_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - }, - { - "id": "339", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589094 - } - ], - "indexes": [ - { - "id": "340", - "name": "", - "unique": true, - "fieldIds": [ - "326" - ], - "createdAt": 1777282589094, - "isPrimaryKey": true - }, - { - "id": "341", - "name": "idx_video_services_name_resolution", - "unique": true, - "fieldIds": [ - "327", - "328" - ], - "createdAt": 1777282589094 - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777282589094, - "width": 337, - "order": 16, - "expanded": true, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "342", - "name": "media_submissions", - "schema": "public", - "x": -677.2819917810897, - "y": -656.6674640748546, - "fields": [ - { - "id": "343", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777362610195 - }, - { - "id": "344", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362624424 - }, - { - "id": "345", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362635996, - "comments": "" - }, - { - "id": "346", - "name": "status", - "type": { - "id": "status_submission", - "name": "status_submission" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362700148, - "comments": "" - }, - { - "id": "347", - "name": "reviewed_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777362758238 - }, - { - "id": "348", - "name": "reviewed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363627973 - }, - { - "id": "349", - "name": "reason", - "type": { - "id": "text", - "name": "text" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363674757 - }, - { - "id": "350", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777363686543, - "default": "now()" - } - ], - "indexes": [ - { - "id": "351", - "name": "", - "unique": true, - "fieldIds": [ - "343" - ], - "createdAt": 1777362610195, - "isPrimaryKey": true - } - ], - "color": "#ffe374", - "isView": false, - "createdAt": 1777362610195, - "order": 24, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "352", - "name": "video_service_submissions", - "schema": "public", - "x": -371.1847878375677, - "y": 1294.289208047582, - "fields": [ - { - "id": "353", - "name": "id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": true, - "unique": true, - "nullable": false, - "createdAt": 1777362610195 - }, - { - "id": "354", - "name": "video_service_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362624424 - }, - { - "id": "355", - "name": "created_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362635996, - "comments": "" - }, - { - "id": "356", - "name": "status", - "type": { - "id": "status_submission", - "name": "status_submission" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777362700148, - "default": "pending", - "comments": "" - }, - { - "id": "357", - "name": "reviewed_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777362758238 - }, - { - "id": "358", - "name": "reviewed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363627973 - }, - { - "id": "359", - "name": "reason", - "type": { - "id": "text", - "name": "text" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777363674757 - }, - { - "id": "360", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777363686543, - "default": "now()" - } - ], - "indexes": [ - { - "id": "361", - "name": "", - "unique": true, - "fieldIds": [ - "353" - ], - "createdAt": 1777362610195, - "isPrimaryKey": true - } - ], - "color": "#ff9f74", - "isView": false, - "createdAt": 1777362610195, - "width": 337, - "order": 24, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "362", + "id": "192", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "363", + "id": "193", "name": "id", "type": { "id": "uuid", @@ -4558,7 +2420,7 @@ "createdAt": 1777282589092 }, { - "id": "364", + "id": "194", "name": "url", "type": { "id": "varchar", @@ -4571,7 +2433,7 @@ "characterMaximumLength": "255" }, { - "id": "365", + "id": "195", "name": "embed_url", "type": { "id": "varchar", @@ -4584,7 +2446,7 @@ "characterMaximumLength": "255" }, { - "id": "366", + "id": "196", "name": "small_image_url", "type": { "id": "varchar", @@ -4597,7 +2459,7 @@ "characterMaximumLength": "255" }, { - "id": "367", + "id": "197", "name": "medium_image_url", "type": { "id": "varchar", @@ -4610,7 +2472,7 @@ "characterMaximumLength": "255" }, { - "id": "368", + "id": "198", "name": "large_image_url", "type": { "id": "varchar", @@ -4623,7 +2485,7 @@ "characterMaximumLength": "255" }, { - "id": "369", + "id": "199", "name": "maximum_image_url", "type": { "id": "varchar", @@ -4638,11 +2500,11 @@ ], "indexes": [ { - "id": "370", + "id": "200", "name": "", "unique": true, "fieldIds": [ - "363" + "193" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4652,17 +2514,375 @@ "isView": false, "createdAt": 1777282589093, "order": 2, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "371", - "name": "media_types", + "id": "201", + "name": "collection_members", "schema": "public", - "x": -678.8247906473255, - "y": -28.0163584990978, + "x": -338.05774312036385, + "y": -1466.6668409654785, "fields": [ { - "id": "372", + "id": "202", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778766471107 + }, + { + "id": "203", + "name": "collection_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778766493931 + }, + { + "id": "204", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778766580515 + }, + { + "id": "205", + "name": "access_level", + "type": { + "id": "collection_access_level", + "name": "collection_access_level" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778766832324 + }, + { + "id": "206", + "name": "invited_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778766846050 + }, + { + "id": "207", + "name": "joined_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778766841216 + } + ], + "indexes": [ + { + "id": "208", + "name": "", + "unique": true, + "fieldIds": [ + "202" + ], + "createdAt": 1778766471107, + "isPrimaryKey": true + } + ], + "color": "#9ef07a", + "isView": false, + "createdAt": 1778766471107, + "width": 337, + "order": 38, + "diagramId": "3taaalng0ut0" + }, + { + "id": "209", + "name": "media_collections", + "schema": "public", + "x": 197.36608531341386, + "y": -468.796634019804, + "fields": [ + { + "id": "210", + "name": "collection_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778733152986 + }, + { + "id": "211", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733195744 + }, + { + "id": "212", + "name": "added_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733169676 + }, + { + "id": "213", + "name": "added_at", + "type": { + "id": "bigint", + "name": "bigint" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733189272 + } + ], + "indexes": [ + { + "id": "214", + "name": "index_1", + "unique": true, + "fieldIds": [ + "210", + "211" + ], + "createdAt": 1778733335908 + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1778733152986, + "order": 36, + "diagramId": "3taaalng0ut0" + }, + { + "id": "215", + "name": "user_follows", + "schema": "public", + "x": 200.64283100307347, + "y": -1141.2347344393859, + "fields": [ + { + "id": "216", + "name": "follower_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778401701334 + }, + { + "id": "217", + "name": "following_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778401722682 + }, + { + "id": "218", + "name": "followed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778401734762 + } + ], + "indexes": [ + { + "id": "219", + "name": "index_1", + "unique": true, + "fieldIds": [ + "217", + "216" + ], + "createdAt": 1778401874053 + } + ], + "checkConstraints": [ + { + "id": "jx7knny2zwx9u3pt9y2eowuoc", + "expression": "follower_id <> following_id", + "createdAt": 1778402111741 + } + ], + "color": "#9ef07a", + "isView": false, + "createdAt": 1778401701334, + "width": 224, + "order": 28, + "diagramId": "3taaalng0ut0" + }, + { + "id": "220", + "name": "media_relations", + "schema": "public", + "x": 194.39903094287618, + "y": -61.06914750749248, + "fields": [ + { + "id": "221", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "222", + "name": "relation", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092, + "characterMaximumLength": "16" + }, + { + "id": "223", + "name": "target_media", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589092 + } + ], + "indexes": [ + { + "id": "224", + "name": "", + "unique": true, + "fieldIds": [ + "221" + ], + "createdAt": 1777282589092, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589092, + "order": 1, + "diagramId": "3taaalng0ut0" + }, + { + "id": "225", + "name": "media_explicit_genres", + "schema": "public", + "x": -681.3338818918861, + "y": 628.1224828360978, + "fields": [ + { + "id": "226", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777283776082 + }, + { + "id": "227", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777283808941 + } + ], + "indexes": [ + { + "id": "228", + "name": "", + "unique": true, + "fieldIds": [ + "226", + "227" + ], + "createdAt": 1777283776082, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777283776082, + "comments": "composite primary key = media_id + genre_id ", + "order": 19, + "diagramId": "3taaalng0ut0" + }, + { + "id": "229", + "name": "media_statuses", + "schema": "public", + "x": -679.4669719043579, + "y": 219.3548090436041, + "fields": [ + { + "id": "230", "name": "id", "type": { "id": "uuid", @@ -4674,7 +2894,1762 @@ "createdAt": 1777282589093 }, { - "id": "373", + "id": "231", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "64" + } + ], + "indexes": [ + { + "id": "232", + "name": "", + "unique": true, + "fieldIds": [ + "230" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777282589093, + "order": 6, + "diagramId": "3taaalng0ut0" + }, + { + "id": "233", + "name": "collections", + "schema": "public", + "x": 206.14708211340167, + "y": -1637.469796851602, + "fields": [ + { + "id": "234", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778733394970 + }, + { + "id": "235", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733410192, + "characterMaximumLength": "64", + "default": null + }, + { + "id": "236", + "name": "cover_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733428870, + "characterMaximumLength": "255" + }, + { + "id": "237", + "name": "privacy_level", + "type": { + "id": "privacy_level", + "name": "privacy_level" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778766528943 + }, + { + "id": "238", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733453130 + }, + { + "id": "239", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778733477620 + } + ], + "indexes": [ + { + "id": "240", + "name": "", + "unique": true, + "fieldIds": [ + "234" + ], + "createdAt": 1778733394970, + "isPrimaryKey": true + } + ], + "color": "#9ef07a", + "isView": false, + "createdAt": 1778733394970, + "order": 37, + "diagramId": "3taaalng0ut0" + }, + { + "id": "241", + "name": "video_services", + "schema": "public", + "x": 78.02893671625938, + "y": 1219.199725842667, + "fields": [ + { + "id": "242", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "243", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + }, + { + "id": "244", + "name": "resolution", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "245", + "name": "domain", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "246", + "name": "image_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "247", + "name": "hex_color", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "10" + }, + { + "id": "248", + "name": "endpoint_video", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "249", + "name": "endpoint_short", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "250", + "name": "endpoint_image", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "251", + "name": "endpoint_download", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "252", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "253", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "254", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "255", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + } + ], + "indexes": [ + { + "id": "256", + "name": "", + "unique": true, + "fieldIds": [ + "242" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + }, + { + "id": "257", + "name": "idx_video_services_name_resolution", + "unique": true, + "fieldIds": [ + "243", + "244" + ], + "createdAt": 1777282589094 + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "width": 337, + "order": 16, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "258", + "name": "media_licencors", + "schema": "public", + "x": 194.15644602007046, + "y": 251.9575649519487, + "fields": [ + { + "id": "259", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777360331507 + }, + { + "id": "260", + "name": "producer_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777360363236 + } + ], + "indexes": [ + { + "id": "261", + "name": "", + "unique": true, + "fieldIds": [ + "259", + "260" + ], + "createdAt": 1777360331507, + "isPrimaryKey": true + } + ], + "color": "#ffe374", + "isView": false, + "createdAt": 1777360331507, + "order": 22, + "diagramId": "3taaalng0ut0" + }, + { + "id": "262", + "name": "user_sessions", + "schema": "public", + "x": -1381.9054198604924, + "y": -1329.3058623634636, + "fields": [ + { + "id": "263", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778814742487 + }, + { + "id": "264", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778814761364 + }, + { + "id": "265", + "name": "device_type", + "type": { + "id": "device_type", + "name": "device_type" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778814807191 + }, + { + "id": "266", + "name": "os_type", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778814771991, + "characterMaximumLength": "50", + "default": null + }, + { + "id": "267", + "name": "os_version", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778814781826, + "characterMaximumLength": "50" + }, + { + "id": "268", + "name": "browser_name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778814787821, + "characterMaximumLength": "50" + }, + { + "id": "269", + "name": "browser_version", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778814794245, + "characterMaximumLength": "50" + }, + { + "id": "270", + "name": "ip_login", + "type": { + "id": "inet", + "name": "inet" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778814801981 + }, + { + "id": "271", + "name": "login_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778814816604 + }, + { + "id": "272", + "name": "logout_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778814877334 + } + ], + "indexes": [ + { + "id": "273", + "name": "", + "unique": true, + "fieldIds": [ + "263" + ], + "createdAt": 1778814742487, + "isPrimaryKey": true + } + ], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778814742487, + "order": 44, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "274", + "name": "comment_audit_logs", + "schema": "public", + "x": -1031.768269593756, + "y": -322.47738647771854, + "fields": [ + { + "id": "275", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778772275091 + }, + { + "id": "276", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772293834 + }, + { + "id": "277", + "name": "performed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772315274 + }, + { + "id": "278", + "name": "action", + "type": { + "id": "audit_action", + "name": "audit_action" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772326253 + }, + { + "id": "279", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778772335038 + } + ], + "indexes": [ + { + "id": "280", + "name": "", + "unique": true, + "fieldIds": [ + "275" + ], + "createdAt": 1778772275091, + "isPrimaryKey": true + } + ], + "color": "#b067e9", + "isView": false, + "createdAt": 1778772275091, + "order": 40, + "diagramId": "3taaalng0ut0" + }, + { + "id": "281", + "name": "comment_likes", + "schema": "public", + "x": -1435.9285690968027, + "y": 209.11179406446968, + "fields": [ + { + "id": "282", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778808096764 + }, + { + "id": "283", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778808185625 + }, + { + "id": "284", + "name": "type", + "type": { + "id": "like_type", + "name": "like_type" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778808192863 + }, + { + "id": "285", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778808284226 + } + ], + "indexes": [ + { + "id": "286", + "name": "index_1", + "unique": true, + "fieldIds": [ + "283", + "282" + ], + "createdAt": 1778808299354 + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1778808096764, + "order": 43, + "diagramId": "3taaalng0ut0" + }, + { + "id": "287", + "name": "video_service_submissions", + "schema": "public", + "x": -371.1847878375677, + "y": 1294.289208047582, + "fields": [ + { + "id": "288", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777362610195 + }, + { + "id": "289", + "name": "video_service_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362624424 + }, + { + "id": "290", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362635996, + "comments": "" + }, + { + "id": "291", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777362700148, + "default": "pending", + "comments": "" + }, + { + "id": "292", + "name": "reviewed_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777362758238 + }, + { + "id": "293", + "name": "reviewed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363627973 + }, + { + "id": "294", + "name": "reason", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777363674757 + }, + { + "id": "295", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777363686543, + "default": "now()" + } + ], + "indexes": [ + { + "id": "296", + "name": "", + "unique": true, + "fieldIds": [ + "288" + ], + "createdAt": 1777362610195, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777362610195, + "width": 337, + "order": 24, + "diagramId": "3taaalng0ut0" + }, + { + "id": "297", + "name": "provisioned_users", + "schema": "public", + "x": 204.8991215430349, + "y": -1369.625291260797, + "fields": [ + { + "id": "298", + "name": "provisioned_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778517368377 + }, + { + "id": "299", + "name": "provisioned_to", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778517463769 + }, + { + "id": "300", + "name": "provisioned_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778517476998 + }, + { + "id": "301", + "name": "reason", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778517492646, + "characterMaximumLength": "255" + } + ], + "indexes": [], + "color": "#9ef07a", + "isView": false, + "createdAt": 1778517368377, + "order": 30, + "diagramId": "3taaalng0ut0" + }, + { + "id": "302", + "name": "comment_reports", + "schema": "public", + "x": -1032.5934799775514, + "y": -655.2659179217417, + "fields": [ + { + "id": "303", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778777460892 + }, + { + "id": "304", + "name": "reporter_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777475869 + }, + { + "id": "305", + "name": "comment_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777483534 + }, + { + "id": "306", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777515056, + "characterMaximumLength": "115" + }, + { + "id": "307", + "name": "status", + "type": { + "id": "status_submission", + "name": "status_submission" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777836090 + }, + { + "id": "308", + "name": "description", + "type": { + "id": "text", + "name": "text" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778777519944 + }, + { + "id": "309", + "name": "reported_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778777537682 + }, + { + "id": "310", + "name": "closed_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778777545373 + } + ], + "indexes": [], + "color": "#b067e9", + "isView": false, + "createdAt": 1778777460892, + "order": 42, + "diagramId": "3taaalng0ut0" + }, + { + "id": "311", + "name": "user_preferences", + "schema": "public", + "x": -675.7144111335546, + "y": -1493.2312805453928, + "fields": [ + { + "id": "312", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778517633815 + }, + { + "id": "313", + "name": "character_as_partner", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778518390023 + }, + { + "id": "314", + "name": "comment_picture", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778551730755, + "characterMaximumLength": "255" + }, + { + "id": "315", + "name": "enable_watch_history", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548806729, + "default": "true" + }, + { + "id": "316", + "name": "enable_search_history", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548790804, + "default": "false" + }, + { + "id": "317", + "name": "is_private_account", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518216561, + "default": "false" + }, + { + "id": "318", + "name": "can_message_me", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518177601, + "default": "true" + }, + { + "id": "319", + "name": "publish_birthday", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518242632, + "default": "false" + }, + { + "id": "320", + "name": "publish_email", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518265111, + "default": "false" + }, + { + "id": "321", + "name": "publish_phone_number", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518273456, + "default": "false" + }, + { + "id": "322", + "name": "publish_country", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778817885185, + "default": "false" + }, + { + "id": "323", + "name": "publish_partner", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778518357114, + "default": "true" + }, + { + "id": "324", + "name": "subscribe_to_newsletter", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778808434279, + "default": "true" + }, + { + "id": "325", + "name": "enable_security_alerts", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778808466008, + "default": "true" + } + ], + "indexes": [ + { + "id": "326", + "name": "", + "unique": true, + "fieldIds": [ + "312" + ], + "createdAt": 1778517633815, + "isPrimaryKey": true + } + ], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778517633815, + "order": 31, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "327", + "name": "genres", + "schema": "public", + "x": -1033.3879847948956, + "y": 283.68770102274635, + "fields": [ + { + "id": "328", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "329", + "name": "mal_id", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "330", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + }, + { + "id": "331", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1779208587903, + "characterMaximumLength": "32", + "default": null + }, + { + "id": "332", + "name": "slug", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "38" + }, + { + "id": "333", + "name": "thumbnail_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + } + ], + "indexes": [ + { + "id": "334", + "name": "", + "unique": true, + "fieldIds": [ + "328" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 14, + "diagramId": "3taaalng0ut0" + }, + { + "id": "335", + "name": "user_oauth_accounts", + "schema": "public", + "x": 200.04156829298174, + "y": -928.8832495975014, + "fields": [ + { + "id": "336", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1778516299633 + }, + { + "id": "337", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778516366928 + }, + { + "id": "338", + "name": "provider_name", + "type": { + "id": "oauth_provider", + "name": "oauth_provider" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778822365657 + }, + { + "id": "339", + "name": "provider_sub", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778516403942, + "characterMaximumLength": "255" + }, + { + "id": "340", + "name": "provider_email", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778822096844, + "characterMaximumLength": "255", + "default": null + }, + { + "id": "341", + "name": "access_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778516373206, + "characterMaximumLength": "255", + "default": null + }, + { + "id": "342", + "name": "refresh_token", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778822164872, + "characterMaximumLength": "255" + }, + { + "id": "343", + "name": "last_login", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778516872367 + }, + { + "id": "344", + "name": "expires_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1778822177415 + }, + { + "id": "345", + "name": "created_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778822183677 + }, + { + "id": "346", + "name": "updated_at", + "type": { + "id": "timestamptz", + "name": "timestamptz" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778822185523 + } + ], + "indexes": [ + { + "id": "347", + "name": "", + "unique": true, + "fieldIds": [ + "336" + ], + "createdAt": 1778516299633, + "isPrimaryKey": true + }, + { + "id": "348", + "name": "index_2", + "unique": true, + "fieldIds": [ + "337", + "338" + ], + "createdAt": 1778516903425 + } + ], + "color": "#4dee8a", + "isView": false, + "createdAt": 1778516299633, + "order": 29, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "349", + "name": "episodes", + "schema": "public", + "x": 196.42495741544377, + "y": 550.6255135491608, + "fields": [ + { + "id": "350", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "351", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "352", + "name": "episode", + "type": { + "id": "smallint", + "name": "smallint" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "353", + "name": "mal_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "354", + "name": "mal_forum_url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "255" + }, + { + "id": "355", + "name": "title", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "356", + "name": "title_origin", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "357", + "name": "title_romanji", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "155" + }, + { + "id": "358", + "name": "aired", + "type": { + "id": "date", + "name": "date" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "359", + "name": "filler", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "false" + }, + { + "id": "360", + "name": "recap", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "default": "false" + }, + { + "id": "361", + "name": "total_score", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777361135322 + }, + { + "id": "362", + "name": "scored_by", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777361233825 + }, + { + "id": "363", + "name": "videos", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "364", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + }, + { + "id": "365", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "366", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "367", + "name": "", + "unique": true, + "fieldIds": [ + "350" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 9, + "expanded": true, + "diagramId": "3taaalng0ut0" + }, + { + "id": "368", + "name": "media_sources", + "schema": "public", + "x": -680.0105470895069, + "y": 97.06852307742538, + "fields": [ + { + "id": "369", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "370", "name": "name", "type": { "id": "varchar", @@ -4689,11 +4664,11 @@ ], "indexes": [ { - "id": "374", + "id": "371", "name": "", "unique": true, "fieldIds": [ - "372" + "369" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4702,88 +4677,18 @@ "color": "#ffe374", "isView": false, "createdAt": 1777282589093, - "order": 4, - "diagramId": "yqwsqwccoj6v" + "order": 5, + "diagramId": "3taaalng0ut0" }, { - "id": "375", - "name": "user_follows", - "x": 200.64283100307347, - "y": -1141.2347344393859, + "id": "372", + "name": "media_producers", + "schema": "public", + "x": 194.9363737010458, + "y": 104.92238147821836, "fields": [ { - "id": "376", - "name": "follower_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401701334 - }, - { - "id": "377", - "name": "following_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401722682 - }, - { - "id": "378", - "name": "followed_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778401734762 - } - ], - "indexes": [ - { - "id": "379", - "name": "index_1", - "fieldIds": [ - "377", - "376" - ], - "unique": true, - "createdAt": 1778401874053 - } - ], - "color": "#9ef07a", - "createdAt": 1778401701334, - "isView": false, - "order": 28, - "schema": "public", - "checkConstraints": [ - { - "id": "jx7knny2zwx9u3pt9y2eowuoc", - "expression": "follower_id <> following_id", - "createdAt": 1778402111741 - } - ], - "width": 224, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "380", - "name": "media_themes", - "schema": "public", - "x": -681.5109900103016, - "y": 752.8680228454149, - "fields": [ - { - "id": "381", + "id": "373", "name": "media_id", "type": { "id": "uuid", @@ -4792,11 +4697,11 @@ "primaryKey": true, "unique": true, "nullable": false, - "createdAt": 1777295294621 + "createdAt": 1777360177611 }, { - "id": "382", - "name": "genre_id", + "id": "374", + "name": "producer_id", "type": { "id": "uuid", "name": "uuid" @@ -4804,1426 +4709,1483 @@ "primaryKey": true, "unique": false, "nullable": false, - "createdAt": 1777295323224 + "createdAt": 1777360209223 } ], "indexes": [ { - "id": "383", + "id": "375", "name": "", "unique": true, "fieldIds": [ - "381", - "382" + "373", + "374" ], - "createdAt": 1777295294621, + "createdAt": 1777360177611, "isPrimaryKey": true } ], "color": "#ffe374", "isView": false, - "createdAt": 1777295294621, - "width": 224, - "order": 20, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1777360177611, + "order": 21, + "diagramId": "3taaalng0ut0" }, { - "id": "384", - "name": "comment_likes", - "x": -1435.9285690968027, - "y": 209.11179406446968, + "id": "376", + "name": "videos", + "schema": "public", + "x": 613.6042418109826, + "y": 563.9662290869784, "fields": [ { - "id": "385", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808096764 - }, - { - "id": "386", - "name": "comment_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808185625 - }, - { - "id": "387", - "name": "type", - "type": { - "id": "like_type", - "name": "like_type" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808192863 - }, - { - "id": "388", - "name": "created_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778808284226 - } - ], - "indexes": [ - { - "id": "389", - "name": "index_1", - "fieldIds": [ - "386", - "385" - ], - "unique": true, - "createdAt": 1778808299354 - } - ], - "color": "#ff9f74", - "createdAt": 1778808096764, - "isView": false, - "order": 43, - "schema": "public" - }, - { - "id": "390", - "name": "user_sessions", - "x": -1381.9054198604924, - "y": -1329.3058623634636, - "fields": [ - { - "id": "391", + "id": "377", "name": "id", "type": { "id": "uuid", "name": "uuid" }, + "primaryKey": true, "unique": true, "nullable": false, - "primaryKey": true, - "createdAt": 1778814742487 + "createdAt": 1777282589094 }, { - "id": "392", - "name": "user_id", + "id": "378", + "name": "service_id", "type": { "id": "uuid", "name": "uuid" }, + "primaryKey": false, "unique": false, "nullable": false, - "primaryKey": false, - "createdAt": 1778814761364 + "createdAt": 1777282589094 }, { - "id": "393", - "name": "device_type", - "type": { - "id": "device_type", - "name": "device_type" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778814807191 - }, - { - "id": "394", - "name": "os_type", + "id": "379", + "name": "video_code", "type": { "id": "varchar", "name": "varchar" }, - "unique": false, - "nullable": true, "primaryKey": false, - "createdAt": 1778814771991 - }, - { - "id": "395", - "name": "os_version", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778814781826 - }, - { - "id": "396", - "name": "browser_name", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778814787821 - }, - { - "id": "397", - "name": "browser_version", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778814794245 - }, - { - "id": "398", - "name": "ip_login", - "type": { - "id": "inet", - "name": "inet" - }, "unique": false, "nullable": false, - "primaryKey": false, - "createdAt": 1778814801981 - }, - { - "id": "399", - "name": "last_activity_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778814857539 - }, - { - "id": "400", - "name": "login_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778814816604 - }, - { - "id": "401", - "name": "logout_at", - "type": { - "id": "timestamp", - "name": "timestamp" - }, - "unique": false, - "nullable": true, - "primaryKey": false, - "createdAt": 1778814877334 - } - ], - "indexes": [ - { - "id": "402", - "name": "", - "fieldIds": [ - "391" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1778814742487 - } - ], - "color": "#4dee8a", - "createdAt": 1778814742487, - "isView": false, - "order": 44, - "schema": "public", - "expanded": true - }, - { - "id": "403", - "name": "user_addresses", - "x": 655.2842034425264, - "y": -1010.0698801871714, - "fields": [ - { - "id": "404", - "name": "user_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1778816506150 - }, - { - "id": "405", - "name": "street_address", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778816542685, + "createdAt": 1777282589094, "characterMaximumLength": "255" }, { - "id": "406", - "name": "district", + "id": "380", + "name": "short_code", "type": { "id": "varchar", "name": "varchar" }, - "unique": false, - "nullable": false, "primaryKey": false, - "createdAt": 1778816551994, - "characterMaximumLength": "100" - }, - { - "id": "407", - "name": "city", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778816560720, - "characterMaximumLength": "100" - }, - { - "id": "408", - "name": "province", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778816564935, - "characterMaximumLength": "100" - }, - { - "id": "409", - "name": "postal_code", - "type": { - "id": "varchar", - "name": "varchar" - }, - "unique": false, - "nullable": false, - "primaryKey": false, - "createdAt": 1778816568904, - "characterMaximumLength": "20" - }, - { - "id": "410", - "name": "coordinate", - "type": { - "id": "varchar", - "name": "varchar" - }, "unique": false, "nullable": true, - "primaryKey": false, - "createdAt": 1778816577336, - "characterMaximumLength": "50" + "createdAt": 1777282589094, + "characterMaximumLength": "255" }, { - "id": "411", + "id": "381", + "name": "thumbnail_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "382", + "name": "download_code", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "383", + "name": "pending_upload", + "type": { + "id": "boolean", + "name": "boolean" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "default": "true" + }, + { + "id": "384", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "385", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "386", "name": "updated_at", "type": { "id": "timestamp", "name": "timestamp" }, + "primaryKey": false, "unique": false, "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "387", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, "primaryKey": false, - "createdAt": 1778816585545 + "unique": false, + "nullable": false, + "createdAt": 1777282589094 } ], "indexes": [ { - "id": "412", + "id": "388", "name": "", - "fieldIds": [ - "404" - ], "unique": true, - "isPrimaryKey": true, - "createdAt": 1778816506150 + "fieldIds": [ + "377" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 15, + "diagramId": "3taaalng0ut0" + }, + { + "id": "389", + "name": "producers", + "schema": "public", + "x": 614.2665328827337, + "y": 137.7660218436568, + "fields": [ + { + "id": "390", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "391", + "name": "mal_id", + "type": { + "id": "int", + "name": "int" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "392", + "name": "type", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589093, + "characterMaximumLength": "24" + }, + { + "id": "393", + "name": "name", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094, + "characterMaximumLength": "155" + }, + { + "id": "394", + "name": "url", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094, + "characterMaximumLength": "255" + }, + { + "id": "395", + "name": "created_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "396", + "name": "deleted_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589094 + }, + { + "id": "397", + "name": "updated_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + }, + { + "id": "398", + "name": "created_at", + "type": { + "id": "timestamp", + "name": "timestamp" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1777282589094 + } + ], + "indexes": [ + { + "id": "399", + "name": "", + "unique": true, + "fieldIds": [ + "390" + ], + "createdAt": 1777282589094, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589094, + "order": 13, + "diagramId": "3taaalng0ut0" + }, + { + "id": "400", + "name": "voice_actors", + "schema": "public", + "x": -1034.5971892955995, + "y": 536.4407371208936, + "fields": [ + { + "id": "401", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": true, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "402", + "name": "language", + "type": { + "id": "varchar", + "name": "varchar" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093, + "characterMaximumLength": "115" + }, + { + "id": "403", + "name": "actor_staff", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": true, + "createdAt": 1777282589093 + } + ], + "indexes": [ + { + "id": "404", + "name": "", + "unique": true, + "fieldIds": [ + "401" + ], + "createdAt": 1777282589093, + "isPrimaryKey": true + } + ], + "color": "#ff9f74", + "isView": false, + "createdAt": 1777282589093, + "order": 11, + "diagramId": "3taaalng0ut0" + }, + { + "id": "405", + "name": "user_genre_preferences", + "schema": "public", + "x": -1033.5708487432953, + "y": -1502.401339834144, + "fields": [ + { + "id": "406", + "name": "user_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": true, + "nullable": false, + "createdAt": 1778548513047 + }, + { + "id": "407", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548529915 + }, + { + "id": "408", + "name": "state", + "type": { + "id": "user_preference_state", + "name": "user_preference_state" + }, + "primaryKey": false, + "unique": false, + "nullable": false, + "createdAt": 1778548535529 + } + ], + "indexes": [ + { + "id": "409", + "name": "index_1", + "unique": true, + "fieldIds": [ + "406", + "407" + ], + "createdAt": 1778548614328 } ], "color": "#4dee8a", - "createdAt": 1778816506150, "isView": false, - "order": 45, - "schema": "public" + "createdAt": 1778548513047, + "order": 31, + "diagramId": "3taaalng0ut0" } ], "relationships": [ { - "id": "413", + "id": "410", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "297", + "sourceTableId": "233", "targetSchema": "public", - "targetTableId": "136", - "sourceFieldId": "298", - "targetFieldId": "138", + "targetTableId": "201", + "sourceFieldId": "234", + "targetFieldId": "203", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766565819, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "414", + "id": "411", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "251", + "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "136", - "sourceFieldId": "252", - "targetFieldId": "141", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778766863110, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "415", - "name": "collection_members_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "136", - "sourceFieldId": "252", - "targetFieldId": "139", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778766807732, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "417", - "name": "comment_audit_logs_comment_id_fk", - "sourceSchema": "public", - "sourceTableId": "209", - "targetSchema": "public", - "targetTableId": "118", - "sourceFieldId": "210", - "targetFieldId": "120", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777327740, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "418", - "name": "comment_audit_logs_performed_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "118", - "sourceFieldId": "252", - "targetFieldId": "121", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777342519, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "420", - "name": "comment_reports_comment_id_fk", - "sourceSchema": "public", - "sourceTableId": "209", - "targetSchema": "public", - "targetTableId": "281", - "sourceFieldId": "210", - "targetFieldId": "284", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777586444, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "421", - "name": "comment_reports_reporter_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "281", - "sourceFieldId": "252", - "targetFieldId": "283", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777570446, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "422", - "name": "comments_episode_id_fk", - "sourceSchema": "public", - "sourceTableId": "5", - "targetSchema": "public", - "targetTableId": "209", - "sourceFieldId": "6", - "targetFieldId": "212", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777292243, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "423", - "name": "comments_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "209", - "sourceFieldId": "252", - "targetFieldId": "211", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778777252269, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "424", - "name": "episodes_media_id_medias_id", - "sourceSchema": "public", - "sourceTableId": "5", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "7", - "targetFieldId": "38", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "425", - "name": "episodes_videos_videos_id", - "sourceSchema": "public", - "sourceTableId": "5", - "targetSchema": "public", - "targetTableId": "92", - "sourceFieldId": "19", - "targetFieldId": "93", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "426", - "name": "genre_selected_genre_id_fk", - "sourceSchema": "public", - "sourceTableId": "290", - "targetSchema": "public", - "targetTableId": "198", - "sourceFieldId": "291", - "targetFieldId": "200", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548598785, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "427", - "name": "genre_selected_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "182", - "targetSchema": "public", - "targetTableId": "198", - "sourceFieldId": "183", - "targetFieldId": "199", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548583401, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "428", - "name": "genres_id_fk", - "sourceSchema": "public", - "sourceTableId": "290", - "targetSchema": "public", - "targetTableId": "380", - "sourceFieldId": "291", - "targetFieldId": "382", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777295361546, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "429", - "name": "home_media_banner_created_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "242", - "sourceFieldId": "252", - "targetFieldId": "245", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778771806907, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "430", - "name": "home_media_banner_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "242", - "sourceFieldId": "38", - "targetFieldId": "244", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778771781222, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "431", - "name": "media_characters_characters_characters_id", - "sourceSchema": "public", - "sourceTableId": "125", - "targetSchema": "public", - "targetTableId": "24", - "sourceFieldId": "128", - "targetFieldId": "25", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "432", - "name": "media_characters_voice_actor_voice_actors_id", - "sourceSchema": "public", - "sourceTableId": "125", - "targetSchema": "public", - "targetTableId": "305", - "sourceFieldId": "129", - "targetFieldId": "306", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "433", - "name": "media_collections_added_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "203", - "sourceFieldId": "252", + "targetTableId": "201", + "sourceFieldId": "156", "targetFieldId": "206", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778733368958, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778766863110, + "diagramId": "3taaalng0ut0" }, { - "id": "434", - "name": "media_collections_collection_id_fk", + "id": "412", + "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "297", + "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "203", - "sourceFieldId": "298", + "targetTableId": "201", + "sourceFieldId": "156", "targetFieldId": "204", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778733702652, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778766807732, + "diagramId": "3taaalng0ut0" }, { - "id": "435", - "name": "media_explicit_genres_genre_id_fk", + "id": "413", + "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "290", + "sourceTableId": "123", "targetSchema": "public", - "targetTableId": "152", - "sourceFieldId": "291", - "targetFieldId": "154", + "targetTableId": "274", + "sourceFieldId": "124", + "targetFieldId": "276", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777283900006, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777327740, + "diagramId": "3taaalng0ut0" }, { - "id": "436", - "name": "media_explicit_genres_media_id_fk", + "id": "414", + "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "152", - "sourceFieldId": "70", - "targetFieldId": "153", + "targetTableId": "274", + "sourceFieldId": "156", + "targetFieldId": "277", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777283887322, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777342519, + "diagramId": "3taaalng0ut0" }, { - "id": "437", - "name": "media_external_links_media_id_fk", + "id": "415", + "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "123", "targetSchema": "public", - "targetTableId": "156", - "sourceFieldId": "38", - "targetFieldId": "158", + "targetTableId": "281", + "sourceFieldId": "124", + "targetFieldId": "283", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777299855251, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778808350916, + "diagramId": "3taaalng0ut0" }, { - "id": "438", - "name": "media_external_links_media_id_medias_id", + "id": "416", + "name": "comment_likes_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "76", "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "158", - "targetFieldId": "38", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "439", - "name": "media_genres_genre_id_fk", - "sourceSchema": "public", - "sourceTableId": "290", - "targetSchema": "public", - "targetTableId": "320", - "sourceFieldId": "291", - "targetFieldId": "322", + "targetTableId": "281", + "sourceFieldId": "77", + "targetFieldId": "282", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777283616203, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778808338630, + "diagramId": "3taaalng0ut0" }, { - "id": "440", - "name": "media_genres_media_id_fk", + "id": "417", + "name": "comment_reports_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "123", "targetSchema": "public", - "targetTableId": "320", - "sourceFieldId": "68", - "targetFieldId": "321", + "targetTableId": "302", + "sourceFieldId": "124", + "targetFieldId": "305", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777283611719, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777586444, + "diagramId": "3taaalng0ut0" }, { - "id": "441", - "name": "media_producers_producer_id_fk", + "id": "418", + "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "166", + "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "109", - "sourceFieldId": "167", - "targetFieldId": "111", + "targetTableId": "302", + "sourceFieldId": "156", + "targetFieldId": "304", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777360252829, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777570446, + "diagramId": "3taaalng0ut0" }, { - "id": "442", - "name": "media_relations_target_media_fk", + "id": "419", + "name": "comments_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "83", - "sourceFieldId": "38", - "targetFieldId": "86", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777299808576, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "443", - "name": "media_relations_target_media_fk", - "sourceSchema": "public", - "sourceTableId": "83", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "86", - "targetFieldId": "38", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777299795695, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "444", - "name": "media_relations_target_media_fk", - "sourceSchema": "public", - "sourceTableId": "83", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "86", - "targetFieldId": "38", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777299804996, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "445", - "name": "media_relations_target_media_medias_id", - "sourceSchema": "public", - "sourceTableId": "83", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "86", - "targetFieldId": "38", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "446", - "name": "media_submissions_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "342", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "344", - "targetFieldId": "38", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777636061160, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "447", - "name": "media_submissions_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "342", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "344", - "targetFieldId": "38", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777364362256, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "448", - "name": "media_types_id_medias_type", - "sourceSchema": "public", - "sourceTableId": "371", - "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "372", - "targetFieldId": "49", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "449", - "name": "medias_age_rating_media_age_ratings_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "113", - "sourceFieldId": "55", - "targetFieldId": "114", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "450", - "name": "medias_characters_media_characters_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "125", - "sourceFieldId": "75", + "targetTableId": "123", + "sourceFieldId": "350", "targetFieldId": "126", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777292243, + "diagramId": "3taaalng0ut0" }, { - "id": "451", - "name": "medias_country_fk", + "id": "420", + "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "144", + "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "37", - "sourceFieldId": "145", - "targetFieldId": "63", + "targetTableId": "123", + "sourceFieldId": "156", + "targetFieldId": "125", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778402285202, - "diagramId": "yqwsqwccoj6v" + "createdAt": 1778777252269, + "diagramId": "3taaalng0ut0" }, { - "id": "452", - "name": "medias_episodes_episodes_id", + "id": "421", + "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "5", - "sourceFieldId": "69", - "targetFieldId": "6", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "453", - "name": "medias_external_links_media_external_links_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "156", - "sourceFieldId": "74", - "targetFieldId": "157", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "454", - "name": "medias_id_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "203", - "sourceFieldId": "38", - "targetFieldId": "205", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778733359073, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "455", - "name": "medias_licensors_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "277", - "sourceFieldId": "66", - "targetFieldId": "278", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360403880, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "456", - "name": "medias_producers_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "109", - "sourceFieldId": "65", - "targetFieldId": "110", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360239834, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "457", - "name": "medias_relations_media_relations_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "83", - "sourceFieldId": "73", - "targetFieldId": "84", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "458", - "name": "medias_source_media_sources_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "88", - "sourceFieldId": "50", - "targetFieldId": "89", + "targetTableId": "76", + "sourceFieldId": "351", + "targetFieldId": "77", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "459", - "name": "medias_status_media_statuses_id", + "id": "422", + "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "162", - "sourceFieldId": "51", - "targetFieldId": "163", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "460", - "name": "medias_studios_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "273", - "sourceFieldId": "67", - "targetFieldId": "274", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360574406, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "461", - "name": "medias_themes_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "380", - "sourceFieldId": "71", - "targetFieldId": "381", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777295350412, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "462", - "name": "medias_trailers_media_trailers_id", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "362", - "sourceFieldId": "44", - "targetFieldId": "363", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "463", - "name": "producers_id_fk", - "sourceSchema": "public", - "sourceTableId": "166", - "targetSchema": "public", - "targetTableId": "277", - "sourceFieldId": "167", - "targetFieldId": "279", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360416280, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "464", - "name": "producers_id_fk", - "sourceSchema": "public", - "sourceTableId": "166", - "targetSchema": "public", - "targetTableId": "273", - "sourceFieldId": "167", - "targetFieldId": "275", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777360597827, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "465", - "name": "provisioned_users_provisioned_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "131", - "sourceFieldId": "252", - "targetFieldId": "132", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778517515380, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "466", - "name": "provisioned_users_provisioned_to_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "131", - "sourceFieldId": "252", - "targetFieldId": "133", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778517541887, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "467", - "name": "rating_selected_rating_id_fk", - "sourceSchema": "public", - "sourceTableId": "113", - "targetSchema": "public", - "targetTableId": "1", - "sourceFieldId": "114", - "targetFieldId": "3", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548767353, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "468", - "name": "rating_selected_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "182", - "targetSchema": "public", - "targetTableId": "1", - "sourceFieldId": "183", - "targetFieldId": "2", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778548748682, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "471", - "name": "user_country_preferences_country_id_fk", - "sourceSchema": "public", - "sourceTableId": "144", - "targetSchema": "public", - "targetTableId": "105", - "sourceFieldId": "145", - "targetFieldId": "107", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778549061296, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "472", - "name": "user_country_preferences_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "182", - "targetSchema": "public", - "targetTableId": "105", - "sourceFieldId": "183", - "targetFieldId": "106", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778549044482, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "473", - "name": "user_follows_follower_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "252", - "targetFieldId": "376", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778402073659, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "474", - "name": "user_follows_following_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "252", + "targetTableId": "376", + "sourceFieldId": "363", "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778402077836, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "475", - "name": "user_preferences_character_as_partner_fk", - "sourceSchema": "public", - "sourceTableId": "24", - "targetSchema": "public", - "targetTableId": "182", - "sourceFieldId": "25", - "targetFieldId": "184", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778518451836, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "478", - "name": "user_preferences_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "182", - "targetSchema": "public", - "targetTableId": "251", - "sourceFieldId": "183", - "targetFieldId": "252", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1778517654898, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "479", - "name": "user_watch_histories_episode_id_fk", - "sourceSchema": "public", - "sourceTableId": "5", - "targetSchema": "public", - "targetTableId": "177", - "sourceFieldId": "6", - "targetFieldId": "179", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778732139998, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "480", - "name": "user_watch_histories_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "177", - "sourceFieldId": "252", - "targetFieldId": "178", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778731708617, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "481", - "name": "users_country_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "144", - "sourceFieldId": "263", - "targetFieldId": "145", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1778401651979, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "482", - "name": "video_service_submissions_video_service_id_fk", - "sourceSchema": "public", - "sourceTableId": "352", - "targetSchema": "public", - "targetTableId": "325", - "sourceFieldId": "354", - "targetFieldId": "326", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777364068966, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "483", - "name": "video_submissions_created_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "310", - "sourceFieldId": "252", - "targetFieldId": "313", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778732667055, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "484", - "name": "video_submissions_reviewed_by_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "310", - "sourceFieldId": "252", - "targetFieldId": "314", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778732708490, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "485", - "name": "video_submissions_video_id_fk", - "sourceSchema": "public", - "sourceTableId": "310", - "targetSchema": "public", - "targetTableId": "92", - "sourceFieldId": "312", - "targetFieldId": "93", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1778732648012, - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "486", - "name": "videos_service_id_video_services_id", - "sourceSchema": "public", - "sourceTableId": "92", - "targetSchema": "public", - "targetTableId": "325", - "sourceFieldId": "94", - "targetFieldId": "326", - "sourceCardinality": "many", - "targetCardinality": "one", "createdAt": 1777282589095, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "487", - "name": "voice_actors_actor_staff_staff_id", + "id": "423", + "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "305", + "sourceTableId": "327", "targetSchema": "public", - "targetTableId": "232", - "sourceFieldId": "308", - "targetFieldId": "233", + "targetTableId": "405", + "sourceFieldId": "328", + "targetFieldId": "407", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548598785, + "diagramId": "3taaalng0ut0" + }, + { + "id": "424", + "name": "genre_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "311", + "targetSchema": "public", + "targetTableId": "405", + "sourceFieldId": "312", + "targetFieldId": "406", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548583401, + "diagramId": "3taaalng0ut0" + }, + { + "id": "425", + "name": "genres_id_fk", + "sourceSchema": "public", + "sourceTableId": "327", + "targetSchema": "public", + "targetTableId": "72", + "sourceFieldId": "328", + "targetFieldId": "74", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777295361546, + "diagramId": "3taaalng0ut0" + }, + { + "id": "426", + "name": "home_media_banner_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "47", + "sourceFieldId": "156", + "targetFieldId": "50", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771806907, + "diagramId": "3taaalng0ut0" + }, + { + "id": "427", + "name": "home_media_banner_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "47", + "sourceFieldId": "77", + "targetFieldId": "49", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778771781222, + "diagramId": "3taaalng0ut0" + }, + { + "id": "428", + "name": "media_characters_characters_characters_id", + "sourceSchema": "public", + "sourceTableId": "31", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "34", + "targetFieldId": "2", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "488", - "name": "comment_likes_user_id_fk", + "id": "429", + "name": "media_characters_voice_actor_voice_actors_id", + "sourceSchema": "public", + "sourceTableId": "31", + "targetSchema": "public", + "targetTableId": "400", + "sourceFieldId": "35", + "targetFieldId": "401", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589095, + "diagramId": "3taaalng0ut0" + }, + { + "id": "430", + "name": "media_collections_added_by_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "209", + "sourceFieldId": "156", + "targetFieldId": "212", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733368958, + "diagramId": "3taaalng0ut0" + }, + { + "id": "431", + "name": "media_collections_collection_id_fk", + "sourceSchema": "public", + "sourceTableId": "233", + "targetSchema": "public", + "targetTableId": "209", + "sourceFieldId": "234", + "targetFieldId": "210", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733702652, + "diagramId": "3taaalng0ut0" + }, + { + "id": "432", + "name": "media_explicit_genres_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "327", + "targetSchema": "public", + "targetTableId": "225", + "sourceFieldId": "328", + "targetFieldId": "227", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283900006, + "diagramId": "3taaalng0ut0" + }, + { + "id": "433", + "name": "media_explicit_genres_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "225", + "sourceFieldId": "106", + "targetFieldId": "226", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283887322, + "diagramId": "3taaalng0ut0" + }, + { + "id": "434", + "name": "media_external_links_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "56", + "sourceFieldId": "77", + "targetFieldId": "58", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777299855251, + "diagramId": "3taaalng0ut0" + }, + { + "id": "435", + "name": "media_external_links_media_id_medias_id", + "sourceSchema": "public", + "sourceTableId": "56", + "targetSchema": "public", + "targetTableId": "76", + "sourceFieldId": "58", + "targetFieldId": "77", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "436", + "name": "media_genres_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "327", + "targetSchema": "public", + "targetTableId": "14", + "sourceFieldId": "328", + "targetFieldId": "16", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283616203, + "diagramId": "3taaalng0ut0" + }, + { + "id": "437", + "name": "media_genres_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "14", + "sourceFieldId": "105", + "targetFieldId": "15", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777283611719, + "diagramId": "3taaalng0ut0" + }, + { + "id": "438", + "name": "media_producers_producer_id_fk", + "sourceSchema": "public", + "sourceTableId": "389", + "targetSchema": "public", + "targetTableId": "372", + "sourceFieldId": "390", + "targetFieldId": "374", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360252829, + "diagramId": "3taaalng0ut0" + }, + { + "id": "439", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "220", + "sourceFieldId": "77", + "targetFieldId": "223", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777299808576, + "diagramId": "3taaalng0ut0" + }, + { + "id": "440", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "220", + "targetSchema": "public", + "targetTableId": "76", + "sourceFieldId": "223", + "targetFieldId": "77", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777299804996, + "diagramId": "3taaalng0ut0" + }, + { + "id": "441", + "name": "media_relations_target_media_fk", + "sourceSchema": "public", + "sourceTableId": "220", + "targetSchema": "public", + "targetTableId": "76", + "sourceFieldId": "223", + "targetFieldId": "77", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777299795695, + "diagramId": "3taaalng0ut0" + }, + { + "id": "442", + "name": "media_relations_target_media_medias_id", + "sourceSchema": "public", + "sourceTableId": "220", + "targetSchema": "public", + "targetTableId": "76", + "sourceFieldId": "223", + "targetFieldId": "77", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "443", + "name": "media_submissions_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "384", - "sourceFieldId": "38", - "targetFieldId": "385", + "targetTableId": "76", + "sourceFieldId": "39", + "targetFieldId": "77", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778808338630 + "createdAt": 1777636061160, + "diagramId": "3taaalng0ut0" }, { - "id": "489", - "name": "comment_likes_comment_id_fk", + "id": "444", + "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "209", + "sourceTableId": "37", "targetSchema": "public", - "targetTableId": "384", - "sourceFieldId": "210", - "targetFieldId": "386", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778808350916 - }, - { - "id": "490", - "name": "user_sessions_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "251", - "targetSchema": "public", - "targetTableId": "390", - "sourceFieldId": "252", - "targetFieldId": "392", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1778815073839 - }, - { - "id": "491", - "name": "user_addresses_user_id_fk", - "sourceSchema": "public", - "sourceTableId": "403", - "targetSchema": "public", - "targetTableId": "251", - "sourceFieldId": "404", - "targetFieldId": "252", + "targetTableId": "76", + "sourceFieldId": "39", + "targetFieldId": "77", "sourceCardinality": "one", "targetCardinality": "one", - "createdAt": 1778816615538 + "createdAt": 1777364362256, + "diagramId": "3taaalng0ut0" }, { - "id": "492", - "name": "user_oauth_credentials_user_id_fk", + "id": "445", + "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "251", + "sourceTableId": "146", "targetSchema": "public", - "targetTableId": "218", - "sourceFieldId": "252", - "targetFieldId": "220", + "targetTableId": "76", + "sourceFieldId": "147", + "targetFieldId": "88", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1778822260934 + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "446", + "name": "medias_age_rating_media_age_ratings_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "187", + "sourceFieldId": "94", + "targetFieldId": "188", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "447", + "name": "medias_characters_media_characters_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "31", + "sourceFieldId": "111", + "targetFieldId": "32", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "448", + "name": "medias_country_fk", + "sourceSchema": "public", + "sourceTableId": "19", + "targetSchema": "public", + "targetTableId": "76", + "sourceFieldId": "20", + "targetFieldId": "100", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402285202, + "diagramId": "3taaalng0ut0" + }, + { + "id": "449", + "name": "medias_external_links_media_external_links_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "56", + "sourceFieldId": "110", + "targetFieldId": "57", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "450", + "name": "medias_id_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "209", + "sourceFieldId": "77", + "targetFieldId": "211", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778733359073, + "diagramId": "3taaalng0ut0" + }, + { + "id": "451", + "name": "medias_licensors_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "258", + "sourceFieldId": "103", + "targetFieldId": "259", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360403880, + "diagramId": "3taaalng0ut0" + }, + { + "id": "452", + "name": "medias_producers_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "372", + "sourceFieldId": "102", + "targetFieldId": "373", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360239834, + "diagramId": "3taaalng0ut0" + }, + { + "id": "453", + "name": "medias_relations_media_relations_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "220", + "sourceFieldId": "109", + "targetFieldId": "221", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "454", + "name": "medias_source_media_sources_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "368", + "sourceFieldId": "89", + "targetFieldId": "369", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "455", + "name": "medias_status_media_statuses_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "229", + "sourceFieldId": "90", + "targetFieldId": "230", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "456", + "name": "medias_studios_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "119", + "sourceFieldId": "104", + "targetFieldId": "120", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360574406, + "diagramId": "3taaalng0ut0" + }, + { + "id": "457", + "name": "medias_themes_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "72", + "sourceFieldId": "107", + "targetFieldId": "73", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777295350412, + "diagramId": "3taaalng0ut0" + }, + { + "id": "458", + "name": "medias_trailers_media_trailers_id", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "192", + "sourceFieldId": "83", + "targetFieldId": "193", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "459", + "name": "producers_id_fk", + "sourceSchema": "public", + "sourceTableId": "389", + "targetSchema": "public", + "targetTableId": "119", + "sourceFieldId": "390", + "targetFieldId": "121", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360597827, + "diagramId": "3taaalng0ut0" + }, + { + "id": "460", + "name": "producers_id_fk", + "sourceSchema": "public", + "sourceTableId": "389", + "targetSchema": "public", + "targetTableId": "258", + "sourceFieldId": "390", + "targetFieldId": "260", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777360416280, + "diagramId": "3taaalng0ut0" + }, + { + "id": "461", + "name": "provisioned_users_provisioned_by_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "297", + "sourceFieldId": "156", + "targetFieldId": "298", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778517515380, + "diagramId": "3taaalng0ut0" + }, + { + "id": "462", + "name": "provisioned_users_provisioned_to_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "297", + "sourceFieldId": "156", + "targetFieldId": "299", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778517541887, + "diagramId": "3taaalng0ut0" + }, + { + "id": "463", + "name": "rating_selected_rating_id_fk", + "sourceSchema": "public", + "sourceTableId": "187", + "targetSchema": "public", + "targetTableId": "142", + "sourceFieldId": "188", + "targetFieldId": "144", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548767353, + "diagramId": "3taaalng0ut0" + }, + { + "id": "464", + "name": "rating_selected_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "311", + "targetSchema": "public", + "targetTableId": "142", + "sourceFieldId": "312", + "targetFieldId": "143", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778548748682, + "diagramId": "3taaalng0ut0" + }, + { + "id": "465", + "name": "user_addresses_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "62", + "targetSchema": "public", + "targetTableId": "155", + "sourceFieldId": "63", + "targetFieldId": "156", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778816615538, + "diagramId": "3taaalng0ut0" + }, + { + "id": "466", + "name": "user_country_preferences_country_id_fk", + "sourceSchema": "public", + "sourceTableId": "19", + "targetSchema": "public", + "targetTableId": "27", + "sourceFieldId": "20", + "targetFieldId": "29", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549061296, + "diagramId": "3taaalng0ut0" + }, + { + "id": "467", + "name": "user_country_preferences_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "311", + "targetSchema": "public", + "targetTableId": "27", + "sourceFieldId": "312", + "targetFieldId": "28", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778549044482, + "diagramId": "3taaalng0ut0" + }, + { + "id": "468", + "name": "user_follows_follower_id_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "215", + "sourceFieldId": "156", + "targetFieldId": "216", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402073659, + "diagramId": "3taaalng0ut0" + }, + { + "id": "469", + "name": "user_follows_following_id_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "215", + "sourceFieldId": "156", + "targetFieldId": "217", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778402077836, + "diagramId": "3taaalng0ut0" + }, + { + "id": "470", + "name": "user_oauth_credentials_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "335", + "sourceFieldId": "156", + "targetFieldId": "337", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778822260934, + "diagramId": "3taaalng0ut0" + }, + { + "id": "471", + "name": "user_preferences_character_as_partner_fk", + "sourceSchema": "public", + "sourceTableId": "1", + "targetSchema": "public", + "targetTableId": "311", + "sourceFieldId": "2", + "targetFieldId": "313", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778518451836, + "diagramId": "3taaalng0ut0" + }, + { + "id": "472", + "name": "user_preferences_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "311", + "targetSchema": "public", + "targetTableId": "155", + "sourceFieldId": "312", + "targetFieldId": "156", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778517654898, + "diagramId": "3taaalng0ut0" + }, + { + "id": "473", + "name": "user_sessions_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "262", + "sourceFieldId": "156", + "targetFieldId": "264", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778815073839, + "diagramId": "3taaalng0ut0" + }, + { + "id": "474", + "name": "user_watch_histories_episode_id_fk", + "sourceSchema": "public", + "sourceTableId": "349", + "targetSchema": "public", + "targetTableId": "150", + "sourceFieldId": "350", + "targetFieldId": "152", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778732139998, + "diagramId": "3taaalng0ut0" + }, + { + "id": "475", + "name": "user_watch_histories_user_id_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "150", + "sourceFieldId": "156", + "targetFieldId": "151", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778731708617, + "diagramId": "3taaalng0ut0" + }, + { + "id": "476", + "name": "users_country_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "19", + "sourceFieldId": "167", + "targetFieldId": "20", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778401651979, + "diagramId": "3taaalng0ut0" + }, + { + "id": "477", + "name": "video_service_submissions_video_service_id_fk", + "sourceSchema": "public", + "sourceTableId": "287", + "targetSchema": "public", + "targetTableId": "241", + "sourceFieldId": "289", + "targetFieldId": "242", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777364068966, + "diagramId": "3taaalng0ut0" + }, + { + "id": "478", + "name": "video_submissions_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "177", + "sourceFieldId": "156", + "targetFieldId": "180", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778732667055, + "diagramId": "3taaalng0ut0" + }, + { + "id": "479", + "name": "video_submissions_reviewed_by_fk", + "sourceSchema": "public", + "sourceTableId": "155", + "targetSchema": "public", + "targetTableId": "177", + "sourceFieldId": "156", + "targetFieldId": "181", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1778732708490, + "diagramId": "3taaalng0ut0" + }, + { + "id": "480", + "name": "video_submissions_video_id_fk", + "sourceSchema": "public", + "sourceTableId": "177", + "targetSchema": "public", + "targetTableId": "376", + "sourceFieldId": "179", + "targetFieldId": "377", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1778732648012, + "diagramId": "3taaalng0ut0" + }, + { + "id": "481", + "name": "videos_service_id_video_services_id", + "sourceSchema": "public", + "sourceTableId": "376", + "targetSchema": "public", + "targetTableId": "241", + "sourceFieldId": "378", + "targetFieldId": "242", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589095, + "diagramId": "3taaalng0ut0" + }, + { + "id": "482", + "name": "voice_actors_actor_staff_staff_id", + "sourceSchema": "public", + "sourceTableId": "400", + "targetSchema": "public", + "targetTableId": "132", + "sourceFieldId": "403", + "targetFieldId": "133", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "493", + "id": "483", "name": "audit_action", "kind": "enum", "values": [ @@ -6233,10 +6195,10 @@ "flag" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "494", + "id": "484", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6246,10 +6208,58 @@ "owner" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "495", + "id": "485", + "name": "device_type", + "kind": "enum", + "values": [ + "mobile", + "tablet", + "desktop", + "unknown" + ], + "fields": [], + "diagramId": "3taaalng0ut0" + }, + { + "id": "486", + "name": "like_type", + "kind": "enum", + "values": [ + "like", + "dislike" + ], + "fields": [], + "diagramId": "3taaalng0ut0" + }, + { + "id": "487", + "name": "media_season", + "kind": "enum", + "values": [ + "winter", + "spring", + "summer", + "fall" + ], + "fields": [], + "diagramId": "3taaalng0ut0" + }, + { + "id": "488", + "name": "oauth_provider", + "kind": "enum", + "values": [ + "google", + "github" + ], + "fields": [], + "diagramId": "3taaalng0ut0" + }, + { + "id": "489", "name": "privacy_level", "kind": "enum", "values": [ @@ -6258,10 +6268,10 @@ "public" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "496", + "id": "490", "name": "status_submission", "kind": "enum", "values": [ @@ -6270,10 +6280,10 @@ "rejected" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "497", + "id": "491", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6281,10 +6291,10 @@ "include" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "498", + "id": "492", "name": "user_role", "kind": "enum", "values": [ @@ -6294,10 +6304,10 @@ "administrator" ], "fields": [], - "diagramId": "yqwsqwccoj6v" + "diagramId": "3taaalng0ut0" }, { - "id": "499", + "id": "493", "name": "user_sex", "kind": "enum", "values": [ @@ -6305,39 +6315,7 @@ "male" ], "fields": [], - "diagramId": "yqwsqwccoj6v" - }, - { - "id": "500", - "name": "like_type", - "kind": "enum", - "values": [ - "like", - "dislike" - ], - "fields": [] - }, - { - "id": "501", - "name": "device_type", - "kind": "enum", - "values": [ - "mobile", - "tablet", - "desktop", - "unknown" - ], - "fields": [] - }, - { - "id": "502", - "name": "oauth_provider", - "kind": "enum", - "values": [ - "google", - "github" - ], - "fields": [] + "diagramId": "3taaalng0ut0" } ], "notes": [] From 27d772ec6bb51d6a796523edabea3cff0cce3e41 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 15 May 2026 21:00:00 +0700 Subject: [PATCH 23/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20genre?= =?UTF-8?q?s=20and=20related=20entities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 62 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a365505..2b29399 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -251,10 +251,10 @@ model Media { producers MediaProducer[] licensors MediaLicensor[] studios MediaStudio[] - // genres MediaGenre[] - // explicit_genres MediaExplicitGenre[] - // themes MediaTheme[] - // demographics MediaDemographic[] + genres MediaGenre[] + explicit_genres MediaExplicitGenre[] + themes MediaTheme[] + demographics MediaDemographic[] // relations MediaRelation[] // external_links MediaExternalLink[] // characters MediaCharacter[] @@ -366,6 +366,60 @@ model Producer { @@map("producers") } +model MediaGenre { + media Media @relation(fields: [media_id], references: [id]) + genre Genre @relation(fields: [genre_id], references: [id]) + + media_id String @db.Uuid + genre_id String @db.Uuid + @@id([media_id, genre_id]) + @@map("media_genres") +} + +model MediaExplicitGenre { + media Media @relation(fields: [media_id], references: [id]) + genre Genre @relation(fields: [genre_id], references: [id]) + + media_id String @db.Uuid + genre_id String @db.Uuid + @@id([media_id, genre_id]) + @@map("media_explicit_genres") +} + +model MediaTheme { + media Media @relation(fields: [media_id], references: [id]) + theme Genre @relation(fields: [genre_id], references: [id]) + + media_id String @db.Uuid + genre_id String @db.Uuid + @@id([media_id, genre_id]) + @@map("media_themes") +} + +model MediaDemographic { + media Media @relation(fields: [media_id], references: [id]) + demographic Genre @relation(fields: [demographic_id], references: [id]) + + media_id String @db.Uuid + demographic_id String @db.Uuid + @@id([media_id, demographic_id]) + @@map("media_demographics") +} + +model Genre { + id String @id @db.Uuid @default(uuid(7)) + mal_id Int @unique @db.SmallInt + name String @db.VarChar(100) + slug String @db.VarChar(115) + thumbnail_url String? @db.VarChar(255) + + media_genres MediaGenre[] + media_explicit_genres MediaExplicitGenre[] + media_themes MediaTheme[] + media_demographics MediaDemographic[] + @@map("genres") +} + /** From eb7a3ba9355c60ae27323f30e1a1d67d05966fb0 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 16 May 2026 21:00:00 +0700 Subject: [PATCH 24/42] =?UTF-8?q?=F0=9F=93=9D=20docs:=20matching=20diagram?= =?UTF-8?q?=20docs=20with=20current=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 521 +++++++++++++++++++++++++------------------- 1 file changed, 292 insertions(+), 229 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 742282d..40922e3 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-19T16:28:02.086Z", - "updatedAt": "2026-05-19T16:37:21.649Z", + "updatedAt": "2026-05-19T17:18:18.265Z", "databaseType": "postgresql", "tables": [ { @@ -390,8 +390,8 @@ "id": "31", "name": "media_characters", "schema": "public", - "x": -679.8245105809615, - "y": 896.9123102253633, + "x": -678.5745105809615, + "y": 1034.4123102253634, "fields": [ { "id": "32", @@ -4141,24 +4141,11 @@ }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589094 }, { "id": "330", - "name": "mal_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589094, - "characterMaximumLength": "155" - }, - { - "id": "331", "name": "name", "type": { "id": "varchar", @@ -4168,11 +4155,11 @@ "nullable": false, "primaryKey": false, "createdAt": 1779208587903, - "characterMaximumLength": "32", + "characterMaximumLength": "100", "default": null }, { - "id": "332", + "id": "331", "name": "slug", "type": { "id": "varchar", @@ -4182,10 +4169,10 @@ "unique": false, "nullable": false, "createdAt": 1777282589094, - "characterMaximumLength": "38" + "characterMaximumLength": "115" }, { - "id": "333", + "id": "332", "name": "thumbnail_url", "type": { "id": "varchar", @@ -4200,7 +4187,7 @@ ], "indexes": [ { - "id": "334", + "id": "333", "name": "", "unique": true, "fieldIds": [ @@ -4217,14 +4204,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "335", + "id": "334", "name": "user_oauth_accounts", "schema": "public", "x": 200.04156829298174, "y": -928.8832495975014, "fields": [ { - "id": "336", + "id": "335", "name": "id", "type": { "id": "uuid", @@ -4236,7 +4223,7 @@ "createdAt": 1778516299633 }, { - "id": "337", + "id": "336", "name": "user_id", "type": { "id": "uuid", @@ -4248,7 +4235,7 @@ "createdAt": 1778516366928 }, { - "id": "338", + "id": "337", "name": "provider_name", "type": { "id": "oauth_provider", @@ -4260,7 +4247,7 @@ "createdAt": 1778822365657 }, { - "id": "339", + "id": "338", "name": "provider_sub", "type": { "id": "varchar", @@ -4273,7 +4260,7 @@ "characterMaximumLength": "255" }, { - "id": "340", + "id": "339", "name": "provider_email", "type": { "id": "varchar", @@ -4287,7 +4274,7 @@ "default": null }, { - "id": "341", + "id": "340", "name": "access_token", "type": { "id": "varchar", @@ -4301,7 +4288,7 @@ "default": null }, { - "id": "342", + "id": "341", "name": "refresh_token", "type": { "id": "varchar", @@ -4314,7 +4301,7 @@ "characterMaximumLength": "255" }, { - "id": "343", + "id": "342", "name": "last_login", "type": { "id": "timestamptz", @@ -4326,7 +4313,7 @@ "createdAt": 1778516872367 }, { - "id": "344", + "id": "343", "name": "expires_at", "type": { "id": "timestamptz", @@ -4338,7 +4325,7 @@ "createdAt": 1778822177415 }, { - "id": "345", + "id": "344", "name": "created_at", "type": { "id": "timestamptz", @@ -4350,7 +4337,7 @@ "createdAt": 1778822183677 }, { - "id": "346", + "id": "345", "name": "updated_at", "type": { "id": "timestamptz", @@ -4364,22 +4351,22 @@ ], "indexes": [ { - "id": "347", + "id": "346", "name": "", "unique": true, "fieldIds": [ - "336" + "335" ], "createdAt": 1778516299633, "isPrimaryKey": true }, { - "id": "348", + "id": "347", "name": "index_2", "unique": true, "fieldIds": [ - "337", - "338" + "336", + "337" ], "createdAt": 1778516903425 } @@ -4392,14 +4379,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "349", + "id": "348", "name": "episodes", "schema": "public", "x": 196.42495741544377, "y": 550.6255135491608, "fields": [ { - "id": "350", + "id": "349", "name": "id", "type": { "id": "uuid", @@ -4411,7 +4398,7 @@ "createdAt": 1777282589093 }, { - "id": "351", + "id": "350", "name": "media_id", "type": { "id": "uuid", @@ -4423,7 +4410,7 @@ "createdAt": 1777282589093 }, { - "id": "352", + "id": "351", "name": "episode", "type": { "id": "smallint", @@ -4435,7 +4422,7 @@ "createdAt": 1777282589093 }, { - "id": "353", + "id": "352", "name": "mal_url", "type": { "id": "varchar", @@ -4448,7 +4435,7 @@ "characterMaximumLength": "255" }, { - "id": "354", + "id": "353", "name": "mal_forum_url", "type": { "id": "varchar", @@ -4461,7 +4448,7 @@ "characterMaximumLength": "255" }, { - "id": "355", + "id": "354", "name": "title", "type": { "id": "varchar", @@ -4474,7 +4461,7 @@ "characterMaximumLength": "155" }, { - "id": "356", + "id": "355", "name": "title_origin", "type": { "id": "varchar", @@ -4487,7 +4474,7 @@ "characterMaximumLength": "155" }, { - "id": "357", + "id": "356", "name": "title_romanji", "type": { "id": "varchar", @@ -4500,7 +4487,7 @@ "characterMaximumLength": "155" }, { - "id": "358", + "id": "357", "name": "aired", "type": { "id": "date", @@ -4512,7 +4499,7 @@ "createdAt": 1777282589093 }, { - "id": "359", + "id": "358", "name": "filler", "type": { "id": "boolean", @@ -4525,7 +4512,7 @@ "default": "false" }, { - "id": "360", + "id": "359", "name": "recap", "type": { "id": "boolean", @@ -4538,7 +4525,7 @@ "default": "false" }, { - "id": "361", + "id": "360", "name": "total_score", "type": { "id": "int", @@ -4550,7 +4537,7 @@ "createdAt": 1777361135322 }, { - "id": "362", + "id": "361", "name": "scored_by", "type": { "id": "int", @@ -4562,7 +4549,7 @@ "createdAt": 1777361233825 }, { - "id": "363", + "id": "362", "name": "videos", "type": { "id": "uuid", @@ -4574,7 +4561,7 @@ "createdAt": 1777282589093 }, { - "id": "364", + "id": "363", "name": "deleted_at", "type": { "id": "timestamp", @@ -4586,7 +4573,7 @@ "createdAt": 1777282589093 }, { - "id": "365", + "id": "364", "name": "updated_at", "type": { "id": "timestamp", @@ -4598,7 +4585,7 @@ "createdAt": 1777282589093 }, { - "id": "366", + "id": "365", "name": "created_at", "type": { "id": "timestamp", @@ -4612,11 +4599,11 @@ ], "indexes": [ { - "id": "367", + "id": "366", "name": "", "unique": true, "fieldIds": [ - "350" + "349" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4630,14 +4617,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "368", + "id": "367", "name": "media_sources", "schema": "public", "x": -680.0105470895069, "y": 97.06852307742538, "fields": [ { - "id": "369", + "id": "368", "name": "id", "type": { "id": "uuid", @@ -4649,7 +4636,7 @@ "createdAt": 1777282589093 }, { - "id": "370", + "id": "369", "name": "name", "type": { "id": "varchar", @@ -4664,11 +4651,11 @@ ], "indexes": [ { - "id": "371", + "id": "370", "name": "", "unique": true, "fieldIds": [ - "369" + "368" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4681,14 +4668,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "372", + "id": "371", "name": "media_producers", "schema": "public", "x": 194.9363737010458, "y": 104.92238147821836, "fields": [ { - "id": "373", + "id": "372", "name": "media_id", "type": { "id": "uuid", @@ -4700,7 +4687,7 @@ "createdAt": 1777360177611 }, { - "id": "374", + "id": "373", "name": "producer_id", "type": { "id": "uuid", @@ -4714,12 +4701,12 @@ ], "indexes": [ { - "id": "375", + "id": "374", "name": "", "unique": true, "fieldIds": [ - "373", - "374" + "372", + "373" ], "createdAt": 1777360177611, "isPrimaryKey": true @@ -4732,14 +4719,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "376", + "id": "375", "name": "videos", "schema": "public", "x": 613.6042418109826, "y": 563.9662290869784, "fields": [ { - "id": "377", + "id": "376", "name": "id", "type": { "id": "uuid", @@ -4751,7 +4738,7 @@ "createdAt": 1777282589094 }, { - "id": "378", + "id": "377", "name": "service_id", "type": { "id": "uuid", @@ -4763,7 +4750,7 @@ "createdAt": 1777282589094 }, { - "id": "379", + "id": "378", "name": "video_code", "type": { "id": "varchar", @@ -4776,7 +4763,7 @@ "characterMaximumLength": "255" }, { - "id": "380", + "id": "379", "name": "short_code", "type": { "id": "varchar", @@ -4789,7 +4776,7 @@ "characterMaximumLength": "255" }, { - "id": "381", + "id": "380", "name": "thumbnail_code", "type": { "id": "varchar", @@ -4802,7 +4789,7 @@ "characterMaximumLength": "255" }, { - "id": "382", + "id": "381", "name": "download_code", "type": { "id": "varchar", @@ -4815,7 +4802,7 @@ "characterMaximumLength": "255" }, { - "id": "383", + "id": "382", "name": "pending_upload", "type": { "id": "boolean", @@ -4828,7 +4815,7 @@ "default": "true" }, { - "id": "384", + "id": "383", "name": "created_by", "type": { "id": "uuid", @@ -4840,7 +4827,7 @@ "createdAt": 1777282589094 }, { - "id": "385", + "id": "384", "name": "deleted_at", "type": { "id": "timestamp", @@ -4852,7 +4839,7 @@ "createdAt": 1777282589094 }, { - "id": "386", + "id": "385", "name": "updated_at", "type": { "id": "timestamp", @@ -4864,7 +4851,7 @@ "createdAt": 1777282589094 }, { - "id": "387", + "id": "386", "name": "created_at", "type": { "id": "timestamp", @@ -4878,11 +4865,11 @@ ], "indexes": [ { - "id": "388", + "id": "387", "name": "", "unique": true, "fieldIds": [ - "377" + "376" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4895,14 +4882,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "389", + "id": "388", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "390", + "id": "389", "name": "id", "type": { "id": "uuid", @@ -4914,7 +4901,7 @@ "createdAt": 1777282589093 }, { - "id": "391", + "id": "390", "name": "mal_id", "type": { "id": "int", @@ -4926,7 +4913,7 @@ "createdAt": 1777282589093 }, { - "id": "392", + "id": "391", "name": "type", "type": { "id": "varchar", @@ -4939,7 +4926,7 @@ "characterMaximumLength": "24" }, { - "id": "393", + "id": "392", "name": "name", "type": { "id": "varchar", @@ -4952,7 +4939,7 @@ "characterMaximumLength": "155" }, { - "id": "394", + "id": "393", "name": "url", "type": { "id": "varchar", @@ -4965,7 +4952,7 @@ "characterMaximumLength": "255" }, { - "id": "395", + "id": "394", "name": "created_by", "type": { "id": "uuid", @@ -4977,7 +4964,7 @@ "createdAt": 1777282589094 }, { - "id": "396", + "id": "395", "name": "deleted_at", "type": { "id": "timestamp", @@ -4989,7 +4976,7 @@ "createdAt": 1777282589094 }, { - "id": "397", + "id": "396", "name": "updated_at", "type": { "id": "timestamp", @@ -5001,7 +4988,7 @@ "createdAt": 1777282589094 }, { - "id": "398", + "id": "397", "name": "created_at", "type": { "id": "timestamp", @@ -5015,11 +5002,11 @@ ], "indexes": [ { - "id": "399", + "id": "398", "name": "", "unique": true, "fieldIds": [ - "390" + "389" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -5032,14 +5019,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "400", + "id": "399", "name": "voice_actors", "schema": "public", "x": -1034.5971892955995, "y": 536.4407371208936, "fields": [ { - "id": "401", + "id": "400", "name": "id", "type": { "id": "uuid", @@ -5051,7 +5038,7 @@ "createdAt": 1777282589093 }, { - "id": "402", + "id": "401", "name": "language", "type": { "id": "varchar", @@ -5064,7 +5051,7 @@ "characterMaximumLength": "115" }, { - "id": "403", + "id": "402", "name": "actor_staff", "type": { "id": "uuid", @@ -5078,11 +5065,11 @@ ], "indexes": [ { - "id": "404", + "id": "403", "name": "", "unique": true, "fieldIds": [ - "401" + "400" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -5095,14 +5082,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "405", + "id": "404", "name": "user_genre_preferences", "schema": "public", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "406", + "id": "405", "name": "user_id", "type": { "id": "uuid", @@ -5114,7 +5101,7 @@ "createdAt": 1778548513047 }, { - "id": "407", + "id": "406", "name": "genre_id", "type": { "id": "uuid", @@ -5126,7 +5113,7 @@ "createdAt": 1778548529915 }, { - "id": "408", + "id": "407", "name": "state", "type": { "id": "user_preference_state", @@ -5140,12 +5127,12 @@ ], "indexes": [ { - "id": "409", + "id": "408", "name": "index_1", "unique": true, "fieldIds": [ - "406", - "407" + "405", + "406" ], "createdAt": 1778548614328 } @@ -5155,11 +5142,61 @@ "createdAt": 1778548513047, "order": 31, "diagramId": "3taaalng0ut0" + }, + { + "id": "409", + "name": "media_demographics", + "x": -681.6737980968087, + "y": 892.2019045876625, + "fields": [ + { + "id": "410", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1779210978216 + }, + { + "id": "411", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1779211013182 + } + ], + "indexes": [ + { + "id": "412", + "name": "", + "fieldIds": [ + "410", + "411" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1779211084906 + } + ], + "color": "#ffe374", + "createdAt": 1779210978216, + "isView": false, + "order": 46, + "schema": "public" } ], "relationships": [ { - "id": "410", + "id": "413", "name": "collection_members_collection_id_fk", "sourceSchema": "public", "sourceTableId": "233", @@ -5173,7 +5210,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "411", + "id": "414", "name": "collection_members_invited_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5187,7 +5224,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "412", + "id": "415", "name": "collection_members_user_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5201,7 +5238,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "413", + "id": "416", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", "sourceTableId": "123", @@ -5215,7 +5252,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "414", + "id": "417", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5229,7 +5266,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "415", + "id": "418", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", "sourceTableId": "123", @@ -5243,7 +5280,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "416", + "id": "419", "name": "comment_likes_user_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5257,7 +5294,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "417", + "id": "420", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", "sourceTableId": "123", @@ -5271,7 +5308,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "418", + "id": "421", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5285,13 +5322,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "419", + "id": "422", "name": "comments_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "348", "targetSchema": "public", "targetTableId": "123", - "sourceFieldId": "350", + "sourceFieldId": "349", "targetFieldId": "126", "sourceCardinality": "one", "targetCardinality": "many", @@ -5299,7 +5336,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "420", + "id": "423", "name": "comments_user_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5313,13 +5350,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "421", + "id": "424", "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "348", "targetSchema": "public", "targetTableId": "76", - "sourceFieldId": "351", + "sourceFieldId": "350", "targetFieldId": "77", "sourceCardinality": "many", "targetCardinality": "one", @@ -5327,49 +5364,49 @@ "diagramId": "3taaalng0ut0" }, { - "id": "422", + "id": "425", "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "348", "targetSchema": "public", - "targetTableId": "376", - "sourceFieldId": "363", - "targetFieldId": "377", + "targetTableId": "375", + "sourceFieldId": "362", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "423", + "id": "426", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", "sourceTableId": "327", "targetSchema": "public", - "targetTableId": "405", + "targetTableId": "404", "sourceFieldId": "328", - "targetFieldId": "407", + "targetFieldId": "406", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, "diagramId": "3taaalng0ut0" }, { - "id": "424", + "id": "427", "name": "genre_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "311", "targetSchema": "public", - "targetTableId": "405", + "targetTableId": "404", "sourceFieldId": "312", - "targetFieldId": "406", + "targetFieldId": "405", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, "diagramId": "3taaalng0ut0" }, { - "id": "425", + "id": "428", "name": "genres_id_fk", "sourceSchema": "public", "sourceTableId": "327", @@ -5383,7 +5420,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "426", + "id": "429", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5397,7 +5434,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "427", + "id": "430", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5411,7 +5448,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "428", + "id": "431", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "31", @@ -5425,21 +5462,21 @@ "diagramId": "3taaalng0ut0" }, { - "id": "429", + "id": "432", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", "sourceTableId": "31", "targetSchema": "public", - "targetTableId": "400", + "targetTableId": "399", "sourceFieldId": "35", - "targetFieldId": "401", + "targetFieldId": "400", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "430", + "id": "433", "name": "media_collections_added_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5453,7 +5490,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "431", + "id": "434", "name": "media_collections_collection_id_fk", "sourceSchema": "public", "sourceTableId": "233", @@ -5467,7 +5504,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "432", + "id": "435", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", "sourceTableId": "327", @@ -5481,7 +5518,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "433", + "id": "436", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5495,7 +5532,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "434", + "id": "437", "name": "media_external_links_media_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5509,7 +5546,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "435", + "id": "438", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", "sourceTableId": "56", @@ -5523,7 +5560,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "436", + "id": "439", "name": "media_genres_genre_id_fk", "sourceSchema": "public", "sourceTableId": "327", @@ -5537,7 +5574,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "437", + "id": "440", "name": "media_genres_media_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5551,21 +5588,21 @@ "diagramId": "3taaalng0ut0" }, { - "id": "438", + "id": "441", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "388", "targetSchema": "public", - "targetTableId": "372", - "sourceFieldId": "390", - "targetFieldId": "374", + "targetTableId": "371", + "sourceFieldId": "389", + "targetFieldId": "373", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360252829, "diagramId": "3taaalng0ut0" }, { - "id": "439", + "id": "442", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5579,7 +5616,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "440", + "id": "443", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "220", @@ -5593,7 +5630,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "441", + "id": "444", "name": "media_relations_target_media_fk", "sourceSchema": "public", "sourceTableId": "220", @@ -5607,7 +5644,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "442", + "id": "445", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", "sourceTableId": "220", @@ -5621,7 +5658,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "443", + "id": "446", "name": "media_submissions_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5635,7 +5672,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "444", + "id": "447", "name": "media_submissions_media_id_fk", "sourceSchema": "public", "sourceTableId": "37", @@ -5649,7 +5686,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "445", + "id": "448", "name": "media_types_id_medias_type", "sourceSchema": "public", "sourceTableId": "146", @@ -5663,7 +5700,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "446", + "id": "449", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5677,7 +5714,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "447", + "id": "450", "name": "medias_characters_media_characters_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5691,7 +5728,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "448", + "id": "451", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "19", @@ -5705,7 +5742,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "449", + "id": "452", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5719,7 +5756,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "450", + "id": "453", "name": "medias_id_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5733,7 +5770,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "451", + "id": "454", "name": "medias_licensors_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5747,21 +5784,21 @@ "diagramId": "3taaalng0ut0" }, { - "id": "452", + "id": "455", "name": "medias_producers_fk", "sourceSchema": "public", "sourceTableId": "76", "targetSchema": "public", - "targetTableId": "372", + "targetTableId": "371", "sourceFieldId": "102", - "targetFieldId": "373", + "targetFieldId": "372", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360239834, "diagramId": "3taaalng0ut0" }, { - "id": "453", + "id": "456", "name": "medias_relations_media_relations_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5775,21 +5812,21 @@ "diagramId": "3taaalng0ut0" }, { - "id": "454", + "id": "457", "name": "medias_source_media_sources_id", "sourceSchema": "public", "sourceTableId": "76", "targetSchema": "public", - "targetTableId": "368", + "targetTableId": "367", "sourceFieldId": "89", - "targetFieldId": "369", + "targetFieldId": "368", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "455", + "id": "458", "name": "medias_status_media_statuses_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5803,7 +5840,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "456", + "id": "459", "name": "medias_studios_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5817,7 +5854,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "457", + "id": "460", "name": "medias_themes_fk", "sourceSchema": "public", "sourceTableId": "76", @@ -5831,7 +5868,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "458", + "id": "461", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", "sourceTableId": "76", @@ -5845,13 +5882,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "459", + "id": "462", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "388", "targetSchema": "public", "targetTableId": "119", - "sourceFieldId": "390", + "sourceFieldId": "389", "targetFieldId": "121", "sourceCardinality": "one", "targetCardinality": "many", @@ -5859,13 +5896,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "460", + "id": "463", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "388", "targetSchema": "public", "targetTableId": "258", - "sourceFieldId": "390", + "sourceFieldId": "389", "targetFieldId": "260", "sourceCardinality": "one", "targetCardinality": "many", @@ -5873,7 +5910,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "461", + "id": "464", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5887,7 +5924,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "462", + "id": "465", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5901,7 +5938,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "463", + "id": "466", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", "sourceTableId": "187", @@ -5915,7 +5952,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "464", + "id": "467", "name": "rating_selected_user_id_fk", "sourceSchema": "public", "sourceTableId": "311", @@ -5929,7 +5966,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "465", + "id": "468", "name": "user_addresses_user_id_fk", "sourceSchema": "public", "sourceTableId": "62", @@ -5943,7 +5980,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "466", + "id": "469", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "19", @@ -5957,7 +5994,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "467", + "id": "470", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "311", @@ -5971,7 +6008,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "468", + "id": "471", "name": "user_follows_follower_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5985,7 +6022,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "469", + "id": "472", "name": "user_follows_following_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -5999,21 +6036,21 @@ "diagramId": "3taaalng0ut0" }, { - "id": "470", + "id": "473", "name": "user_oauth_credentials_user_id_fk", "sourceSchema": "public", "sourceTableId": "155", "targetSchema": "public", - "targetTableId": "335", + "targetTableId": "334", "sourceFieldId": "156", - "targetFieldId": "337", + "targetFieldId": "336", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778822260934, "diagramId": "3taaalng0ut0" }, { - "id": "471", + "id": "474", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "1", @@ -6027,7 +6064,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "472", + "id": "475", "name": "user_preferences_user_id_fk", "sourceSchema": "public", "sourceTableId": "311", @@ -6041,7 +6078,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "473", + "id": "476", "name": "user_sessions_user_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -6055,13 +6092,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "474", + "id": "477", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "348", "targetSchema": "public", "targetTableId": "150", - "sourceFieldId": "350", + "sourceFieldId": "349", "targetFieldId": "152", "sourceCardinality": "one", "targetCardinality": "many", @@ -6069,7 +6106,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "475", + "id": "478", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -6083,7 +6120,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "476", + "id": "479", "name": "users_country_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -6097,7 +6134,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "477", + "id": "480", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", "sourceTableId": "287", @@ -6111,7 +6148,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "478", + "id": "481", "name": "video_submissions_created_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -6125,7 +6162,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "479", + "id": "482", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", "sourceTableId": "155", @@ -6139,27 +6176,27 @@ "diagramId": "3taaalng0ut0" }, { - "id": "480", + "id": "483", "name": "video_submissions_video_id_fk", "sourceSchema": "public", "sourceTableId": "177", "targetSchema": "public", - "targetTableId": "376", + "targetTableId": "375", "sourceFieldId": "179", - "targetFieldId": "377", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778732648012, "diagramId": "3taaalng0ut0" }, { - "id": "481", + "id": "484", "name": "videos_service_id_video_services_id", "sourceSchema": "public", - "sourceTableId": "376", + "sourceTableId": "375", "targetSchema": "public", "targetTableId": "241", - "sourceFieldId": "378", + "sourceFieldId": "377", "targetFieldId": "242", "sourceCardinality": "many", "targetCardinality": "one", @@ -6167,25 +6204,51 @@ "diagramId": "3taaalng0ut0" }, { - "id": "482", + "id": "485", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "400", + "sourceTableId": "399", "targetSchema": "public", "targetTableId": "132", - "sourceFieldId": "403", + "sourceFieldId": "402", "targetFieldId": "133", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" + }, + { + "id": "486", + "name": "medias_demographics_fk", + "sourceSchema": "public", + "sourceTableId": "76", + "targetSchema": "public", + "targetTableId": "409", + "sourceFieldId": "108", + "targetFieldId": "410", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779211057969 + }, + { + "id": "487", + "name": "media_demographics_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "327", + "targetSchema": "public", + "targetTableId": "409", + "sourceFieldId": "328", + "targetFieldId": "411", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779211061425 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "483", + "id": "488", "name": "audit_action", "kind": "enum", "values": [ @@ -6198,7 +6261,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "484", + "id": "489", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6211,7 +6274,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "485", + "id": "490", "name": "device_type", "kind": "enum", "values": [ @@ -6224,7 +6287,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "486", + "id": "491", "name": "like_type", "kind": "enum", "values": [ @@ -6235,7 +6298,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "487", + "id": "492", "name": "media_season", "kind": "enum", "values": [ @@ -6248,7 +6311,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "488", + "id": "493", "name": "oauth_provider", "kind": "enum", "values": [ @@ -6259,7 +6322,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "489", + "id": "494", "name": "privacy_level", "kind": "enum", "values": [ @@ -6271,7 +6334,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "490", + "id": "495", "name": "status_submission", "kind": "enum", "values": [ @@ -6283,7 +6346,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "491", + "id": "496", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6294,7 +6357,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "492", + "id": "497", "name": "user_role", "kind": "enum", "values": [ @@ -6307,7 +6370,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "493", + "id": "498", "name": "user_sex", "kind": "enum", "values": [ From 743abc0b7a7e6052c4f039f2c79214e262707e9c Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 17 May 2026 21:00:00 +0700 Subject: [PATCH 25/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20media?= =?UTF-8?q?-to-media=20relations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1818 +++++++++++++++++++++--------------------- prisma/schema.prisma | 14 +- 2 files changed, 924 insertions(+), 908 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 40922e3..b9af441 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,18 +2,69 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-19T16:28:02.086Z", - "updatedAt": "2026-05-19T17:18:18.265Z", + "updatedAt": "2026-05-20T01:23:06.250Z", "databaseType": "postgresql", "tables": [ { "id": "1", + "name": "media_demographics", + "x": -681.6737980968087, + "y": 892.2019045876625, + "fields": [ + { + "id": "2", + "name": "media_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1779210978216 + }, + { + "id": "3", + "name": "genre_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1779211013182 + } + ], + "indexes": [ + { + "id": "4", + "name": "", + "fieldIds": [ + "2", + "3" + ], + "unique": true, + "isPrimaryKey": true, + "createdAt": 1779211084967 + } + ], + "color": "#ffe374", + "createdAt": 1779210978216, + "isView": false, + "order": 46, + "schema": "public", + "diagramId": "3taaalng0ut0" + }, + { + "id": "5", "name": "characters", "schema": "public", "x": -1029.4414354197875, "y": 693.766860683375, "fields": [ { - "id": "2", + "id": "6", "name": "id", "type": { "id": "uuid", @@ -25,7 +76,7 @@ "createdAt": 1777282589093 }, { - "id": "3", + "id": "7", "name": "name", "type": { "id": "varchar", @@ -38,7 +89,7 @@ "characterMaximumLength": "255" }, { - "id": "4", + "id": "8", "name": "image", "type": { "id": "varchar", @@ -51,7 +102,7 @@ "characterMaximumLength": "255" }, { - "id": "5", + "id": "9", "name": "small_image", "type": { "id": "varchar", @@ -64,7 +115,7 @@ "characterMaximumLength": "255" }, { - "id": "6", + "id": "10", "name": "mal_id", "type": { "id": "int", @@ -76,7 +127,7 @@ "createdAt": 1777282589093 }, { - "id": "7", + "id": "11", "name": "mal_url", "type": { "id": "varchar", @@ -89,7 +140,7 @@ "characterMaximumLength": "255" }, { - "id": "8", + "id": "12", "name": "liked", "type": { "id": "int", @@ -102,7 +153,7 @@ "default": "0" }, { - "id": "9", + "id": "13", "name": "connections", "type": { "id": "int", @@ -115,7 +166,7 @@ "default": "0" }, { - "id": "10", + "id": "14", "name": "deleted_at", "type": { "id": "timestamp", @@ -127,7 +178,7 @@ "createdAt": 1777282589093 }, { - "id": "11", + "id": "15", "name": "updated_at", "type": { "id": "timestamp", @@ -139,7 +190,7 @@ "createdAt": 1777282589093 }, { - "id": "12", + "id": "16", "name": "created_at", "type": { "id": "timestamp", @@ -153,11 +204,11 @@ ], "indexes": [ { - "id": "13", + "id": "17", "name": "", "unique": true, "fieldIds": [ - "2" + "6" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -171,14 +222,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "14", + "id": "18", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "15", + "id": "19", "name": "media_id", "type": { "id": "uuid", @@ -190,7 +241,7 @@ "createdAt": 1777283473368 }, { - "id": "16", + "id": "20", "name": "genre_id", "type": { "id": "uuid", @@ -204,22 +255,22 @@ ], "indexes": [ { - "id": "17", + "id": "21", "name": "", "unique": true, "fieldIds": [ - "16" + "20" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "18", + "id": "22", "name": "index_1", "unique": true, "fieldIds": [ - "15", - "16" + "19", + "20" ], "createdAt": 1778570545534 } @@ -233,14 +284,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "19", + "id": "23", "name": "countries", "schema": "public", "x": -675.4825871206289, "y": -936.5527418709639, "fields": [ { - "id": "20", + "id": "24", "name": "id", "type": { "id": "uuid", @@ -252,7 +303,7 @@ "createdAt": 1778401101216 }, { - "id": "21", + "id": "25", "name": "name", "type": { "id": "varchar", @@ -265,7 +316,7 @@ "characterMaximumLength": "155" }, { - "id": "22", + "id": "26", "name": "slug", "type": { "id": "varchar", @@ -278,7 +329,7 @@ "characterMaximumLength": "165" }, { - "id": "23", + "id": "27", "name": "code", "type": { "id": "varchar", @@ -291,7 +342,7 @@ "characterMaximumLength": "3" }, { - "id": "24", + "id": "28", "name": "flag", "type": { "id": "varchar", @@ -304,7 +355,7 @@ "characterMaximumLength": "255" }, { - "id": "25", + "id": "29", "name": "banner", "type": { "id": "varchar", @@ -319,11 +370,11 @@ ], "indexes": [ { - "id": "26", + "id": "30", "name": "", "unique": true, "fieldIds": [ - "20" + "24" ], "createdAt": 1778401101216, "isPrimaryKey": true @@ -336,14 +387,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "27", + "id": "31", "name": "user_country_preferences", "schema": "public", "x": -1035.3700148414782, "y": -1151.086340953631, "fields": [ { - "id": "28", + "id": "32", "name": "user_id", "type": { "id": "uuid", @@ -355,7 +406,7 @@ "createdAt": 1778548950226 }, { - "id": "29", + "id": "33", "name": "country_id", "type": { "id": "uuid", @@ -367,7 +418,7 @@ "createdAt": 1778548914423 }, { - "id": "30", + "id": "34", "name": "state", "type": { "id": "user_preference_state", @@ -387,14 +438,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "31", + "id": "35", "name": "media_characters", "schema": "public", "x": -678.5745105809615, "y": 1034.4123102253634, "fields": [ { - "id": "32", + "id": "36", "name": "id", "type": { "id": "uuid", @@ -406,7 +457,7 @@ "createdAt": 1777282589093 }, { - "id": "33", + "id": "37", "name": "role", "type": { "id": "enum", @@ -419,7 +470,7 @@ "comments": "main, supporting" }, { - "id": "34", + "id": "38", "name": "characters", "type": { "id": "uuid", @@ -431,7 +482,7 @@ "createdAt": 1777282589093 }, { - "id": "35", + "id": "39", "name": "voice_actor", "type": { "id": "uuid", @@ -445,11 +496,11 @@ ], "indexes": [ { - "id": "36", + "id": "40", "name": "", "unique": true, "fieldIds": [ - "32" + "36" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -462,14 +513,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "37", + "id": "41", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "38", + "id": "42", "name": "id", "type": { "id": "uuid", @@ -481,7 +532,7 @@ "createdAt": 1777362610195 }, { - "id": "39", + "id": "43", "name": "media_id", "type": { "id": "uuid", @@ -493,7 +544,7 @@ "createdAt": 1777362624424 }, { - "id": "40", + "id": "44", "name": "created_by", "type": { "id": "uuid", @@ -506,7 +557,7 @@ "comments": "" }, { - "id": "41", + "id": "45", "name": "status", "type": { "id": "status_submission", @@ -519,7 +570,7 @@ "comments": "" }, { - "id": "42", + "id": "46", "name": "reviewed_by", "type": { "id": "uuid", @@ -531,7 +582,7 @@ "createdAt": 1777362758238 }, { - "id": "43", + "id": "47", "name": "reviewed_at", "type": { "id": "timestamp", @@ -543,7 +594,7 @@ "createdAt": 1777363627973 }, { - "id": "44", + "id": "48", "name": "reason", "type": { "id": "text", @@ -555,7 +606,7 @@ "createdAt": 1777363674757 }, { - "id": "45", + "id": "49", "name": "created_at", "type": { "id": "timestamp", @@ -570,11 +621,11 @@ ], "indexes": [ { - "id": "46", + "id": "50", "name": "", "unique": true, "fieldIds": [ - "38" + "42" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -587,14 +638,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "47", + "id": "51", "name": "home_media_banner", "schema": "public", "x": -1034.714934672103, "y": -969.0938770634809, "fields": [ { - "id": "48", + "id": "52", "name": "id", "type": { "id": "uuid", @@ -606,7 +657,7 @@ "createdAt": 1778771594518 }, { - "id": "49", + "id": "53", "name": "media_id", "type": { "id": "uuid", @@ -618,7 +669,7 @@ "createdAt": 1778771625245 }, { - "id": "50", + "id": "54", "name": "created_by", "type": { "id": "uuid", @@ -630,7 +681,7 @@ "createdAt": 1778771632111 }, { - "id": "51", + "id": "55", "name": "priority", "type": { "id": "smallint", @@ -642,7 +693,7 @@ "createdAt": 1778771638786 }, { - "id": "52", + "id": "56", "name": "start_show", "type": { "id": "timestamp", @@ -654,7 +705,7 @@ "createdAt": 1778771679920 }, { - "id": "53", + "id": "57", "name": "end_show", "type": { "id": "timestamp", @@ -666,7 +717,7 @@ "createdAt": 1778771687135 }, { - "id": "54", + "id": "58", "name": "created_at", "type": { "id": "timestamp", @@ -680,11 +731,11 @@ ], "indexes": [ { - "id": "55", + "id": "59", "name": "", "unique": true, "fieldIds": [ - "48" + "52" ], "createdAt": 1778771594518, "isPrimaryKey": true @@ -697,14 +748,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "56", + "id": "60", "name": "media_external_links", "schema": "public", "x": 194.5066892978357, "y": -264.72537027522213, "fields": [ { - "id": "57", + "id": "61", "name": "id", "type": { "id": "uuid", @@ -716,7 +767,7 @@ "createdAt": 1777282589093 }, { - "id": "58", + "id": "62", "name": "media_id", "type": { "id": "uuid", @@ -728,7 +779,7 @@ "createdAt": 1777282589093 }, { - "id": "59", + "id": "63", "name": "name", "type": { "id": "varchar", @@ -741,7 +792,7 @@ "characterMaximumLength": "64" }, { - "id": "60", + "id": "64", "name": "url", "type": { "id": "varchar", @@ -756,11 +807,11 @@ ], "indexes": [ { - "id": "61", + "id": "65", "name": "", "unique": true, "fieldIds": [ - "57" + "61" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -773,14 +824,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "62", + "id": "66", "name": "user_addresses", "schema": "public", "x": 655.2842034425264, "y": -1010.0698801871714, "fields": [ { - "id": "63", + "id": "67", "name": "user_id", "type": { "id": "uuid", @@ -792,7 +843,7 @@ "createdAt": 1778816506150 }, { - "id": "64", + "id": "68", "name": "street_address", "type": { "id": "varchar", @@ -805,7 +856,7 @@ "characterMaximumLength": "255" }, { - "id": "65", + "id": "69", "name": "district", "type": { "id": "varchar", @@ -818,7 +869,7 @@ "characterMaximumLength": "100" }, { - "id": "66", + "id": "70", "name": "city", "type": { "id": "varchar", @@ -831,7 +882,7 @@ "characterMaximumLength": "100" }, { - "id": "67", + "id": "71", "name": "province", "type": { "id": "varchar", @@ -844,7 +895,7 @@ "characterMaximumLength": "100" }, { - "id": "68", + "id": "72", "name": "postal_code", "type": { "id": "varchar", @@ -857,7 +908,7 @@ "characterMaximumLength": "20" }, { - "id": "69", + "id": "73", "name": "coordinate", "type": { "id": "varchar", @@ -870,7 +921,7 @@ "characterMaximumLength": "50" }, { - "id": "70", + "id": "74", "name": "updated_at", "type": { "id": "timestamp", @@ -884,11 +935,11 @@ ], "indexes": [ { - "id": "71", + "id": "75", "name": "", "unique": true, "fieldIds": [ - "63" + "67" ], "createdAt": 1778816506150, "isPrimaryKey": true @@ -901,14 +952,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "72", + "id": "76", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "73", + "id": "77", "name": "media_id", "type": { "id": "uuid", @@ -920,7 +971,7 @@ "createdAt": 1777295294621 }, { - "id": "74", + "id": "78", "name": "genre_id", "type": { "id": "uuid", @@ -934,12 +985,12 @@ ], "indexes": [ { - "id": "75", + "id": "79", "name": "", "unique": true, "fieldIds": [ - "73", - "74" + "77", + "78" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -953,14 +1004,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "76", + "id": "80", "name": "medias", "schema": "public", "x": -338.2943640690703, "y": -279.84862879126985, "fields": [ { - "id": "77", + "id": "81", "name": "id", "type": { "id": "uuid", @@ -972,7 +1023,7 @@ "createdAt": 1777282589092 }, { - "id": "78", + "id": "82", "name": "mal_id", "type": { "id": "int", @@ -984,7 +1035,7 @@ "createdAt": 1777282589092 }, { - "id": "79", + "id": "83", "name": "title", "type": { "id": "varchar", @@ -997,7 +1048,7 @@ "characterMaximumLength": "255" }, { - "id": "80", + "id": "84", "name": "title_secondary", "type": { "id": "varchar", @@ -1010,7 +1061,7 @@ "characterMaximumLength": "255" }, { - "id": "81", + "id": "85", "name": "title_original", "type": { "id": "varchar", @@ -1023,7 +1074,7 @@ "characterMaximumLength": "255" }, { - "id": "82", + "id": "86", "name": "title_synonyms", "type": { "id": "varchar", @@ -1038,7 +1089,7 @@ "comments": "" }, { - "id": "83", + "id": "87", "name": "trailers", "type": { "id": "uuid", @@ -1050,7 +1101,7 @@ "createdAt": 1777282589092 }, { - "id": "84", + "id": "88", "name": "synopsis", "type": { "id": "text", @@ -1062,7 +1113,7 @@ "createdAt": 1777282589092 }, { - "id": "85", + "id": "89", "name": "small_image_url", "type": { "id": "varchar", @@ -1075,7 +1126,7 @@ "characterMaximumLength": "255" }, { - "id": "86", + "id": "90", "name": "medium_image_url", "type": { "id": "varchar", @@ -1088,7 +1139,7 @@ "characterMaximumLength": "255" }, { - "id": "87", + "id": "91", "name": "large_image_url", "type": { "id": "varchar", @@ -1101,7 +1152,7 @@ "characterMaximumLength": "255" }, { - "id": "88", + "id": "92", "name": "type", "type": { "id": "uuid", @@ -1113,7 +1164,7 @@ "createdAt": 1777282589092 }, { - "id": "89", + "id": "93", "name": "source", "type": { "id": "uuid", @@ -1125,7 +1176,7 @@ "createdAt": 1777282589092 }, { - "id": "90", + "id": "94", "name": "status", "type": { "id": "uuid", @@ -1137,7 +1188,7 @@ "createdAt": 1777282589092 }, { - "id": "91", + "id": "95", "name": "airing", "type": { "id": "boolean", @@ -1150,7 +1201,7 @@ "default": "false" }, { - "id": "92", + "id": "96", "name": "start_airing", "type": { "id": "date", @@ -1162,7 +1213,7 @@ "createdAt": 1777282589092 }, { - "id": "93", + "id": "97", "name": "end_airing", "type": { "id": "date", @@ -1174,7 +1225,7 @@ "createdAt": 1777282589092 }, { - "id": "94", + "id": "98", "name": "age_rating", "type": { "id": "uuid", @@ -1186,7 +1237,7 @@ "createdAt": 1777282589092 }, { - "id": "95", + "id": "99", "name": "score_total", "type": { "id": "int", @@ -1199,7 +1250,7 @@ "default": "0" }, { - "id": "96", + "id": "100", "name": "score_count", "type": { "id": "int", @@ -1212,7 +1263,7 @@ "default": "0" }, { - "id": "97", + "id": "101", "name": "background", "type": { "id": "text", @@ -1224,7 +1275,7 @@ "createdAt": 1777282589092 }, { - "id": "98", + "id": "102", "name": "season", "type": { "id": "media_season", @@ -1237,7 +1288,7 @@ "comments": "enum(winter, spring, summer, fall)" }, { - "id": "99", + "id": "103", "name": "year", "type": { "id": "smallint", @@ -1249,7 +1300,7 @@ "createdAt": 1777282589092 }, { - "id": "100", + "id": "104", "name": "country", "type": { "id": "uuid", @@ -1261,7 +1312,7 @@ "createdAt": 1777635858846 }, { - "id": "101", + "id": "105", "name": "broadcast_date", "type": { "id": "varchar", @@ -1274,7 +1325,7 @@ "characterMaximumLength": "64" }, { - "id": "102", + "id": "106", "name": "producers", "type": { "id": "uuid", @@ -1286,7 +1337,7 @@ "createdAt": 1777282589092 }, { - "id": "103", + "id": "107", "name": "licensors", "type": { "id": "uuid", @@ -1298,7 +1349,7 @@ "createdAt": 1777282589092 }, { - "id": "104", + "id": "108", "name": "studios", "type": { "id": "uuid", @@ -1310,7 +1361,7 @@ "createdAt": 1777282589092 }, { - "id": "105", + "id": "109", "name": "genres", "type": { "id": "uuid", @@ -1322,7 +1373,7 @@ "createdAt": 1777282589092 }, { - "id": "106", + "id": "110", "name": "explicit_genres", "type": { "id": "uuid", @@ -1334,7 +1385,7 @@ "createdAt": 1777282589092 }, { - "id": "107", + "id": "111", "name": "themes", "type": { "id": "uuid", @@ -1346,7 +1397,7 @@ "createdAt": 1777282589092 }, { - "id": "108", + "id": "112", "name": "demographics", "type": { "id": "uuid", @@ -1358,7 +1409,7 @@ "createdAt": 1777282589092 }, { - "id": "109", + "id": "113", "name": "relations", "type": { "id": "uuid", @@ -1370,7 +1421,7 @@ "createdAt": 1777282589092 }, { - "id": "110", + "id": "114", "name": "external_links", "type": { "id": "uuid", @@ -1382,7 +1433,7 @@ "createdAt": 1777282589092 }, { - "id": "111", + "id": "115", "name": "characters", "type": { "id": "uuid", @@ -1394,7 +1445,7 @@ "createdAt": 1777282589092 }, { - "id": "112", + "id": "116", "name": "approved", "type": { "id": "boolean", @@ -1407,7 +1458,7 @@ "default": "false" }, { - "id": "113", + "id": "117", "name": "approved_by", "type": { "id": "uuid", @@ -1419,7 +1470,7 @@ "createdAt": 1777282589092 }, { - "id": "114", + "id": "118", "name": "created_by", "type": { "id": "uuid", @@ -1431,7 +1482,7 @@ "createdAt": 1777282589092 }, { - "id": "115", + "id": "119", "name": "deleted_at", "type": { "id": "timestamp", @@ -1443,7 +1494,7 @@ "createdAt": 1777282589092 }, { - "id": "116", + "id": "120", "name": "updated_at", "type": { "id": "timestamp", @@ -1455,7 +1506,7 @@ "createdAt": 1777282589092 }, { - "id": "117", + "id": "121", "name": "created_at", "type": { "id": "timestamp", @@ -1469,11 +1520,11 @@ ], "indexes": [ { - "id": "118", + "id": "122", "name": "", "unique": true, "fieldIds": [ - "77" + "81" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -1488,14 +1539,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "119", + "id": "123", "name": "media_studios", "schema": "public", "x": 194.57420294478976, "y": 402.07246285824783, "fields": [ { - "id": "120", + "id": "124", "name": "media_id", "type": { "id": "uuid", @@ -1507,7 +1558,7 @@ "createdAt": 1777360514222 }, { - "id": "121", + "id": "125", "name": "producer_id", "type": { "id": "uuid", @@ -1521,12 +1572,12 @@ ], "indexes": [ { - "id": "122", + "id": "126", "name": "", "unique": true, "fieldIds": [ - "120", - "121" + "124", + "125" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -1539,14 +1590,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "123", + "id": "127", "name": "comments", "schema": "public", "x": -1035.4972528190797, "y": -21.831519473281823, "fields": [ { - "id": "124", + "id": "128", "name": "id", "type": { "id": "uuid", @@ -1558,7 +1609,7 @@ "createdAt": 1778772484798 }, { - "id": "125", + "id": "129", "name": "user_id", "type": { "id": "uuid", @@ -1570,7 +1621,7 @@ "createdAt": 1778772536237 }, { - "id": "126", + "id": "130", "name": "episode_id", "type": { "id": "uuid", @@ -1582,7 +1633,7 @@ "createdAt": 1778772542751 }, { - "id": "127", + "id": "131", "name": "content", "type": { "id": "varchar", @@ -1595,7 +1646,7 @@ "characterMaximumLength": "255" }, { - "id": "128", + "id": "132", "name": "created_at", "type": { "id": "timestamp", @@ -1607,7 +1658,7 @@ "createdAt": 1778777149915 }, { - "id": "129", + "id": "133", "name": "updated_at", "type": { "id": "timestamp", @@ -1619,7 +1670,7 @@ "createdAt": 1778777198204 }, { - "id": "130", + "id": "134", "name": "deleted_at", "type": { "id": "timestamp", @@ -1633,11 +1684,11 @@ ], "indexes": [ { - "id": "131", + "id": "135", "name": "", "unique": true, "fieldIds": [ - "124" + "128" ], "createdAt": 1778772484798, "isPrimaryKey": true @@ -1650,14 +1701,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "132", + "id": "136", "name": "staff", "schema": "public", "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "133", + "id": "137", "name": "id", "type": { "id": "uuid", @@ -1669,7 +1720,7 @@ "createdAt": 1777282589093 }, { - "id": "134", + "id": "138", "name": "name", "type": { "id": "varchar", @@ -1682,7 +1733,7 @@ "characterMaximumLength": "255" }, { - "id": "135", + "id": "139", "name": "image", "type": { "id": "varchar", @@ -1695,7 +1746,7 @@ "characterMaximumLength": "255" }, { - "id": "136", + "id": "140", "name": "mal_id", "type": { "id": "int", @@ -1707,7 +1758,7 @@ "createdAt": 1777282589093 }, { - "id": "137", + "id": "141", "name": "mal_url", "type": { "id": "varchar", @@ -1720,7 +1771,7 @@ "characterMaximumLength": "255" }, { - "id": "138", + "id": "142", "name": "deleted_at", "type": { "id": "timestamp", @@ -1732,7 +1783,7 @@ "createdAt": 1777282589093 }, { - "id": "139", + "id": "143", "name": "updated_at", "type": { "id": "timestamp", @@ -1744,7 +1795,7 @@ "createdAt": 1777282589093 }, { - "id": "140", + "id": "144", "name": "created_at", "type": { "id": "timestamp", @@ -1758,11 +1809,11 @@ ], "indexes": [ { - "id": "141", + "id": "145", "name": "", "unique": true, "fieldIds": [ - "133" + "137" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1775,14 +1826,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "142", + "id": "146", "name": "user_rating_preferences", "schema": "public", "x": -1036.138591583759, "y": -1328.817114710954, "fields": [ { - "id": "143", + "id": "147", "name": "user_id", "type": { "id": "uuid", @@ -1794,7 +1845,7 @@ "createdAt": 1778548671790 }, { - "id": "144", + "id": "148", "name": "rating_id", "type": { "id": "uuid", @@ -1806,7 +1857,7 @@ "createdAt": 1778548699069 }, { - "id": "145", + "id": "149", "name": "state", "type": { "id": "user_preference_state", @@ -1826,14 +1877,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "146", + "id": "150", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "147", + "id": "151", "name": "id", "type": { "id": "uuid", @@ -1845,7 +1896,7 @@ "createdAt": 1777282589093 }, { - "id": "148", + "id": "152", "name": "name", "type": { "id": "varchar", @@ -1860,11 +1911,11 @@ ], "indexes": [ { - "id": "149", + "id": "153", "name": "", "unique": true, "fieldIds": [ - "147" + "151" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1877,14 +1928,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "150", + "id": "154", "name": "user_watch_histories", "schema": "public", "x": -335.9290422316319, "y": -1189.7301850410581, "fields": [ { - "id": "151", + "id": "155", "name": "user_id", "type": { "id": "uuid", @@ -1896,7 +1947,7 @@ "createdAt": 1778569467263 }, { - "id": "152", + "id": "156", "name": "episode_id", "type": { "id": "uuid", @@ -1908,7 +1959,7 @@ "createdAt": 1778569477336 }, { - "id": "153", + "id": "157", "name": "updated_at", "type": { "id": "timestamp", @@ -1922,12 +1973,12 @@ ], "indexes": [ { - "id": "154", + "id": "158", "name": "index_1", "unique": true, "fieldIds": [ - "152", - "151" + "156", + "155" ], "createdAt": 1778732177200 } @@ -1940,14 +1991,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "155", + "id": "159", "name": "users", "schema": "public", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "156", + "id": "160", "name": "id", "type": { "id": "uuid", @@ -1959,7 +2010,7 @@ "createdAt": 1778390635628 }, { - "id": "157", + "id": "161", "name": "email", "type": { "id": "varchar", @@ -1971,7 +2022,7 @@ "createdAt": 1778391266880 }, { - "id": "158", + "id": "162", "name": "password", "type": { "id": "varchar", @@ -1984,7 +2035,7 @@ "characterMaximumLength": "255" }, { - "id": "159", + "id": "163", "name": "username", "type": { "id": "varchar", @@ -1997,7 +2048,7 @@ "characterMaximumLength": "28" }, { - "id": "160", + "id": "164", "name": "fullname", "type": { "id": "varchar", @@ -2010,7 +2061,7 @@ "characterMaximumLength": "32" }, { - "id": "161", + "id": "165", "name": "avatar", "type": { "id": "varchar", @@ -2023,7 +2074,7 @@ "characterMaximumLength": "255" }, { - "id": "162", + "id": "166", "name": "bio", "type": { "id": "text", @@ -2035,7 +2086,7 @@ "createdAt": 1778390888222 }, { - "id": "163", + "id": "167", "name": "datebirth", "type": { "id": "date", @@ -2047,7 +2098,7 @@ "createdAt": 1778391007890 }, { - "id": "164", + "id": "168", "name": "role", "type": { "id": "user_role", @@ -2059,7 +2110,7 @@ "createdAt": 1778771211530 }, { - "id": "165", + "id": "169", "name": "sex", "type": { "id": "user_sex", @@ -2071,7 +2122,7 @@ "createdAt": 1778391031530 }, { - "id": "166", + "id": "170", "name": "phone_number", "type": { "id": "varchar", @@ -2084,7 +2135,7 @@ "characterMaximumLength": "15" }, { - "id": "167", + "id": "171", "name": "country", "type": { "id": "uuid", @@ -2096,7 +2147,7 @@ "createdAt": 1778401621258 }, { - "id": "168", + "id": "172", "name": "auth_provider", "type": { "id": "varchar", @@ -2109,7 +2160,7 @@ "characterMaximumLength": "64" }, { - "id": "169", + "id": "173", "name": "provider_token", "type": { "id": "varchar", @@ -2122,7 +2173,7 @@ "characterMaximumLength": "255" }, { - "id": "170", + "id": "174", "name": "created_at", "type": { "id": "timestamp", @@ -2135,7 +2186,7 @@ "default": "now()" }, { - "id": "171", + "id": "175", "name": "verified_at", "type": { "id": "timestamp", @@ -2147,7 +2198,7 @@ "createdAt": 1778815129265 }, { - "id": "172", + "id": "176", "name": "updated_at", "type": { "id": "timestamp", @@ -2159,7 +2210,7 @@ "createdAt": 1778517127447 }, { - "id": "173", + "id": "177", "name": "deleted_at", "type": { "id": "timestamp", @@ -2173,30 +2224,30 @@ ], "indexes": [ { - "id": "174", + "id": "178", "name": "", "unique": true, "fieldIds": [ - "156" + "160" ], "createdAt": 1778390635628, "isPrimaryKey": true }, { - "id": "175", + "id": "179", "name": "index_2", "unique": true, "fieldIds": [ - "159" + "163" ], "createdAt": 1778401234711 }, { - "id": "176", + "id": "180", "name": "index_3", "unique": true, "fieldIds": [ - "157" + "161" ], "createdAt": 1778401248519 } @@ -2211,14 +2262,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "177", + "id": "181", "name": "video_submissions", "schema": "public", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "178", + "id": "182", "name": "id", "type": { "id": "uuid", @@ -2230,7 +2281,7 @@ "createdAt": 1777362610195 }, { - "id": "179", + "id": "183", "name": "video_id", "type": { "id": "uuid", @@ -2242,7 +2293,7 @@ "createdAt": 1777362624424 }, { - "id": "180", + "id": "184", "name": "created_by", "type": { "id": "uuid", @@ -2255,7 +2306,7 @@ "comments": "" }, { - "id": "181", + "id": "185", "name": "reviewed_by", "type": { "id": "uuid", @@ -2267,7 +2318,7 @@ "createdAt": 1777362758238 }, { - "id": "182", + "id": "186", "name": "status", "type": { "id": "status_submission", @@ -2281,7 +2332,7 @@ "comments": "" }, { - "id": "183", + "id": "187", "name": "reviewed_at", "type": { "id": "timestamp", @@ -2293,7 +2344,7 @@ "createdAt": 1777363627973 }, { - "id": "184", + "id": "188", "name": "reason", "type": { "id": "text", @@ -2305,7 +2356,7 @@ "createdAt": 1777363674757 }, { - "id": "185", + "id": "189", "name": "created_at", "type": { "id": "timestamp", @@ -2320,11 +2371,11 @@ ], "indexes": [ { - "id": "186", + "id": "190", "name": "", "unique": true, "fieldIds": [ - "178" + "182" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -2338,14 +2389,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "187", + "id": "191", "name": "media_age_ratings", "schema": "public", "x": -679.7484316247582, "y": 342.88283833657397, "fields": [ { - "id": "188", + "id": "192", "name": "id", "type": { "id": "uuid", @@ -2357,7 +2408,7 @@ "createdAt": 1777282589093 }, { - "id": "189", + "id": "193", "name": "name", "type": { "id": "varchar", @@ -2370,7 +2421,7 @@ "characterMaximumLength": "64" }, { - "id": "190", + "id": "194", "name": "min_age", "type": { "id": "smallint", @@ -2384,11 +2435,11 @@ ], "indexes": [ { - "id": "191", + "id": "195", "name": "", "unique": true, "fieldIds": [ - "188" + "192" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2401,14 +2452,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "192", + "id": "196", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "193", + "id": "197", "name": "id", "type": { "id": "uuid", @@ -2420,7 +2471,7 @@ "createdAt": 1777282589092 }, { - "id": "194", + "id": "198", "name": "url", "type": { "id": "varchar", @@ -2433,7 +2484,7 @@ "characterMaximumLength": "255" }, { - "id": "195", + "id": "199", "name": "embed_url", "type": { "id": "varchar", @@ -2446,7 +2497,7 @@ "characterMaximumLength": "255" }, { - "id": "196", + "id": "200", "name": "small_image_url", "type": { "id": "varchar", @@ -2459,7 +2510,7 @@ "characterMaximumLength": "255" }, { - "id": "197", + "id": "201", "name": "medium_image_url", "type": { "id": "varchar", @@ -2472,7 +2523,7 @@ "characterMaximumLength": "255" }, { - "id": "198", + "id": "202", "name": "large_image_url", "type": { "id": "varchar", @@ -2485,7 +2536,7 @@ "characterMaximumLength": "255" }, { - "id": "199", + "id": "203", "name": "maximum_image_url", "type": { "id": "varchar", @@ -2500,11 +2551,11 @@ ], "indexes": [ { - "id": "200", + "id": "204", "name": "", "unique": true, "fieldIds": [ - "193" + "197" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2517,14 +2568,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "201", + "id": "205", "name": "collection_members", "schema": "public", "x": -338.05774312036385, "y": -1466.6668409654785, "fields": [ { - "id": "202", + "id": "206", "name": "id", "type": { "id": "uuid", @@ -2536,7 +2587,7 @@ "createdAt": 1778766471107 }, { - "id": "203", + "id": "207", "name": "collection_id", "type": { "id": "uuid", @@ -2548,7 +2599,7 @@ "createdAt": 1778766493931 }, { - "id": "204", + "id": "208", "name": "user_id", "type": { "id": "uuid", @@ -2560,7 +2611,7 @@ "createdAt": 1778766580515 }, { - "id": "205", + "id": "209", "name": "access_level", "type": { "id": "collection_access_level", @@ -2572,7 +2623,7 @@ "createdAt": 1778766832324 }, { - "id": "206", + "id": "210", "name": "invited_by", "type": { "id": "uuid", @@ -2584,7 +2635,7 @@ "createdAt": 1778766846050 }, { - "id": "207", + "id": "211", "name": "joined_at", "type": { "id": "timestamp", @@ -2598,11 +2649,11 @@ ], "indexes": [ { - "id": "208", + "id": "212", "name": "", "unique": true, "fieldIds": [ - "202" + "206" ], "createdAt": 1778766471107, "isPrimaryKey": true @@ -2616,14 +2667,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "209", + "id": "213", "name": "media_collections", "schema": "public", "x": 197.36608531341386, "y": -468.796634019804, "fields": [ { - "id": "210", + "id": "214", "name": "collection_id", "type": { "id": "uuid", @@ -2635,7 +2686,7 @@ "createdAt": 1778733152986 }, { - "id": "211", + "id": "215", "name": "media_id", "type": { "id": "uuid", @@ -2647,7 +2698,7 @@ "createdAt": 1778733195744 }, { - "id": "212", + "id": "216", "name": "added_by", "type": { "id": "uuid", @@ -2659,7 +2710,7 @@ "createdAt": 1778733169676 }, { - "id": "213", + "id": "217", "name": "added_at", "type": { "id": "bigint", @@ -2673,12 +2724,12 @@ ], "indexes": [ { - "id": "214", + "id": "218", "name": "index_1", "unique": true, "fieldIds": [ - "210", - "211" + "214", + "215" ], "createdAt": 1778733335908 } @@ -2690,14 +2741,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "215", + "id": "219", "name": "user_follows", "schema": "public", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "216", + "id": "220", "name": "follower_id", "type": { "id": "uuid", @@ -2709,7 +2760,7 @@ "createdAt": 1778401701334 }, { - "id": "217", + "id": "221", "name": "following_id", "type": { "id": "uuid", @@ -2721,7 +2772,7 @@ "createdAt": 1778401722682 }, { - "id": "218", + "id": "222", "name": "followed_at", "type": { "id": "timestamp", @@ -2735,12 +2786,12 @@ ], "indexes": [ { - "id": "219", + "id": "223", "name": "index_1", "unique": true, "fieldIds": [ - "217", - "216" + "221", + "220" ], "createdAt": 1778401874053 } @@ -2760,14 +2811,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "220", + "id": "224", "name": "media_relations", "schema": "public", "x": 194.39903094287618, "y": -61.06914750749248, "fields": [ { - "id": "221", + "id": "225", "name": "id", "type": { "id": "uuid", @@ -2779,7 +2830,19 @@ "createdAt": 1777282589092 }, { - "id": "222", + "id": "226", + "name": "target_media", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777282589092 + }, + { + "id": "227", "name": "relation", "type": { "id": "varchar", @@ -2787,30 +2850,19 @@ }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589092, - "characterMaximumLength": "16" - }, - { - "id": "223", - "name": "target_media", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589092 + "characterMaximumLength": "50" } ], "indexes": [ { - "id": "224", + "id": "228", "name": "", "unique": true, "fieldIds": [ - "221" + "225", + "226" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -2823,14 +2875,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "225", + "id": "229", "name": "media_explicit_genres", "schema": "public", "x": -681.3338818918861, "y": 628.1224828360978, "fields": [ { - "id": "226", + "id": "230", "name": "media_id", "type": { "id": "uuid", @@ -2842,7 +2894,7 @@ "createdAt": 1777283776082 }, { - "id": "227", + "id": "231", "name": "genre_id", "type": { "id": "uuid", @@ -2856,12 +2908,12 @@ ], "indexes": [ { - "id": "228", + "id": "232", "name": "", "unique": true, "fieldIds": [ - "226", - "227" + "230", + "231" ], "createdAt": 1777283776082, "isPrimaryKey": true @@ -2875,14 +2927,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "229", + "id": "233", "name": "media_statuses", "schema": "public", "x": -679.4669719043579, "y": 219.3548090436041, "fields": [ { - "id": "230", + "id": "234", "name": "id", "type": { "id": "uuid", @@ -2894,7 +2946,7 @@ "createdAt": 1777282589093 }, { - "id": "231", + "id": "235", "name": "name", "type": { "id": "varchar", @@ -2909,11 +2961,11 @@ ], "indexes": [ { - "id": "232", + "id": "236", "name": "", "unique": true, "fieldIds": [ - "230" + "234" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2926,14 +2978,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "233", + "id": "237", "name": "collections", "schema": "public", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "234", + "id": "238", "name": "id", "type": { "id": "uuid", @@ -2945,7 +2997,7 @@ "createdAt": 1778733394970 }, { - "id": "235", + "id": "239", "name": "name", "type": { "id": "varchar", @@ -2959,7 +3011,7 @@ "default": null }, { - "id": "236", + "id": "240", "name": "cover_url", "type": { "id": "varchar", @@ -2972,7 +3024,7 @@ "characterMaximumLength": "255" }, { - "id": "237", + "id": "241", "name": "privacy_level", "type": { "id": "privacy_level", @@ -2984,7 +3036,7 @@ "createdAt": 1778766528943 }, { - "id": "238", + "id": "242", "name": "created_at", "type": { "id": "timestamp", @@ -2996,7 +3048,7 @@ "createdAt": 1778733453130 }, { - "id": "239", + "id": "243", "name": "updated_at", "type": { "id": "timestamp", @@ -3010,11 +3062,11 @@ ], "indexes": [ { - "id": "240", + "id": "244", "name": "", "unique": true, "fieldIds": [ - "234" + "238" ], "createdAt": 1778733394970, "isPrimaryKey": true @@ -3027,14 +3079,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "241", + "id": "245", "name": "video_services", "schema": "public", "x": 78.02893671625938, "y": 1219.199725842667, "fields": [ { - "id": "242", + "id": "246", "name": "id", "type": { "id": "uuid", @@ -3046,7 +3098,7 @@ "createdAt": 1777282589094 }, { - "id": "243", + "id": "247", "name": "name", "type": { "id": "varchar", @@ -3059,7 +3111,7 @@ "characterMaximumLength": "155" }, { - "id": "244", + "id": "248", "name": "resolution", "type": { "id": "smallint", @@ -3071,7 +3123,7 @@ "createdAt": 1777282589094 }, { - "id": "245", + "id": "249", "name": "domain", "type": { "id": "varchar", @@ -3084,7 +3136,7 @@ "characterMaximumLength": "255" }, { - "id": "246", + "id": "250", "name": "image_url", "type": { "id": "varchar", @@ -3097,7 +3149,7 @@ "characterMaximumLength": "255" }, { - "id": "247", + "id": "251", "name": "hex_color", "type": { "id": "varchar", @@ -3110,7 +3162,7 @@ "characterMaximumLength": "10" }, { - "id": "248", + "id": "252", "name": "endpoint_video", "type": { "id": "varchar", @@ -3123,7 +3175,7 @@ "characterMaximumLength": "255" }, { - "id": "249", + "id": "253", "name": "endpoint_short", "type": { "id": "varchar", @@ -3136,7 +3188,7 @@ "characterMaximumLength": "255" }, { - "id": "250", + "id": "254", "name": "endpoint_image", "type": { "id": "varchar", @@ -3149,7 +3201,7 @@ "characterMaximumLength": "255" }, { - "id": "251", + "id": "255", "name": "endpoint_download", "type": { "id": "varchar", @@ -3162,7 +3214,7 @@ "characterMaximumLength": "255" }, { - "id": "252", + "id": "256", "name": "created_by", "type": { "id": "uuid", @@ -3174,7 +3226,7 @@ "createdAt": 1777282589094 }, { - "id": "253", + "id": "257", "name": "deleted_at", "type": { "id": "timestamp", @@ -3186,7 +3238,7 @@ "createdAt": 1777282589094 }, { - "id": "254", + "id": "258", "name": "updated_at", "type": { "id": "timestamp", @@ -3198,7 +3250,7 @@ "createdAt": 1777282589094 }, { - "id": "255", + "id": "259", "name": "created_at", "type": { "id": "timestamp", @@ -3212,22 +3264,22 @@ ], "indexes": [ { - "id": "256", + "id": "260", "name": "", "unique": true, "fieldIds": [ - "242" + "246" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "257", + "id": "261", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "243", - "244" + "247", + "248" ], "createdAt": 1777282589094 } @@ -3241,14 +3293,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "258", + "id": "262", "name": "media_licencors", "schema": "public", "x": 194.15644602007046, "y": 251.9575649519487, "fields": [ { - "id": "259", + "id": "263", "name": "media_id", "type": { "id": "uuid", @@ -3260,7 +3312,7 @@ "createdAt": 1777360331507 }, { - "id": "260", + "id": "264", "name": "producer_id", "type": { "id": "uuid", @@ -3274,12 +3326,12 @@ ], "indexes": [ { - "id": "261", + "id": "265", "name": "", "unique": true, "fieldIds": [ - "259", - "260" + "263", + "264" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3292,14 +3344,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "262", + "id": "266", "name": "user_sessions", "schema": "public", "x": -1381.9054198604924, "y": -1329.3058623634636, "fields": [ { - "id": "263", + "id": "267", "name": "id", "type": { "id": "uuid", @@ -3311,7 +3363,7 @@ "createdAt": 1778814742487 }, { - "id": "264", + "id": "268", "name": "user_id", "type": { "id": "uuid", @@ -3323,7 +3375,7 @@ "createdAt": 1778814761364 }, { - "id": "265", + "id": "269", "name": "device_type", "type": { "id": "device_type", @@ -3335,7 +3387,7 @@ "createdAt": 1778814807191 }, { - "id": "266", + "id": "270", "name": "os_type", "type": { "id": "varchar", @@ -3349,7 +3401,7 @@ "default": null }, { - "id": "267", + "id": "271", "name": "os_version", "type": { "id": "varchar", @@ -3362,7 +3414,7 @@ "characterMaximumLength": "50" }, { - "id": "268", + "id": "272", "name": "browser_name", "type": { "id": "varchar", @@ -3375,7 +3427,7 @@ "characterMaximumLength": "50" }, { - "id": "269", + "id": "273", "name": "browser_version", "type": { "id": "varchar", @@ -3388,7 +3440,7 @@ "characterMaximumLength": "50" }, { - "id": "270", + "id": "274", "name": "ip_login", "type": { "id": "inet", @@ -3400,7 +3452,7 @@ "createdAt": 1778814801981 }, { - "id": "271", + "id": "275", "name": "login_at", "type": { "id": "timestamptz", @@ -3412,7 +3464,7 @@ "createdAt": 1778814816604 }, { - "id": "272", + "id": "276", "name": "logout_at", "type": { "id": "timestamptz", @@ -3426,11 +3478,11 @@ ], "indexes": [ { - "id": "273", + "id": "277", "name": "", "unique": true, "fieldIds": [ - "263" + "267" ], "createdAt": 1778814742487, "isPrimaryKey": true @@ -3444,14 +3496,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "274", + "id": "278", "name": "comment_audit_logs", "schema": "public", "x": -1031.768269593756, "y": -322.47738647771854, "fields": [ { - "id": "275", + "id": "279", "name": "id", "type": { "id": "uuid", @@ -3463,7 +3515,7 @@ "createdAt": 1778772275091 }, { - "id": "276", + "id": "280", "name": "comment_id", "type": { "id": "uuid", @@ -3475,7 +3527,7 @@ "createdAt": 1778772293834 }, { - "id": "277", + "id": "281", "name": "performed_by", "type": { "id": "uuid", @@ -3487,7 +3539,7 @@ "createdAt": 1778772315274 }, { - "id": "278", + "id": "282", "name": "action", "type": { "id": "audit_action", @@ -3499,7 +3551,7 @@ "createdAt": 1778772326253 }, { - "id": "279", + "id": "283", "name": "created_at", "type": { "id": "timestamp", @@ -3513,11 +3565,11 @@ ], "indexes": [ { - "id": "280", + "id": "284", "name": "", "unique": true, "fieldIds": [ - "275" + "279" ], "createdAt": 1778772275091, "isPrimaryKey": true @@ -3530,14 +3582,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "281", + "id": "285", "name": "comment_likes", "schema": "public", "x": -1435.9285690968027, "y": 209.11179406446968, "fields": [ { - "id": "282", + "id": "286", "name": "user_id", "type": { "id": "uuid", @@ -3549,7 +3601,7 @@ "createdAt": 1778808096764 }, { - "id": "283", + "id": "287", "name": "comment_id", "type": { "id": "uuid", @@ -3561,7 +3613,7 @@ "createdAt": 1778808185625 }, { - "id": "284", + "id": "288", "name": "type", "type": { "id": "like_type", @@ -3573,7 +3625,7 @@ "createdAt": 1778808192863 }, { - "id": "285", + "id": "289", "name": "created_at", "type": { "id": "timestamp", @@ -3587,12 +3639,12 @@ ], "indexes": [ { - "id": "286", + "id": "290", "name": "index_1", "unique": true, "fieldIds": [ - "283", - "282" + "287", + "286" ], "createdAt": 1778808299354 } @@ -3604,14 +3656,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "287", + "id": "291", "name": "video_service_submissions", "schema": "public", "x": -371.1847878375677, "y": 1294.289208047582, "fields": [ { - "id": "288", + "id": "292", "name": "id", "type": { "id": "uuid", @@ -3623,7 +3675,7 @@ "createdAt": 1777362610195 }, { - "id": "289", + "id": "293", "name": "video_service_id", "type": { "id": "uuid", @@ -3635,7 +3687,7 @@ "createdAt": 1777362624424 }, { - "id": "290", + "id": "294", "name": "created_by", "type": { "id": "uuid", @@ -3648,7 +3700,7 @@ "comments": "" }, { - "id": "291", + "id": "295", "name": "status", "type": { "id": "status_submission", @@ -3662,7 +3714,7 @@ "comments": "" }, { - "id": "292", + "id": "296", "name": "reviewed_by", "type": { "id": "uuid", @@ -3674,7 +3726,7 @@ "createdAt": 1777362758238 }, { - "id": "293", + "id": "297", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3686,7 +3738,7 @@ "createdAt": 1777363627973 }, { - "id": "294", + "id": "298", "name": "reason", "type": { "id": "text", @@ -3698,7 +3750,7 @@ "createdAt": 1777363674757 }, { - "id": "295", + "id": "299", "name": "created_at", "type": { "id": "timestamp", @@ -3713,11 +3765,11 @@ ], "indexes": [ { - "id": "296", + "id": "300", "name": "", "unique": true, "fieldIds": [ - "288" + "292" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3731,14 +3783,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "297", + "id": "301", "name": "provisioned_users", "schema": "public", "x": 204.8991215430349, "y": -1369.625291260797, "fields": [ { - "id": "298", + "id": "302", "name": "provisioned_by", "type": { "id": "uuid", @@ -3750,7 +3802,7 @@ "createdAt": 1778517368377 }, { - "id": "299", + "id": "303", "name": "provisioned_to", "type": { "id": "uuid", @@ -3762,7 +3814,7 @@ "createdAt": 1778517463769 }, { - "id": "300", + "id": "304", "name": "provisioned_at", "type": { "id": "timestamp", @@ -3774,7 +3826,7 @@ "createdAt": 1778517476998 }, { - "id": "301", + "id": "305", "name": "reason", "type": { "id": "varchar", @@ -3795,14 +3847,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "302", + "id": "306", "name": "comment_reports", "schema": "public", "x": -1032.5934799775514, "y": -655.2659179217417, "fields": [ { - "id": "303", + "id": "307", "name": "id", "type": { "id": "uuid", @@ -3814,7 +3866,7 @@ "createdAt": 1778777460892 }, { - "id": "304", + "id": "308", "name": "reporter_id", "type": { "id": "uuid", @@ -3826,7 +3878,7 @@ "createdAt": 1778777475869 }, { - "id": "305", + "id": "309", "name": "comment_id", "type": { "id": "uuid", @@ -3838,7 +3890,7 @@ "createdAt": 1778777483534 }, { - "id": "306", + "id": "310", "name": "title", "type": { "id": "varchar", @@ -3851,7 +3903,7 @@ "characterMaximumLength": "115" }, { - "id": "307", + "id": "311", "name": "status", "type": { "id": "status_submission", @@ -3863,7 +3915,7 @@ "createdAt": 1778777836090 }, { - "id": "308", + "id": "312", "name": "description", "type": { "id": "text", @@ -3875,7 +3927,7 @@ "createdAt": 1778777519944 }, { - "id": "309", + "id": "313", "name": "reported_at", "type": { "id": "timestamp", @@ -3887,7 +3939,7 @@ "createdAt": 1778777537682 }, { - "id": "310", + "id": "314", "name": "closed_at", "type": { "id": "timestamp", @@ -3907,14 +3959,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "311", + "id": "315", "name": "user_preferences", "schema": "public", "x": -675.7144111335546, "y": -1493.2312805453928, "fields": [ { - "id": "312", + "id": "316", "name": "user_id", "type": { "id": "uuid", @@ -3926,7 +3978,7 @@ "createdAt": 1778517633815 }, { - "id": "313", + "id": "317", "name": "character_as_partner", "type": { "id": "uuid", @@ -3938,7 +3990,7 @@ "createdAt": 1778518390023 }, { - "id": "314", + "id": "318", "name": "comment_picture", "type": { "id": "varchar", @@ -3951,7 +4003,7 @@ "characterMaximumLength": "255" }, { - "id": "315", + "id": "319", "name": "enable_watch_history", "type": { "id": "boolean", @@ -3964,7 +4016,7 @@ "default": "true" }, { - "id": "316", + "id": "320", "name": "enable_search_history", "type": { "id": "boolean", @@ -3977,7 +4029,7 @@ "default": "false" }, { - "id": "317", + "id": "321", "name": "is_private_account", "type": { "id": "boolean", @@ -3990,7 +4042,7 @@ "default": "false" }, { - "id": "318", + "id": "322", "name": "can_message_me", "type": { "id": "boolean", @@ -4003,7 +4055,7 @@ "default": "true" }, { - "id": "319", + "id": "323", "name": "publish_birthday", "type": { "id": "boolean", @@ -4016,7 +4068,7 @@ "default": "false" }, { - "id": "320", + "id": "324", "name": "publish_email", "type": { "id": "boolean", @@ -4029,7 +4081,7 @@ "default": "false" }, { - "id": "321", + "id": "325", "name": "publish_phone_number", "type": { "id": "boolean", @@ -4042,7 +4094,7 @@ "default": "false" }, { - "id": "322", + "id": "326", "name": "publish_country", "type": { "id": "boolean", @@ -4055,7 +4107,7 @@ "default": "false" }, { - "id": "323", + "id": "327", "name": "publish_partner", "type": { "id": "boolean", @@ -4068,7 +4120,7 @@ "default": "true" }, { - "id": "324", + "id": "328", "name": "subscribe_to_newsletter", "type": { "id": "boolean", @@ -4081,7 +4133,7 @@ "default": "true" }, { - "id": "325", + "id": "329", "name": "enable_security_alerts", "type": { "id": "boolean", @@ -4096,11 +4148,11 @@ ], "indexes": [ { - "id": "326", + "id": "330", "name": "", "unique": true, "fieldIds": [ - "312" + "316" ], "createdAt": 1778517633815, "isPrimaryKey": true @@ -4114,14 +4166,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "327", + "id": "331", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 283.68770102274635, "fields": [ { - "id": "328", + "id": "332", "name": "id", "type": { "id": "uuid", @@ -4133,7 +4185,7 @@ "createdAt": 1777282589094 }, { - "id": "329", + "id": "333", "name": "mal_id", "type": { "id": "smallint", @@ -4145,7 +4197,7 @@ "createdAt": 1777282589094 }, { - "id": "330", + "id": "334", "name": "name", "type": { "id": "varchar", @@ -4159,7 +4211,7 @@ "default": null }, { - "id": "331", + "id": "335", "name": "slug", "type": { "id": "varchar", @@ -4172,7 +4224,7 @@ "characterMaximumLength": "115" }, { - "id": "332", + "id": "336", "name": "thumbnail_url", "type": { "id": "varchar", @@ -4187,11 +4239,11 @@ ], "indexes": [ { - "id": "333", + "id": "337", "name": "", "unique": true, "fieldIds": [ - "328" + "332" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4204,14 +4256,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "334", + "id": "338", "name": "user_oauth_accounts", "schema": "public", "x": 200.04156829298174, "y": -928.8832495975014, "fields": [ { - "id": "335", + "id": "339", "name": "id", "type": { "id": "uuid", @@ -4223,7 +4275,7 @@ "createdAt": 1778516299633 }, { - "id": "336", + "id": "340", "name": "user_id", "type": { "id": "uuid", @@ -4235,7 +4287,7 @@ "createdAt": 1778516366928 }, { - "id": "337", + "id": "341", "name": "provider_name", "type": { "id": "oauth_provider", @@ -4247,7 +4299,7 @@ "createdAt": 1778822365657 }, { - "id": "338", + "id": "342", "name": "provider_sub", "type": { "id": "varchar", @@ -4260,7 +4312,7 @@ "characterMaximumLength": "255" }, { - "id": "339", + "id": "343", "name": "provider_email", "type": { "id": "varchar", @@ -4274,7 +4326,7 @@ "default": null }, { - "id": "340", + "id": "344", "name": "access_token", "type": { "id": "varchar", @@ -4288,7 +4340,7 @@ "default": null }, { - "id": "341", + "id": "345", "name": "refresh_token", "type": { "id": "varchar", @@ -4301,7 +4353,7 @@ "characterMaximumLength": "255" }, { - "id": "342", + "id": "346", "name": "last_login", "type": { "id": "timestamptz", @@ -4313,7 +4365,7 @@ "createdAt": 1778516872367 }, { - "id": "343", + "id": "347", "name": "expires_at", "type": { "id": "timestamptz", @@ -4325,7 +4377,7 @@ "createdAt": 1778822177415 }, { - "id": "344", + "id": "348", "name": "created_at", "type": { "id": "timestamptz", @@ -4337,7 +4389,7 @@ "createdAt": 1778822183677 }, { - "id": "345", + "id": "349", "name": "updated_at", "type": { "id": "timestamptz", @@ -4351,22 +4403,22 @@ ], "indexes": [ { - "id": "346", + "id": "350", "name": "", "unique": true, "fieldIds": [ - "335" + "339" ], "createdAt": 1778516299633, "isPrimaryKey": true }, { - "id": "347", + "id": "351", "name": "index_2", "unique": true, "fieldIds": [ - "336", - "337" + "340", + "341" ], "createdAt": 1778516903425 } @@ -4379,14 +4431,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "348", + "id": "352", "name": "episodes", "schema": "public", "x": 196.42495741544377, "y": 550.6255135491608, "fields": [ { - "id": "349", + "id": "353", "name": "id", "type": { "id": "uuid", @@ -4398,7 +4450,7 @@ "createdAt": 1777282589093 }, { - "id": "350", + "id": "354", "name": "media_id", "type": { "id": "uuid", @@ -4410,7 +4462,7 @@ "createdAt": 1777282589093 }, { - "id": "351", + "id": "355", "name": "episode", "type": { "id": "smallint", @@ -4422,7 +4474,7 @@ "createdAt": 1777282589093 }, { - "id": "352", + "id": "356", "name": "mal_url", "type": { "id": "varchar", @@ -4435,7 +4487,7 @@ "characterMaximumLength": "255" }, { - "id": "353", + "id": "357", "name": "mal_forum_url", "type": { "id": "varchar", @@ -4448,7 +4500,7 @@ "characterMaximumLength": "255" }, { - "id": "354", + "id": "358", "name": "title", "type": { "id": "varchar", @@ -4461,7 +4513,7 @@ "characterMaximumLength": "155" }, { - "id": "355", + "id": "359", "name": "title_origin", "type": { "id": "varchar", @@ -4474,7 +4526,7 @@ "characterMaximumLength": "155" }, { - "id": "356", + "id": "360", "name": "title_romanji", "type": { "id": "varchar", @@ -4487,7 +4539,7 @@ "characterMaximumLength": "155" }, { - "id": "357", + "id": "361", "name": "aired", "type": { "id": "date", @@ -4499,7 +4551,7 @@ "createdAt": 1777282589093 }, { - "id": "358", + "id": "362", "name": "filler", "type": { "id": "boolean", @@ -4512,7 +4564,7 @@ "default": "false" }, { - "id": "359", + "id": "363", "name": "recap", "type": { "id": "boolean", @@ -4525,7 +4577,7 @@ "default": "false" }, { - "id": "360", + "id": "364", "name": "total_score", "type": { "id": "int", @@ -4537,7 +4589,7 @@ "createdAt": 1777361135322 }, { - "id": "361", + "id": "365", "name": "scored_by", "type": { "id": "int", @@ -4549,7 +4601,7 @@ "createdAt": 1777361233825 }, { - "id": "362", + "id": "366", "name": "videos", "type": { "id": "uuid", @@ -4561,7 +4613,7 @@ "createdAt": 1777282589093 }, { - "id": "363", + "id": "367", "name": "deleted_at", "type": { "id": "timestamp", @@ -4573,7 +4625,7 @@ "createdAt": 1777282589093 }, { - "id": "364", + "id": "368", "name": "updated_at", "type": { "id": "timestamp", @@ -4585,7 +4637,7 @@ "createdAt": 1777282589093 }, { - "id": "365", + "id": "369", "name": "created_at", "type": { "id": "timestamp", @@ -4599,11 +4651,11 @@ ], "indexes": [ { - "id": "366", + "id": "370", "name": "", "unique": true, "fieldIds": [ - "349" + "353" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4617,14 +4669,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "367", + "id": "371", "name": "media_sources", "schema": "public", "x": -680.0105470895069, "y": 97.06852307742538, "fields": [ { - "id": "368", + "id": "372", "name": "id", "type": { "id": "uuid", @@ -4636,7 +4688,7 @@ "createdAt": 1777282589093 }, { - "id": "369", + "id": "373", "name": "name", "type": { "id": "varchar", @@ -4651,11 +4703,11 @@ ], "indexes": [ { - "id": "370", + "id": "374", "name": "", "unique": true, "fieldIds": [ - "368" + "372" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4668,14 +4720,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "371", + "id": "375", "name": "media_producers", "schema": "public", "x": 194.9363737010458, "y": 104.92238147821836, "fields": [ { - "id": "372", + "id": "376", "name": "media_id", "type": { "id": "uuid", @@ -4687,7 +4739,7 @@ "createdAt": 1777360177611 }, { - "id": "373", + "id": "377", "name": "producer_id", "type": { "id": "uuid", @@ -4701,12 +4753,12 @@ ], "indexes": [ { - "id": "374", + "id": "378", "name": "", "unique": true, "fieldIds": [ - "372", - "373" + "376", + "377" ], "createdAt": 1777360177611, "isPrimaryKey": true @@ -4719,14 +4771,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "375", + "id": "379", "name": "videos", "schema": "public", "x": 613.6042418109826, "y": 563.9662290869784, "fields": [ { - "id": "376", + "id": "380", "name": "id", "type": { "id": "uuid", @@ -4738,7 +4790,7 @@ "createdAt": 1777282589094 }, { - "id": "377", + "id": "381", "name": "service_id", "type": { "id": "uuid", @@ -4750,7 +4802,7 @@ "createdAt": 1777282589094 }, { - "id": "378", + "id": "382", "name": "video_code", "type": { "id": "varchar", @@ -4763,7 +4815,7 @@ "characterMaximumLength": "255" }, { - "id": "379", + "id": "383", "name": "short_code", "type": { "id": "varchar", @@ -4776,7 +4828,7 @@ "characterMaximumLength": "255" }, { - "id": "380", + "id": "384", "name": "thumbnail_code", "type": { "id": "varchar", @@ -4789,7 +4841,7 @@ "characterMaximumLength": "255" }, { - "id": "381", + "id": "385", "name": "download_code", "type": { "id": "varchar", @@ -4802,7 +4854,7 @@ "characterMaximumLength": "255" }, { - "id": "382", + "id": "386", "name": "pending_upload", "type": { "id": "boolean", @@ -4815,7 +4867,7 @@ "default": "true" }, { - "id": "383", + "id": "387", "name": "created_by", "type": { "id": "uuid", @@ -4827,7 +4879,7 @@ "createdAt": 1777282589094 }, { - "id": "384", + "id": "388", "name": "deleted_at", "type": { "id": "timestamp", @@ -4839,7 +4891,7 @@ "createdAt": 1777282589094 }, { - "id": "385", + "id": "389", "name": "updated_at", "type": { "id": "timestamp", @@ -4851,7 +4903,7 @@ "createdAt": 1777282589094 }, { - "id": "386", + "id": "390", "name": "created_at", "type": { "id": "timestamp", @@ -4865,11 +4917,11 @@ ], "indexes": [ { - "id": "387", + "id": "391", "name": "", "unique": true, "fieldIds": [ - "376" + "380" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4882,14 +4934,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "388", + "id": "392", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "389", + "id": "393", "name": "id", "type": { "id": "uuid", @@ -4901,7 +4953,7 @@ "createdAt": 1777282589093 }, { - "id": "390", + "id": "394", "name": "mal_id", "type": { "id": "int", @@ -4913,7 +4965,7 @@ "createdAt": 1777282589093 }, { - "id": "391", + "id": "395", "name": "type", "type": { "id": "varchar", @@ -4926,7 +4978,7 @@ "characterMaximumLength": "24" }, { - "id": "392", + "id": "396", "name": "name", "type": { "id": "varchar", @@ -4939,7 +4991,7 @@ "characterMaximumLength": "155" }, { - "id": "393", + "id": "397", "name": "url", "type": { "id": "varchar", @@ -4952,7 +5004,7 @@ "characterMaximumLength": "255" }, { - "id": "394", + "id": "398", "name": "created_by", "type": { "id": "uuid", @@ -4964,7 +5016,7 @@ "createdAt": 1777282589094 }, { - "id": "395", + "id": "399", "name": "deleted_at", "type": { "id": "timestamp", @@ -4976,7 +5028,7 @@ "createdAt": 1777282589094 }, { - "id": "396", + "id": "400", "name": "updated_at", "type": { "id": "timestamp", @@ -4988,7 +5040,7 @@ "createdAt": 1777282589094 }, { - "id": "397", + "id": "401", "name": "created_at", "type": { "id": "timestamp", @@ -5002,11 +5054,11 @@ ], "indexes": [ { - "id": "398", + "id": "402", "name": "", "unique": true, "fieldIds": [ - "389" + "393" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -5019,14 +5071,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "399", + "id": "403", "name": "voice_actors", "schema": "public", "x": -1034.5971892955995, "y": 536.4407371208936, "fields": [ { - "id": "400", + "id": "404", "name": "id", "type": { "id": "uuid", @@ -5038,7 +5090,7 @@ "createdAt": 1777282589093 }, { - "id": "401", + "id": "405", "name": "language", "type": { "id": "varchar", @@ -5051,7 +5103,7 @@ "characterMaximumLength": "115" }, { - "id": "402", + "id": "406", "name": "actor_staff", "type": { "id": "uuid", @@ -5065,11 +5117,11 @@ ], "indexes": [ { - "id": "403", + "id": "407", "name": "", "unique": true, "fieldIds": [ - "400" + "404" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -5082,14 +5134,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "404", + "id": "408", "name": "user_genre_preferences", "schema": "public", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "405", + "id": "409", "name": "user_id", "type": { "id": "uuid", @@ -5101,7 +5153,7 @@ "createdAt": 1778548513047 }, { - "id": "406", + "id": "410", "name": "genre_id", "type": { "id": "uuid", @@ -5113,7 +5165,7 @@ "createdAt": 1778548529915 }, { - "id": "407", + "id": "411", "name": "state", "type": { "id": "user_preference_state", @@ -5127,12 +5179,12 @@ ], "indexes": [ { - "id": "408", + "id": "412", "name": "index_1", "unique": true, "fieldIds": [ - "405", - "406" + "409", + "410" ], "createdAt": 1778548614328 } @@ -5142,56 +5194,6 @@ "createdAt": 1778548513047, "order": 31, "diagramId": "3taaalng0ut0" - }, - { - "id": "409", - "name": "media_demographics", - "x": -681.6737980968087, - "y": 892.2019045876625, - "fields": [ - { - "id": "410", - "name": "media_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1779210978216 - }, - { - "id": "411", - "name": "genre_id", - "type": { - "id": "uuid", - "name": "uuid" - }, - "unique": true, - "nullable": false, - "primaryKey": true, - "createdAt": 1779211013182 - } - ], - "indexes": [ - { - "id": "412", - "name": "", - "fieldIds": [ - "410", - "411" - ], - "unique": true, - "isPrimaryKey": true, - "createdAt": 1779211084906 - } - ], - "color": "#ffe374", - "createdAt": 1779210978216, - "isView": false, - "order": 46, - "schema": "public" } ], "relationships": [ @@ -5199,11 +5201,11 @@ "id": "413", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "237", "targetSchema": "public", - "targetTableId": "201", - "sourceFieldId": "234", - "targetFieldId": "203", + "targetTableId": "205", + "sourceFieldId": "238", + "targetFieldId": "207", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766565819, @@ -5213,11 +5215,11 @@ "id": "414", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "201", - "sourceFieldId": "156", - "targetFieldId": "206", + "targetTableId": "205", + "sourceFieldId": "160", + "targetFieldId": "210", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766863110, @@ -5227,11 +5229,11 @@ "id": "415", "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "201", - "sourceFieldId": "156", - "targetFieldId": "204", + "targetTableId": "205", + "sourceFieldId": "160", + "targetFieldId": "208", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766807732, @@ -5241,11 +5243,11 @@ "id": "416", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "123", + "sourceTableId": "127", "targetSchema": "public", - "targetTableId": "274", - "sourceFieldId": "124", - "targetFieldId": "276", + "targetTableId": "278", + "sourceFieldId": "128", + "targetFieldId": "280", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777327740, @@ -5255,11 +5257,11 @@ "id": "417", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "274", - "sourceFieldId": "156", - "targetFieldId": "277", + "targetTableId": "278", + "sourceFieldId": "160", + "targetFieldId": "281", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777342519, @@ -5269,11 +5271,11 @@ "id": "418", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "123", + "sourceTableId": "127", "targetSchema": "public", - "targetTableId": "281", - "sourceFieldId": "124", - "targetFieldId": "283", + "targetTableId": "285", + "sourceFieldId": "128", + "targetFieldId": "287", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916, @@ -5283,11 +5285,11 @@ "id": "419", "name": "comment_likes_user_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "281", - "sourceFieldId": "77", - "targetFieldId": "282", + "targetTableId": "285", + "sourceFieldId": "81", + "targetFieldId": "286", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808338630, @@ -5297,11 +5299,11 @@ "id": "420", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "123", + "sourceTableId": "127", "targetSchema": "public", - "targetTableId": "302", - "sourceFieldId": "124", - "targetFieldId": "305", + "targetTableId": "306", + "sourceFieldId": "128", + "targetFieldId": "309", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777586444, @@ -5311,11 +5313,11 @@ "id": "421", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "302", - "sourceFieldId": "156", - "targetFieldId": "304", + "targetTableId": "306", + "sourceFieldId": "160", + "targetFieldId": "308", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777570446, @@ -5325,11 +5327,11 @@ "id": "422", "name": "comments_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "348", + "sourceTableId": "352", "targetSchema": "public", - "targetTableId": "123", - "sourceFieldId": "349", - "targetFieldId": "126", + "targetTableId": "127", + "sourceFieldId": "353", + "targetFieldId": "130", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777292243, @@ -5339,11 +5341,11 @@ "id": "423", "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "123", - "sourceFieldId": "156", - "targetFieldId": "125", + "targetTableId": "127", + "sourceFieldId": "160", + "targetFieldId": "129", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777252269, @@ -5353,11 +5355,11 @@ "id": "424", "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "348", + "sourceTableId": "352", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "350", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "354", + "targetFieldId": "81", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, @@ -5367,11 +5369,11 @@ "id": "425", "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "348", + "sourceTableId": "352", "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "362", - "targetFieldId": "376", + "targetTableId": "379", + "sourceFieldId": "366", + "targetFieldId": "380", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, @@ -5381,11 +5383,11 @@ "id": "426", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "327", + "sourceTableId": "331", "targetSchema": "public", - "targetTableId": "404", - "sourceFieldId": "328", - "targetFieldId": "406", + "targetTableId": "408", + "sourceFieldId": "332", + "targetFieldId": "410", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, @@ -5395,11 +5397,11 @@ "id": "427", "name": "genre_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "311", + "sourceTableId": "315", "targetSchema": "public", - "targetTableId": "404", - "sourceFieldId": "312", - "targetFieldId": "405", + "targetTableId": "408", + "sourceFieldId": "316", + "targetFieldId": "409", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, @@ -5409,11 +5411,11 @@ "id": "428", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "327", + "sourceTableId": "331", "targetSchema": "public", - "targetTableId": "72", - "sourceFieldId": "328", - "targetFieldId": "74", + "targetTableId": "76", + "sourceFieldId": "332", + "targetFieldId": "78", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, @@ -5423,11 +5425,11 @@ "id": "429", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "47", - "sourceFieldId": "156", - "targetFieldId": "50", + "targetTableId": "51", + "sourceFieldId": "160", + "targetFieldId": "54", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771806907, @@ -5437,11 +5439,11 @@ "id": "430", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "47", - "sourceFieldId": "77", - "targetFieldId": "49", + "targetTableId": "51", + "sourceFieldId": "81", + "targetFieldId": "53", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771781222, @@ -5451,11 +5453,11 @@ "id": "431", "name": "media_characters_characters_characters_id", "sourceSchema": "public", - "sourceTableId": "31", + "sourceTableId": "35", "targetSchema": "public", - "targetTableId": "1", - "sourceFieldId": "34", - "targetFieldId": "2", + "targetTableId": "5", + "sourceFieldId": "38", + "targetFieldId": "6", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, @@ -5465,11 +5467,11 @@ "id": "432", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", - "sourceTableId": "31", + "sourceTableId": "35", "targetSchema": "public", - "targetTableId": "399", - "sourceFieldId": "35", - "targetFieldId": "400", + "targetTableId": "403", + "sourceFieldId": "39", + "targetFieldId": "404", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, @@ -5479,11 +5481,11 @@ "id": "433", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "209", - "sourceFieldId": "156", - "targetFieldId": "212", + "targetTableId": "213", + "sourceFieldId": "160", + "targetFieldId": "216", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733368958, @@ -5493,11 +5495,11 @@ "id": "434", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "233", + "sourceTableId": "237", "targetSchema": "public", - "targetTableId": "209", - "sourceFieldId": "234", - "targetFieldId": "210", + "targetTableId": "213", + "sourceFieldId": "238", + "targetFieldId": "214", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733702652, @@ -5505,743 +5507,745 @@ }, { "id": "435", + "name": "media_demographics_genre_id_fk", + "sourceSchema": "public", + "sourceTableId": "331", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "332", + "targetFieldId": "3", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779211061425, + "diagramId": "3taaalng0ut0" + }, + { + "id": "436", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "327", + "sourceTableId": "331", "targetSchema": "public", - "targetTableId": "225", - "sourceFieldId": "328", - "targetFieldId": "227", + "targetTableId": "229", + "sourceFieldId": "332", + "targetFieldId": "231", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283900006, "diagramId": "3taaalng0ut0" }, { - "id": "436", + "id": "437", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "225", - "sourceFieldId": "106", - "targetFieldId": "226", + "targetTableId": "229", + "sourceFieldId": "110", + "targetFieldId": "230", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283887322, "diagramId": "3taaalng0ut0" }, { - "id": "437", + "id": "438", "name": "media_external_links_media_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "56", - "sourceFieldId": "77", - "targetFieldId": "58", + "targetTableId": "60", + "sourceFieldId": "81", + "targetFieldId": "62", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299855251, "diagramId": "3taaalng0ut0" }, { - "id": "438", + "id": "439", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "56", + "sourceTableId": "60", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "58", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "62", + "targetFieldId": "81", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "439", + "id": "440", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "327", + "sourceTableId": "331", "targetSchema": "public", - "targetTableId": "14", - "sourceFieldId": "328", - "targetFieldId": "16", + "targetTableId": "18", + "sourceFieldId": "332", + "targetFieldId": "20", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "3taaalng0ut0" }, { - "id": "440", + "id": "441", "name": "media_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "14", - "sourceFieldId": "105", - "targetFieldId": "15", + "targetTableId": "18", + "sourceFieldId": "109", + "targetFieldId": "19", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "3taaalng0ut0" }, { - "id": "441", + "id": "442", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "388", + "sourceTableId": "392", "targetSchema": "public", - "targetTableId": "371", - "sourceFieldId": "389", - "targetFieldId": "373", + "targetTableId": "375", + "sourceFieldId": "393", + "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360252829, "diagramId": "3taaalng0ut0" }, { - "id": "442", + "id": "443", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "220", - "sourceFieldId": "77", - "targetFieldId": "223", + "targetTableId": "224", + "sourceFieldId": "81", + "targetFieldId": "226", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299808576, "diagramId": "3taaalng0ut0" }, { - "id": "443", + "id": "444", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "220", + "sourceTableId": "224", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "223", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "226", + "targetFieldId": "81", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299804996, "diagramId": "3taaalng0ut0" }, { - "id": "444", + "id": "445", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "220", + "sourceTableId": "224", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "223", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "226", + "targetFieldId": "81", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299795695, "diagramId": "3taaalng0ut0" }, { - "id": "445", + "id": "446", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", - "sourceTableId": "220", + "sourceTableId": "224", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "223", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "226", + "targetFieldId": "81", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, - { - "id": "446", - "name": "media_submissions_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "37", - "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "39", - "targetFieldId": "77", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777636061160, - "diagramId": "3taaalng0ut0" - }, { "id": "447", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "37", + "sourceTableId": "41", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "39", - "targetFieldId": "77", + "targetTableId": "80", + "sourceFieldId": "43", + "targetFieldId": "81", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777636061160, + "diagramId": "3taaalng0ut0" + }, + { + "id": "448", + "name": "media_submissions_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "41", + "targetSchema": "public", + "targetTableId": "80", + "sourceFieldId": "43", + "targetFieldId": "81", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364362256, "diagramId": "3taaalng0ut0" }, { - "id": "448", + "id": "449", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "146", + "sourceTableId": "150", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "147", - "targetFieldId": "88", + "targetTableId": "80", + "sourceFieldId": "151", + "targetFieldId": "92", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "449", + "id": "450", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "187", - "sourceFieldId": "94", - "targetFieldId": "188", + "targetTableId": "191", + "sourceFieldId": "98", + "targetFieldId": "192", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "450", + "id": "451", "name": "medias_characters_media_characters_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "31", - "sourceFieldId": "111", - "targetFieldId": "32", + "targetTableId": "35", + "sourceFieldId": "115", + "targetFieldId": "36", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "451", + "id": "452", "name": "medias_country_fk", "sourceSchema": "public", - "sourceTableId": "19", + "sourceTableId": "23", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "20", - "targetFieldId": "100", + "targetTableId": "80", + "sourceFieldId": "24", + "targetFieldId": "104", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402285202, "diagramId": "3taaalng0ut0" }, { - "id": "452", + "id": "453", + "name": "medias_demographics_fk", + "sourceSchema": "public", + "sourceTableId": "80", + "targetSchema": "public", + "targetTableId": "1", + "sourceFieldId": "112", + "targetFieldId": "2", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779211057969, + "diagramId": "3taaalng0ut0" + }, + { + "id": "454", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "56", - "sourceFieldId": "110", - "targetFieldId": "57", + "targetTableId": "60", + "sourceFieldId": "114", + "targetFieldId": "61", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "453", + "id": "455", "name": "medias_id_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "209", - "sourceFieldId": "77", - "targetFieldId": "211", + "targetTableId": "213", + "sourceFieldId": "81", + "targetFieldId": "215", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733359073, "diagramId": "3taaalng0ut0" }, { - "id": "454", + "id": "456", "name": "medias_licensors_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "258", - "sourceFieldId": "103", - "targetFieldId": "259", + "targetTableId": "262", + "sourceFieldId": "107", + "targetFieldId": "263", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "3taaalng0ut0" }, { - "id": "455", + "id": "457", "name": "medias_producers_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "371", - "sourceFieldId": "102", - "targetFieldId": "372", + "targetTableId": "375", + "sourceFieldId": "106", + "targetFieldId": "376", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360239834, "diagramId": "3taaalng0ut0" }, { - "id": "456", + "id": "458", "name": "medias_relations_media_relations_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "220", - "sourceFieldId": "109", - "targetFieldId": "221", + "targetTableId": "224", + "sourceFieldId": "113", + "targetFieldId": "225", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "457", + "id": "459", "name": "medias_source_media_sources_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "367", - "sourceFieldId": "89", - "targetFieldId": "368", + "targetTableId": "371", + "sourceFieldId": "93", + "targetFieldId": "372", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "458", + "id": "460", "name": "medias_status_media_statuses_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "229", - "sourceFieldId": "90", - "targetFieldId": "230", + "targetTableId": "233", + "sourceFieldId": "94", + "targetFieldId": "234", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "459", + "id": "461", "name": "medias_studios_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "119", - "sourceFieldId": "104", - "targetFieldId": "120", + "targetTableId": "123", + "sourceFieldId": "108", + "targetFieldId": "124", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "3taaalng0ut0" }, { - "id": "460", + "id": "462", "name": "medias_themes_fk", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "72", - "sourceFieldId": "107", - "targetFieldId": "73", + "targetTableId": "76", + "sourceFieldId": "111", + "targetFieldId": "77", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "3taaalng0ut0" }, { - "id": "461", + "id": "463", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", - "sourceTableId": "76", + "sourceTableId": "80", "targetSchema": "public", - "targetTableId": "192", - "sourceFieldId": "83", - "targetFieldId": "193", + "targetTableId": "196", + "sourceFieldId": "87", + "targetFieldId": "197", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "462", + "id": "464", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "388", + "sourceTableId": "392", "targetSchema": "public", - "targetTableId": "119", - "sourceFieldId": "389", - "targetFieldId": "121", + "targetTableId": "123", + "sourceFieldId": "393", + "targetFieldId": "125", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "3taaalng0ut0" }, { - "id": "463", + "id": "465", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "388", + "sourceTableId": "392", "targetSchema": "public", - "targetTableId": "258", - "sourceFieldId": "389", - "targetFieldId": "260", + "targetTableId": "262", + "sourceFieldId": "393", + "targetFieldId": "264", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "3taaalng0ut0" }, { - "id": "464", + "id": "466", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "297", - "sourceFieldId": "156", - "targetFieldId": "298", + "targetTableId": "301", + "sourceFieldId": "160", + "targetFieldId": "302", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517515380, "diagramId": "3taaalng0ut0" }, { - "id": "465", + "id": "467", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "297", - "sourceFieldId": "156", - "targetFieldId": "299", + "targetTableId": "301", + "sourceFieldId": "160", + "targetFieldId": "303", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517541887, "diagramId": "3taaalng0ut0" }, { - "id": "466", + "id": "468", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", - "sourceTableId": "187", + "sourceTableId": "191", "targetSchema": "public", - "targetTableId": "142", - "sourceFieldId": "188", - "targetFieldId": "144", + "targetTableId": "146", + "sourceFieldId": "192", + "targetFieldId": "148", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548767353, "diagramId": "3taaalng0ut0" }, { - "id": "467", + "id": "469", "name": "rating_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "311", + "sourceTableId": "315", "targetSchema": "public", - "targetTableId": "142", - "sourceFieldId": "312", - "targetFieldId": "143", + "targetTableId": "146", + "sourceFieldId": "316", + "targetFieldId": "147", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548748682, "diagramId": "3taaalng0ut0" }, { - "id": "468", + "id": "470", "name": "user_addresses_user_id_fk", "sourceSchema": "public", - "sourceTableId": "62", + "sourceTableId": "66", "targetSchema": "public", - "targetTableId": "155", - "sourceFieldId": "63", - "targetFieldId": "156", + "targetTableId": "159", + "sourceFieldId": "67", + "targetFieldId": "160", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778816615538, "diagramId": "3taaalng0ut0" }, { - "id": "469", + "id": "471", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", - "sourceTableId": "19", + "sourceTableId": "23", "targetSchema": "public", - "targetTableId": "27", - "sourceFieldId": "20", - "targetFieldId": "29", + "targetTableId": "31", + "sourceFieldId": "24", + "targetFieldId": "33", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778549061296, "diagramId": "3taaalng0ut0" }, { - "id": "470", + "id": "472", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "311", + "sourceTableId": "315", "targetSchema": "public", - "targetTableId": "27", - "sourceFieldId": "312", - "targetFieldId": "28", + "targetTableId": "31", + "sourceFieldId": "316", + "targetFieldId": "32", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778549044482, "diagramId": "3taaalng0ut0" }, { - "id": "471", + "id": "473", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "215", - "sourceFieldId": "156", - "targetFieldId": "216", + "targetTableId": "219", + "sourceFieldId": "160", + "targetFieldId": "220", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "3taaalng0ut0" }, { - "id": "472", + "id": "474", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "215", - "sourceFieldId": "156", - "targetFieldId": "217", + "targetTableId": "219", + "sourceFieldId": "160", + "targetFieldId": "221", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "3taaalng0ut0" }, { - "id": "473", + "id": "475", "name": "user_oauth_credentials_user_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "334", - "sourceFieldId": "156", - "targetFieldId": "336", + "targetTableId": "338", + "sourceFieldId": "160", + "targetFieldId": "340", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778822260934, "diagramId": "3taaalng0ut0" }, { - "id": "474", + "id": "476", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", - "sourceTableId": "1", + "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "311", - "sourceFieldId": "2", - "targetFieldId": "313", + "targetTableId": "315", + "sourceFieldId": "6", + "targetFieldId": "317", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778518451836, "diagramId": "3taaalng0ut0" }, { - "id": "475", + "id": "477", "name": "user_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "311", + "sourceTableId": "315", "targetSchema": "public", - "targetTableId": "155", - "sourceFieldId": "312", - "targetFieldId": "156", + "targetTableId": "159", + "sourceFieldId": "316", + "targetFieldId": "160", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "3taaalng0ut0" }, { - "id": "476", + "id": "478", "name": "user_sessions_user_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "262", - "sourceFieldId": "156", - "targetFieldId": "264", + "targetTableId": "266", + "sourceFieldId": "160", + "targetFieldId": "268", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778815073839, "diagramId": "3taaalng0ut0" }, { - "id": "477", + "id": "479", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "348", + "sourceTableId": "352", "targetSchema": "public", - "targetTableId": "150", - "sourceFieldId": "349", - "targetFieldId": "152", + "targetTableId": "154", + "sourceFieldId": "353", + "targetFieldId": "156", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732139998, "diagramId": "3taaalng0ut0" }, { - "id": "478", + "id": "480", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "150", - "sourceFieldId": "156", - "targetFieldId": "151", + "targetTableId": "154", + "sourceFieldId": "160", + "targetFieldId": "155", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778731708617, "diagramId": "3taaalng0ut0" }, { - "id": "479", + "id": "481", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "19", - "sourceFieldId": "167", - "targetFieldId": "20", + "targetTableId": "23", + "sourceFieldId": "171", + "targetFieldId": "24", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778401651979, "diagramId": "3taaalng0ut0" }, { - "id": "480", + "id": "482", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "287", + "sourceTableId": "291", "targetSchema": "public", - "targetTableId": "241", - "sourceFieldId": "289", - "targetFieldId": "242", + "targetTableId": "245", + "sourceFieldId": "293", + "targetFieldId": "246", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "3taaalng0ut0" }, { - "id": "481", + "id": "483", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "177", - "sourceFieldId": "156", - "targetFieldId": "180", + "targetTableId": "181", + "sourceFieldId": "160", + "targetFieldId": "184", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "3taaalng0ut0" }, { - "id": "482", + "id": "484", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "155", + "sourceTableId": "159", "targetSchema": "public", - "targetTableId": "177", - "sourceFieldId": "156", - "targetFieldId": "181", + "targetTableId": "181", + "sourceFieldId": "160", + "targetFieldId": "185", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "3taaalng0ut0" }, { - "id": "483", + "id": "485", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "177", + "sourceTableId": "181", "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "179", - "targetFieldId": "376", + "targetTableId": "379", + "sourceFieldId": "183", + "targetFieldId": "380", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778732648012, "diagramId": "3taaalng0ut0" }, { - "id": "484", + "id": "486", "name": "videos_service_id_video_services_id", "sourceSchema": "public", - "sourceTableId": "375", + "sourceTableId": "379", "targetSchema": "public", - "targetTableId": "241", - "sourceFieldId": "377", - "targetFieldId": "242", + "targetTableId": "245", + "sourceFieldId": "381", + "targetFieldId": "246", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "485", + "id": "487", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "399", + "sourceTableId": "403", "targetSchema": "public", - "targetTableId": "132", - "sourceFieldId": "402", - "targetFieldId": "133", + "targetTableId": "136", + "sourceFieldId": "406", + "targetFieldId": "137", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" - }, - { - "id": "486", - "name": "medias_demographics_fk", - "sourceSchema": "public", - "sourceTableId": "76", - "targetSchema": "public", - "targetTableId": "409", - "sourceFieldId": "108", - "targetFieldId": "410", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1779211057969 - }, - { - "id": "487", - "name": "media_demographics_genre_id_fk", - "sourceSchema": "public", - "sourceTableId": "327", - "targetSchema": "public", - "targetTableId": "409", - "sourceFieldId": "328", - "targetFieldId": "411", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1779211061425 } ], "dependencies": [], diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2b29399..014771e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -255,7 +255,7 @@ model Media { explicit_genres MediaExplicitGenre[] themes MediaTheme[] demographics MediaDemographic[] - // relations MediaRelation[] + relations MediaRelation[] @relation("MediaRelationMedia") // external_links MediaExternalLink[] // characters MediaCharacter[] // approved_by User? @relation(fields: [approver_id], references: [id]) @@ -271,6 +271,7 @@ model Media { status_id String @db.Uuid age_rating_id String? @db.Uuid country_id String? @db.Uuid + related_media MediaRelation[] @relation("MediaRelationRelatedMedia") @@map("medias") } @@ -420,6 +421,17 @@ model Genre { @@map("genres") } +model MediaRelation { + media Media @relation(fields: [media_id], references: [id], name: "MediaRelationMedia") + related_media Media @relation(fields: [related_media_id], references: [id], name: "MediaRelationRelatedMedia") + relation_type String @db.VarChar(50) + + media_id String @db.Uuid + related_media_id String @db.Uuid + @@id([media_id, related_media_id]) + @@map("media_relations") +} + /** From 2b5ee227319701178b61cbcdb1fc53a0badf97e1 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 18 May 2026 21:00:00 +0700 Subject: [PATCH 26/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20media?= =?UTF-8?q?=5Fexternal=5Flinks=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 10 +++++----- prisma/schema.prisma | 12 +++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index b9af441..e992025 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-19T16:28:02.086Z", - "updatedAt": "2026-05-20T01:23:06.250Z", + "updatedAt": "2026-05-21T15:34:35.866Z", "databaseType": "postgresql", "tables": [ { @@ -768,26 +768,26 @@ }, { "id": "62", - "name": "media_id", + "name": "media", "type": { "id": "uuid", "name": "uuid" }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589093 }, { "id": "63", - "name": "name", + "name": "site_name", "type": { "id": "varchar", "name": "varchar" }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589093, "characterMaximumLength": "64" }, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 014771e..444062a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -256,7 +256,7 @@ model Media { themes MediaTheme[] demographics MediaDemographic[] relations MediaRelation[] @relation("MediaRelationMedia") - // external_links MediaExternalLink[] + external_links MediaExternalLink[] // characters MediaCharacter[] // approved_by User? @relation(fields: [approver_id], references: [id]) // approved_at Boolean @default(false) @@ -432,6 +432,16 @@ model MediaRelation { @@map("media_relations") } +model MediaExternalLink { + id String @id @db.Uuid @default(uuid(7)) + media Media @relation(fields: [media_id], references: [id]) + url String @db.VarChar(255) + site_name String? @db.VarChar(100) + + media_id String @db.Uuid + @@map("media_external_links") +} + /** From 0684c2511bfdc9e9eef80056b7b0a12ad490e0fd Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 19 May 2026 21:00:00 +0700 Subject: [PATCH 27/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20chara?= =?UTF-8?q?cter=20relations=20to=20media=20and=20user=20preference=20schem?= =?UTF-8?q?as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 49 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 444062a..44107d5 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -61,6 +61,12 @@ enum media_season { fall } +enum character_role { + main + supporting + background +} + /** @@ -148,8 +154,8 @@ model UserSession { } model UserPreference { - user_id String @id @db.Uuid - // char_as_partner + user_id String @id @db.Uuid + char_as_partner Character @relation(fields: [char_as_partner_id], references: [id]) comment_picture String? @db.VarChar(255) enable_watch_history Boolean @default(true) enable_search_history Boolean @default(false) @@ -162,11 +168,12 @@ model UserPreference { publish_partner Boolean @default(true) subscribe_to_newsletter Boolean @default(true) enable_security_alerts Boolean @default(true) + genre_preferences UserGenrePreference[] + rating_preferences UserRatingPreference[] + country_preferences UserCountryPreference[] - user User @relation(fields: [user_id], references: [id]) - genre_preferences UserGenrePreference[] - rating_preferences UserRatingPreference[] - country_preferences UserCountryPreference[] + user User @relation(fields: [user_id], references: [id]) + char_as_partner_id String @db.Uuid @@map("user_preferences") } @@ -257,7 +264,7 @@ model Media { demographics MediaDemographic[] relations MediaRelation[] @relation("MediaRelationMedia") external_links MediaExternalLink[] - // characters MediaCharacter[] + characters MediaCharacter[] // approved_by User? @relation(fields: [approver_id], references: [id]) // approved_at Boolean @default(false) // created_by User? @relation(fields: [created_by_id], references: [id]) @@ -442,6 +449,34 @@ model MediaExternalLink { @@map("media_external_links") } +model MediaCharacter { + media Media @relation(fields: [media_id], references: [id]) + character Character @relation(fields: [character_id], references: [id]) + role character_role + + media_id String @db.Uuid + character_id String @db.Uuid + @@id([media_id, character_id]) + @@map("media_characters") +} + +model Character { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(255) + image String? @db.VarChar(255) + small_image String? @db.VarChar(255) + mal_id Int? @unique + fanpage_url String? @db.VarChar(255) + liked Int @default(0) + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + + partnered_user UserPreference[] + media_characters MediaCharacter[] + @@map("characters") +} + /** From b8b30a930c02db82c55a085bcba07d870cff8e08 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Wed, 20 May 2026 21:00:00 +0700 Subject: [PATCH 28/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20voice?= =?UTF-8?q?=20actor=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 44107d5..224597b 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -477,6 +477,18 @@ model Character { @@map("characters") } +model Staff { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(255) + image String? @db.VarChar(255) + mal_id Int? @unique + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + + @@map("staff") +} + /** From 0798bdd838d2ac30536a056865cbb12c8104890a Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Thu, 21 May 2026 21:00:00 +0700 Subject: [PATCH 29/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20media?= =?UTF-8?q?=20character=20schema=20with=20voice=20actor=20relation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1790 +++++++++++++++++++++--------------------- prisma/schema.prisma | 15 +- 2 files changed, 890 insertions(+), 915 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index e992025..6c98583 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-19T16:28:02.086Z", - "updatedAt": "2026-05-21T15:34:35.866Z", + "updatedAt": "2026-05-21T16:04:03.060Z", "databaseType": "postgresql", "tables": [ { @@ -128,19 +128,6 @@ }, { "id": "11", - "name": "mal_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "12", "name": "liked", "type": { "id": "int", @@ -153,20 +140,7 @@ "default": "0" }, { - "id": "13", - "name": "connections", - "type": { - "id": "int", - "name": "int" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "default": "0" - }, - { - "id": "14", + "id": "12", "name": "deleted_at", "type": { "id": "timestamp", @@ -178,7 +152,7 @@ "createdAt": 1777282589093 }, { - "id": "15", + "id": "13", "name": "updated_at", "type": { "id": "timestamp", @@ -190,7 +164,7 @@ "createdAt": 1777282589093 }, { - "id": "16", + "id": "14", "name": "created_at", "type": { "id": "timestamp", @@ -204,7 +178,7 @@ ], "indexes": [ { - "id": "17", + "id": "15", "name": "", "unique": true, "fieldIds": [ @@ -222,14 +196,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "18", + "id": "16", "name": "media_genres", "schema": "public", "x": -680.2926238134676, "y": 498.7845736528544, "fields": [ { - "id": "19", + "id": "17", "name": "media_id", "type": { "id": "uuid", @@ -241,7 +215,7 @@ "createdAt": 1777283473368 }, { - "id": "20", + "id": "18", "name": "genre_id", "type": { "id": "uuid", @@ -255,22 +229,22 @@ ], "indexes": [ { - "id": "21", + "id": "19", "name": "", "unique": true, "fieldIds": [ - "20" + "18" ], "createdAt": 1777283473368, "isPrimaryKey": true }, { - "id": "22", + "id": "20", "name": "index_1", "unique": true, "fieldIds": [ - "19", - "20" + "17", + "18" ], "createdAt": 1778570545534 } @@ -284,14 +258,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "23", + "id": "21", "name": "countries", "schema": "public", "x": -675.4825871206289, "y": -936.5527418709639, "fields": [ { - "id": "24", + "id": "22", "name": "id", "type": { "id": "uuid", @@ -303,7 +277,7 @@ "createdAt": 1778401101216 }, { - "id": "25", + "id": "23", "name": "name", "type": { "id": "varchar", @@ -316,7 +290,7 @@ "characterMaximumLength": "155" }, { - "id": "26", + "id": "24", "name": "slug", "type": { "id": "varchar", @@ -329,7 +303,7 @@ "characterMaximumLength": "165" }, { - "id": "27", + "id": "25", "name": "code", "type": { "id": "varchar", @@ -342,7 +316,7 @@ "characterMaximumLength": "3" }, { - "id": "28", + "id": "26", "name": "flag", "type": { "id": "varchar", @@ -355,7 +329,7 @@ "characterMaximumLength": "255" }, { - "id": "29", + "id": "27", "name": "banner", "type": { "id": "varchar", @@ -370,11 +344,11 @@ ], "indexes": [ { - "id": "30", + "id": "28", "name": "", "unique": true, "fieldIds": [ - "24" + "22" ], "createdAt": 1778401101216, "isPrimaryKey": true @@ -387,14 +361,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "31", + "id": "29", "name": "user_country_preferences", "schema": "public", "x": -1035.3700148414782, "y": -1151.086340953631, "fields": [ { - "id": "32", + "id": "30", "name": "user_id", "type": { "id": "uuid", @@ -406,7 +380,7 @@ "createdAt": 1778548950226 }, { - "id": "33", + "id": "31", "name": "country_id", "type": { "id": "uuid", @@ -418,7 +392,7 @@ "createdAt": 1778548914423 }, { - "id": "34", + "id": "32", "name": "state", "type": { "id": "user_preference_state", @@ -438,15 +412,15 @@ "diagramId": "3taaalng0ut0" }, { - "id": "35", + "id": "33", "name": "media_characters", "schema": "public", "x": -678.5745105809615, "y": 1034.4123102253634, "fields": [ { - "id": "36", - "name": "id", + "id": "34", + "name": "media", "type": { "id": "uuid", "name": "uuid" @@ -457,7 +431,19 @@ "createdAt": 1777282589093 }, { - "id": "37", + "id": "35", + "name": "character", + "type": { + "id": "uuid", + "name": "uuid" + }, + "primaryKey": true, + "unique": false, + "nullable": false, + "createdAt": 1777282589093 + }, + { + "id": "36", "name": "role", "type": { "id": "enum", @@ -470,19 +456,7 @@ "comments": "main, supporting" }, { - "id": "38", - "name": "characters", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": false, - "createdAt": 1777282589093 - }, - { - "id": "39", + "id": "37", "name": "voice_actor", "type": { "id": "uuid", @@ -496,11 +470,12 @@ ], "indexes": [ { - "id": "40", + "id": "38", "name": "", "unique": true, "fieldIds": [ - "36" + "34", + "35" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -513,14 +488,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "41", + "id": "39", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "42", + "id": "40", "name": "id", "type": { "id": "uuid", @@ -532,7 +507,7 @@ "createdAt": 1777362610195 }, { - "id": "43", + "id": "41", "name": "media_id", "type": { "id": "uuid", @@ -544,7 +519,7 @@ "createdAt": 1777362624424 }, { - "id": "44", + "id": "42", "name": "created_by", "type": { "id": "uuid", @@ -557,7 +532,7 @@ "comments": "" }, { - "id": "45", + "id": "43", "name": "status", "type": { "id": "status_submission", @@ -570,7 +545,7 @@ "comments": "" }, { - "id": "46", + "id": "44", "name": "reviewed_by", "type": { "id": "uuid", @@ -582,7 +557,7 @@ "createdAt": 1777362758238 }, { - "id": "47", + "id": "45", "name": "reviewed_at", "type": { "id": "timestamp", @@ -594,7 +569,7 @@ "createdAt": 1777363627973 }, { - "id": "48", + "id": "46", "name": "reason", "type": { "id": "text", @@ -606,7 +581,7 @@ "createdAt": 1777363674757 }, { - "id": "49", + "id": "47", "name": "created_at", "type": { "id": "timestamp", @@ -621,11 +596,11 @@ ], "indexes": [ { - "id": "50", + "id": "48", "name": "", "unique": true, "fieldIds": [ - "42" + "40" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -638,14 +613,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "51", + "id": "49", "name": "home_media_banner", "schema": "public", "x": -1034.714934672103, "y": -969.0938770634809, "fields": [ { - "id": "52", + "id": "50", "name": "id", "type": { "id": "uuid", @@ -657,7 +632,7 @@ "createdAt": 1778771594518 }, { - "id": "53", + "id": "51", "name": "media_id", "type": { "id": "uuid", @@ -669,7 +644,7 @@ "createdAt": 1778771625245 }, { - "id": "54", + "id": "52", "name": "created_by", "type": { "id": "uuid", @@ -681,7 +656,7 @@ "createdAt": 1778771632111 }, { - "id": "55", + "id": "53", "name": "priority", "type": { "id": "smallint", @@ -693,7 +668,7 @@ "createdAt": 1778771638786 }, { - "id": "56", + "id": "54", "name": "start_show", "type": { "id": "timestamp", @@ -705,7 +680,7 @@ "createdAt": 1778771679920 }, { - "id": "57", + "id": "55", "name": "end_show", "type": { "id": "timestamp", @@ -717,7 +692,7 @@ "createdAt": 1778771687135 }, { - "id": "58", + "id": "56", "name": "created_at", "type": { "id": "timestamp", @@ -731,11 +706,11 @@ ], "indexes": [ { - "id": "59", + "id": "57", "name": "", "unique": true, "fieldIds": [ - "52" + "50" ], "createdAt": 1778771594518, "isPrimaryKey": true @@ -748,14 +723,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "60", + "id": "58", "name": "media_external_links", "schema": "public", "x": 194.5066892978357, "y": -264.72537027522213, "fields": [ { - "id": "61", + "id": "59", "name": "id", "type": { "id": "uuid", @@ -767,7 +742,7 @@ "createdAt": 1777282589093 }, { - "id": "62", + "id": "60", "name": "media", "type": { "id": "uuid", @@ -779,7 +754,7 @@ "createdAt": 1777282589093 }, { - "id": "63", + "id": "61", "name": "site_name", "type": { "id": "varchar", @@ -792,7 +767,7 @@ "characterMaximumLength": "64" }, { - "id": "64", + "id": "62", "name": "url", "type": { "id": "varchar", @@ -807,11 +782,11 @@ ], "indexes": [ { - "id": "65", + "id": "63", "name": "", "unique": true, "fieldIds": [ - "61" + "59" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -824,14 +799,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "66", + "id": "64", "name": "user_addresses", "schema": "public", "x": 655.2842034425264, "y": -1010.0698801871714, "fields": [ { - "id": "67", + "id": "65", "name": "user_id", "type": { "id": "uuid", @@ -843,7 +818,7 @@ "createdAt": 1778816506150 }, { - "id": "68", + "id": "66", "name": "street_address", "type": { "id": "varchar", @@ -856,7 +831,7 @@ "characterMaximumLength": "255" }, { - "id": "69", + "id": "67", "name": "district", "type": { "id": "varchar", @@ -869,7 +844,7 @@ "characterMaximumLength": "100" }, { - "id": "70", + "id": "68", "name": "city", "type": { "id": "varchar", @@ -882,7 +857,7 @@ "characterMaximumLength": "100" }, { - "id": "71", + "id": "69", "name": "province", "type": { "id": "varchar", @@ -895,7 +870,7 @@ "characterMaximumLength": "100" }, { - "id": "72", + "id": "70", "name": "postal_code", "type": { "id": "varchar", @@ -908,7 +883,7 @@ "characterMaximumLength": "20" }, { - "id": "73", + "id": "71", "name": "coordinate", "type": { "id": "varchar", @@ -921,7 +896,7 @@ "characterMaximumLength": "50" }, { - "id": "74", + "id": "72", "name": "updated_at", "type": { "id": "timestamp", @@ -935,11 +910,11 @@ ], "indexes": [ { - "id": "75", + "id": "73", "name": "", "unique": true, "fieldIds": [ - "67" + "65" ], "createdAt": 1778816506150, "isPrimaryKey": true @@ -952,14 +927,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "76", + "id": "74", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "77", + "id": "75", "name": "media_id", "type": { "id": "uuid", @@ -971,7 +946,7 @@ "createdAt": 1777295294621 }, { - "id": "78", + "id": "76", "name": "genre_id", "type": { "id": "uuid", @@ -985,12 +960,12 @@ ], "indexes": [ { - "id": "79", + "id": "77", "name": "", "unique": true, "fieldIds": [ - "77", - "78" + "75", + "76" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -1004,14 +979,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "80", + "id": "78", "name": "medias", "schema": "public", "x": -338.2943640690703, "y": -279.84862879126985, "fields": [ { - "id": "81", + "id": "79", "name": "id", "type": { "id": "uuid", @@ -1023,7 +998,7 @@ "createdAt": 1777282589092 }, { - "id": "82", + "id": "80", "name": "mal_id", "type": { "id": "int", @@ -1035,7 +1010,7 @@ "createdAt": 1777282589092 }, { - "id": "83", + "id": "81", "name": "title", "type": { "id": "varchar", @@ -1048,7 +1023,7 @@ "characterMaximumLength": "255" }, { - "id": "84", + "id": "82", "name": "title_secondary", "type": { "id": "varchar", @@ -1061,7 +1036,7 @@ "characterMaximumLength": "255" }, { - "id": "85", + "id": "83", "name": "title_original", "type": { "id": "varchar", @@ -1074,7 +1049,7 @@ "characterMaximumLength": "255" }, { - "id": "86", + "id": "84", "name": "title_synonyms", "type": { "id": "varchar", @@ -1089,7 +1064,7 @@ "comments": "" }, { - "id": "87", + "id": "85", "name": "trailers", "type": { "id": "uuid", @@ -1101,7 +1076,7 @@ "createdAt": 1777282589092 }, { - "id": "88", + "id": "86", "name": "synopsis", "type": { "id": "text", @@ -1113,7 +1088,7 @@ "createdAt": 1777282589092 }, { - "id": "89", + "id": "87", "name": "small_image_url", "type": { "id": "varchar", @@ -1126,7 +1101,7 @@ "characterMaximumLength": "255" }, { - "id": "90", + "id": "88", "name": "medium_image_url", "type": { "id": "varchar", @@ -1139,7 +1114,7 @@ "characterMaximumLength": "255" }, { - "id": "91", + "id": "89", "name": "large_image_url", "type": { "id": "varchar", @@ -1152,7 +1127,7 @@ "characterMaximumLength": "255" }, { - "id": "92", + "id": "90", "name": "type", "type": { "id": "uuid", @@ -1164,7 +1139,7 @@ "createdAt": 1777282589092 }, { - "id": "93", + "id": "91", "name": "source", "type": { "id": "uuid", @@ -1176,7 +1151,7 @@ "createdAt": 1777282589092 }, { - "id": "94", + "id": "92", "name": "status", "type": { "id": "uuid", @@ -1188,7 +1163,7 @@ "createdAt": 1777282589092 }, { - "id": "95", + "id": "93", "name": "airing", "type": { "id": "boolean", @@ -1201,7 +1176,7 @@ "default": "false" }, { - "id": "96", + "id": "94", "name": "start_airing", "type": { "id": "date", @@ -1213,7 +1188,7 @@ "createdAt": 1777282589092 }, { - "id": "97", + "id": "95", "name": "end_airing", "type": { "id": "date", @@ -1225,7 +1200,7 @@ "createdAt": 1777282589092 }, { - "id": "98", + "id": "96", "name": "age_rating", "type": { "id": "uuid", @@ -1237,7 +1212,7 @@ "createdAt": 1777282589092 }, { - "id": "99", + "id": "97", "name": "score_total", "type": { "id": "int", @@ -1250,7 +1225,7 @@ "default": "0" }, { - "id": "100", + "id": "98", "name": "score_count", "type": { "id": "int", @@ -1263,7 +1238,7 @@ "default": "0" }, { - "id": "101", + "id": "99", "name": "background", "type": { "id": "text", @@ -1275,7 +1250,7 @@ "createdAt": 1777282589092 }, { - "id": "102", + "id": "100", "name": "season", "type": { "id": "media_season", @@ -1288,7 +1263,7 @@ "comments": "enum(winter, spring, summer, fall)" }, { - "id": "103", + "id": "101", "name": "year", "type": { "id": "smallint", @@ -1300,7 +1275,7 @@ "createdAt": 1777282589092 }, { - "id": "104", + "id": "102", "name": "country", "type": { "id": "uuid", @@ -1312,7 +1287,7 @@ "createdAt": 1777635858846 }, { - "id": "105", + "id": "103", "name": "broadcast_date", "type": { "id": "varchar", @@ -1325,7 +1300,7 @@ "characterMaximumLength": "64" }, { - "id": "106", + "id": "104", "name": "producers", "type": { "id": "uuid", @@ -1337,7 +1312,7 @@ "createdAt": 1777282589092 }, { - "id": "107", + "id": "105", "name": "licensors", "type": { "id": "uuid", @@ -1349,7 +1324,7 @@ "createdAt": 1777282589092 }, { - "id": "108", + "id": "106", "name": "studios", "type": { "id": "uuid", @@ -1361,7 +1336,7 @@ "createdAt": 1777282589092 }, { - "id": "109", + "id": "107", "name": "genres", "type": { "id": "uuid", @@ -1373,7 +1348,7 @@ "createdAt": 1777282589092 }, { - "id": "110", + "id": "108", "name": "explicit_genres", "type": { "id": "uuid", @@ -1385,7 +1360,7 @@ "createdAt": 1777282589092 }, { - "id": "111", + "id": "109", "name": "themes", "type": { "id": "uuid", @@ -1397,7 +1372,7 @@ "createdAt": 1777282589092 }, { - "id": "112", + "id": "110", "name": "demographics", "type": { "id": "uuid", @@ -1409,7 +1384,7 @@ "createdAt": 1777282589092 }, { - "id": "113", + "id": "111", "name": "relations", "type": { "id": "uuid", @@ -1421,7 +1396,7 @@ "createdAt": 1777282589092 }, { - "id": "114", + "id": "112", "name": "external_links", "type": { "id": "uuid", @@ -1433,7 +1408,7 @@ "createdAt": 1777282589092 }, { - "id": "115", + "id": "113", "name": "characters", "type": { "id": "uuid", @@ -1445,7 +1420,7 @@ "createdAt": 1777282589092 }, { - "id": "116", + "id": "114", "name": "approved", "type": { "id": "boolean", @@ -1458,7 +1433,7 @@ "default": "false" }, { - "id": "117", + "id": "115", "name": "approved_by", "type": { "id": "uuid", @@ -1470,7 +1445,7 @@ "createdAt": 1777282589092 }, { - "id": "118", + "id": "116", "name": "created_by", "type": { "id": "uuid", @@ -1482,7 +1457,7 @@ "createdAt": 1777282589092 }, { - "id": "119", + "id": "117", "name": "deleted_at", "type": { "id": "timestamp", @@ -1494,7 +1469,7 @@ "createdAt": 1777282589092 }, { - "id": "120", + "id": "118", "name": "updated_at", "type": { "id": "timestamp", @@ -1506,7 +1481,7 @@ "createdAt": 1777282589092 }, { - "id": "121", + "id": "119", "name": "created_at", "type": { "id": "timestamp", @@ -1520,11 +1495,11 @@ ], "indexes": [ { - "id": "122", + "id": "120", "name": "", "unique": true, "fieldIds": [ - "81" + "79" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -1539,14 +1514,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "123", + "id": "121", "name": "media_studios", "schema": "public", "x": 194.57420294478976, "y": 402.07246285824783, "fields": [ { - "id": "124", + "id": "122", "name": "media_id", "type": { "id": "uuid", @@ -1558,7 +1533,7 @@ "createdAt": 1777360514222 }, { - "id": "125", + "id": "123", "name": "producer_id", "type": { "id": "uuid", @@ -1572,12 +1547,12 @@ ], "indexes": [ { - "id": "126", + "id": "124", "name": "", "unique": true, "fieldIds": [ - "124", - "125" + "122", + "123" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -1590,14 +1565,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "127", + "id": "125", "name": "comments", "schema": "public", "x": -1035.4972528190797, "y": -21.831519473281823, "fields": [ { - "id": "128", + "id": "126", "name": "id", "type": { "id": "uuid", @@ -1609,7 +1584,7 @@ "createdAt": 1778772484798 }, { - "id": "129", + "id": "127", "name": "user_id", "type": { "id": "uuid", @@ -1621,7 +1596,7 @@ "createdAt": 1778772536237 }, { - "id": "130", + "id": "128", "name": "episode_id", "type": { "id": "uuid", @@ -1633,7 +1608,7 @@ "createdAt": 1778772542751 }, { - "id": "131", + "id": "129", "name": "content", "type": { "id": "varchar", @@ -1646,7 +1621,7 @@ "characterMaximumLength": "255" }, { - "id": "132", + "id": "130", "name": "created_at", "type": { "id": "timestamp", @@ -1658,7 +1633,7 @@ "createdAt": 1778777149915 }, { - "id": "133", + "id": "131", "name": "updated_at", "type": { "id": "timestamp", @@ -1670,7 +1645,7 @@ "createdAt": 1778777198204 }, { - "id": "134", + "id": "132", "name": "deleted_at", "type": { "id": "timestamp", @@ -1684,11 +1659,11 @@ ], "indexes": [ { - "id": "135", + "id": "133", "name": "", "unique": true, "fieldIds": [ - "128" + "126" ], "createdAt": 1778772484798, "isPrimaryKey": true @@ -1701,14 +1676,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "136", + "id": "134", "name": "staff", "schema": "public", "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "137", + "id": "135", "name": "id", "type": { "id": "uuid", @@ -1720,7 +1695,7 @@ "createdAt": 1777282589093 }, { - "id": "138", + "id": "136", "name": "name", "type": { "id": "varchar", @@ -1733,7 +1708,7 @@ "characterMaximumLength": "255" }, { - "id": "139", + "id": "137", "name": "image", "type": { "id": "varchar", @@ -1746,7 +1721,7 @@ "characterMaximumLength": "255" }, { - "id": "140", + "id": "138", "name": "mal_id", "type": { "id": "int", @@ -1758,20 +1733,7 @@ "createdAt": 1777282589093 }, { - "id": "141", - "name": "mal_url", - "type": { - "id": "varchar", - "name": "varchar" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589093, - "characterMaximumLength": "255" - }, - { - "id": "142", + "id": "139", "name": "deleted_at", "type": { "id": "timestamp", @@ -1783,7 +1745,7 @@ "createdAt": 1777282589093 }, { - "id": "143", + "id": "140", "name": "updated_at", "type": { "id": "timestamp", @@ -1795,7 +1757,7 @@ "createdAt": 1777282589093 }, { - "id": "144", + "id": "141", "name": "created_at", "type": { "id": "timestamp", @@ -1809,11 +1771,11 @@ ], "indexes": [ { - "id": "145", + "id": "142", "name": "", "unique": true, "fieldIds": [ - "137" + "135" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1826,14 +1788,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "146", + "id": "143", "name": "user_rating_preferences", "schema": "public", "x": -1036.138591583759, "y": -1328.817114710954, "fields": [ { - "id": "147", + "id": "144", "name": "user_id", "type": { "id": "uuid", @@ -1845,7 +1807,7 @@ "createdAt": 1778548671790 }, { - "id": "148", + "id": "145", "name": "rating_id", "type": { "id": "uuid", @@ -1857,7 +1819,7 @@ "createdAt": 1778548699069 }, { - "id": "149", + "id": "146", "name": "state", "type": { "id": "user_preference_state", @@ -1877,14 +1839,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "150", + "id": "147", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "151", + "id": "148", "name": "id", "type": { "id": "uuid", @@ -1896,7 +1858,7 @@ "createdAt": 1777282589093 }, { - "id": "152", + "id": "149", "name": "name", "type": { "id": "varchar", @@ -1911,11 +1873,11 @@ ], "indexes": [ { - "id": "153", + "id": "150", "name": "", "unique": true, "fieldIds": [ - "151" + "148" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1928,14 +1890,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "154", + "id": "151", "name": "user_watch_histories", "schema": "public", "x": -335.9290422316319, "y": -1189.7301850410581, "fields": [ { - "id": "155", + "id": "152", "name": "user_id", "type": { "id": "uuid", @@ -1947,7 +1909,7 @@ "createdAt": 1778569467263 }, { - "id": "156", + "id": "153", "name": "episode_id", "type": { "id": "uuid", @@ -1959,7 +1921,7 @@ "createdAt": 1778569477336 }, { - "id": "157", + "id": "154", "name": "updated_at", "type": { "id": "timestamp", @@ -1973,12 +1935,12 @@ ], "indexes": [ { - "id": "158", + "id": "155", "name": "index_1", "unique": true, "fieldIds": [ - "156", - "155" + "153", + "152" ], "createdAt": 1778732177200 } @@ -1991,14 +1953,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "159", + "id": "156", "name": "users", "schema": "public", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "160", + "id": "157", "name": "id", "type": { "id": "uuid", @@ -2010,7 +1972,7 @@ "createdAt": 1778390635628 }, { - "id": "161", + "id": "158", "name": "email", "type": { "id": "varchar", @@ -2022,7 +1984,7 @@ "createdAt": 1778391266880 }, { - "id": "162", + "id": "159", "name": "password", "type": { "id": "varchar", @@ -2035,7 +1997,7 @@ "characterMaximumLength": "255" }, { - "id": "163", + "id": "160", "name": "username", "type": { "id": "varchar", @@ -2048,7 +2010,7 @@ "characterMaximumLength": "28" }, { - "id": "164", + "id": "161", "name": "fullname", "type": { "id": "varchar", @@ -2061,7 +2023,7 @@ "characterMaximumLength": "32" }, { - "id": "165", + "id": "162", "name": "avatar", "type": { "id": "varchar", @@ -2074,7 +2036,7 @@ "characterMaximumLength": "255" }, { - "id": "166", + "id": "163", "name": "bio", "type": { "id": "text", @@ -2086,7 +2048,7 @@ "createdAt": 1778390888222 }, { - "id": "167", + "id": "164", "name": "datebirth", "type": { "id": "date", @@ -2098,7 +2060,7 @@ "createdAt": 1778391007890 }, { - "id": "168", + "id": "165", "name": "role", "type": { "id": "user_role", @@ -2110,7 +2072,7 @@ "createdAt": 1778771211530 }, { - "id": "169", + "id": "166", "name": "sex", "type": { "id": "user_sex", @@ -2122,7 +2084,7 @@ "createdAt": 1778391031530 }, { - "id": "170", + "id": "167", "name": "phone_number", "type": { "id": "varchar", @@ -2135,7 +2097,7 @@ "characterMaximumLength": "15" }, { - "id": "171", + "id": "168", "name": "country", "type": { "id": "uuid", @@ -2147,7 +2109,7 @@ "createdAt": 1778401621258 }, { - "id": "172", + "id": "169", "name": "auth_provider", "type": { "id": "varchar", @@ -2160,7 +2122,7 @@ "characterMaximumLength": "64" }, { - "id": "173", + "id": "170", "name": "provider_token", "type": { "id": "varchar", @@ -2173,7 +2135,7 @@ "characterMaximumLength": "255" }, { - "id": "174", + "id": "171", "name": "created_at", "type": { "id": "timestamp", @@ -2186,7 +2148,7 @@ "default": "now()" }, { - "id": "175", + "id": "172", "name": "verified_at", "type": { "id": "timestamp", @@ -2198,7 +2160,7 @@ "createdAt": 1778815129265 }, { - "id": "176", + "id": "173", "name": "updated_at", "type": { "id": "timestamp", @@ -2210,7 +2172,7 @@ "createdAt": 1778517127447 }, { - "id": "177", + "id": "174", "name": "deleted_at", "type": { "id": "timestamp", @@ -2224,30 +2186,30 @@ ], "indexes": [ { - "id": "178", + "id": "175", "name": "", "unique": true, "fieldIds": [ - "160" + "157" ], "createdAt": 1778390635628, "isPrimaryKey": true }, { - "id": "179", + "id": "176", "name": "index_2", "unique": true, "fieldIds": [ - "163" + "160" ], "createdAt": 1778401234711 }, { - "id": "180", + "id": "177", "name": "index_3", "unique": true, "fieldIds": [ - "161" + "158" ], "createdAt": 1778401248519 } @@ -2262,14 +2224,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "181", + "id": "178", "name": "video_submissions", "schema": "public", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "182", + "id": "179", "name": "id", "type": { "id": "uuid", @@ -2281,7 +2243,7 @@ "createdAt": 1777362610195 }, { - "id": "183", + "id": "180", "name": "video_id", "type": { "id": "uuid", @@ -2293,7 +2255,7 @@ "createdAt": 1777362624424 }, { - "id": "184", + "id": "181", "name": "created_by", "type": { "id": "uuid", @@ -2306,7 +2268,7 @@ "comments": "" }, { - "id": "185", + "id": "182", "name": "reviewed_by", "type": { "id": "uuid", @@ -2318,7 +2280,7 @@ "createdAt": 1777362758238 }, { - "id": "186", + "id": "183", "name": "status", "type": { "id": "status_submission", @@ -2332,7 +2294,7 @@ "comments": "" }, { - "id": "187", + "id": "184", "name": "reviewed_at", "type": { "id": "timestamp", @@ -2344,7 +2306,7 @@ "createdAt": 1777363627973 }, { - "id": "188", + "id": "185", "name": "reason", "type": { "id": "text", @@ -2356,7 +2318,7 @@ "createdAt": 1777363674757 }, { - "id": "189", + "id": "186", "name": "created_at", "type": { "id": "timestamp", @@ -2371,11 +2333,11 @@ ], "indexes": [ { - "id": "190", + "id": "187", "name": "", "unique": true, "fieldIds": [ - "182" + "179" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -2389,14 +2351,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "191", + "id": "188", "name": "media_age_ratings", "schema": "public", "x": -679.7484316247582, "y": 342.88283833657397, "fields": [ { - "id": "192", + "id": "189", "name": "id", "type": { "id": "uuid", @@ -2408,7 +2370,7 @@ "createdAt": 1777282589093 }, { - "id": "193", + "id": "190", "name": "name", "type": { "id": "varchar", @@ -2421,7 +2383,7 @@ "characterMaximumLength": "64" }, { - "id": "194", + "id": "191", "name": "min_age", "type": { "id": "smallint", @@ -2435,11 +2397,11 @@ ], "indexes": [ { - "id": "195", + "id": "192", "name": "", "unique": true, "fieldIds": [ - "192" + "189" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2452,14 +2414,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "196", + "id": "193", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "197", + "id": "194", "name": "id", "type": { "id": "uuid", @@ -2471,7 +2433,7 @@ "createdAt": 1777282589092 }, { - "id": "198", + "id": "195", "name": "url", "type": { "id": "varchar", @@ -2484,7 +2446,7 @@ "characterMaximumLength": "255" }, { - "id": "199", + "id": "196", "name": "embed_url", "type": { "id": "varchar", @@ -2497,7 +2459,7 @@ "characterMaximumLength": "255" }, { - "id": "200", + "id": "197", "name": "small_image_url", "type": { "id": "varchar", @@ -2510,7 +2472,7 @@ "characterMaximumLength": "255" }, { - "id": "201", + "id": "198", "name": "medium_image_url", "type": { "id": "varchar", @@ -2523,7 +2485,7 @@ "characterMaximumLength": "255" }, { - "id": "202", + "id": "199", "name": "large_image_url", "type": { "id": "varchar", @@ -2536,7 +2498,7 @@ "characterMaximumLength": "255" }, { - "id": "203", + "id": "200", "name": "maximum_image_url", "type": { "id": "varchar", @@ -2551,11 +2513,11 @@ ], "indexes": [ { - "id": "204", + "id": "201", "name": "", "unique": true, "fieldIds": [ - "197" + "194" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2568,14 +2530,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "205", + "id": "202", "name": "collection_members", "schema": "public", "x": -338.05774312036385, "y": -1466.6668409654785, "fields": [ { - "id": "206", + "id": "203", "name": "id", "type": { "id": "uuid", @@ -2587,7 +2549,7 @@ "createdAt": 1778766471107 }, { - "id": "207", + "id": "204", "name": "collection_id", "type": { "id": "uuid", @@ -2599,7 +2561,7 @@ "createdAt": 1778766493931 }, { - "id": "208", + "id": "205", "name": "user_id", "type": { "id": "uuid", @@ -2611,7 +2573,7 @@ "createdAt": 1778766580515 }, { - "id": "209", + "id": "206", "name": "access_level", "type": { "id": "collection_access_level", @@ -2623,7 +2585,7 @@ "createdAt": 1778766832324 }, { - "id": "210", + "id": "207", "name": "invited_by", "type": { "id": "uuid", @@ -2635,7 +2597,7 @@ "createdAt": 1778766846050 }, { - "id": "211", + "id": "208", "name": "joined_at", "type": { "id": "timestamp", @@ -2649,11 +2611,11 @@ ], "indexes": [ { - "id": "212", + "id": "209", "name": "", "unique": true, "fieldIds": [ - "206" + "203" ], "createdAt": 1778766471107, "isPrimaryKey": true @@ -2667,14 +2629,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "213", + "id": "210", "name": "media_collections", "schema": "public", "x": 197.36608531341386, "y": -468.796634019804, "fields": [ { - "id": "214", + "id": "211", "name": "collection_id", "type": { "id": "uuid", @@ -2686,7 +2648,7 @@ "createdAt": 1778733152986 }, { - "id": "215", + "id": "212", "name": "media_id", "type": { "id": "uuid", @@ -2698,7 +2660,7 @@ "createdAt": 1778733195744 }, { - "id": "216", + "id": "213", "name": "added_by", "type": { "id": "uuid", @@ -2710,7 +2672,7 @@ "createdAt": 1778733169676 }, { - "id": "217", + "id": "214", "name": "added_at", "type": { "id": "bigint", @@ -2724,12 +2686,12 @@ ], "indexes": [ { - "id": "218", + "id": "215", "name": "index_1", "unique": true, "fieldIds": [ - "214", - "215" + "211", + "212" ], "createdAt": 1778733335908 } @@ -2741,14 +2703,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "219", + "id": "216", "name": "user_follows", "schema": "public", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "220", + "id": "217", "name": "follower_id", "type": { "id": "uuid", @@ -2760,7 +2722,7 @@ "createdAt": 1778401701334 }, { - "id": "221", + "id": "218", "name": "following_id", "type": { "id": "uuid", @@ -2772,7 +2734,7 @@ "createdAt": 1778401722682 }, { - "id": "222", + "id": "219", "name": "followed_at", "type": { "id": "timestamp", @@ -2786,12 +2748,12 @@ ], "indexes": [ { - "id": "223", + "id": "220", "name": "index_1", "unique": true, "fieldIds": [ - "221", - "220" + "218", + "217" ], "createdAt": 1778401874053 } @@ -2811,14 +2773,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "224", + "id": "221", "name": "media_relations", "schema": "public", "x": 194.39903094287618, "y": -61.06914750749248, "fields": [ { - "id": "225", + "id": "222", "name": "id", "type": { "id": "uuid", @@ -2830,7 +2792,7 @@ "createdAt": 1777282589092 }, { - "id": "226", + "id": "223", "name": "target_media", "type": { "id": "uuid", @@ -2842,7 +2804,7 @@ "createdAt": 1777282589092 }, { - "id": "227", + "id": "224", "name": "relation", "type": { "id": "varchar", @@ -2857,12 +2819,12 @@ ], "indexes": [ { - "id": "228", + "id": "225", "name": "", "unique": true, "fieldIds": [ - "225", - "226" + "222", + "223" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -2875,14 +2837,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "229", + "id": "226", "name": "media_explicit_genres", "schema": "public", "x": -681.3338818918861, "y": 628.1224828360978, "fields": [ { - "id": "230", + "id": "227", "name": "media_id", "type": { "id": "uuid", @@ -2894,7 +2856,7 @@ "createdAt": 1777283776082 }, { - "id": "231", + "id": "228", "name": "genre_id", "type": { "id": "uuid", @@ -2908,12 +2870,12 @@ ], "indexes": [ { - "id": "232", + "id": "229", "name": "", "unique": true, "fieldIds": [ - "230", - "231" + "227", + "228" ], "createdAt": 1777283776082, "isPrimaryKey": true @@ -2927,14 +2889,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "233", + "id": "230", "name": "media_statuses", "schema": "public", "x": -679.4669719043579, "y": 219.3548090436041, "fields": [ { - "id": "234", + "id": "231", "name": "id", "type": { "id": "uuid", @@ -2946,7 +2908,7 @@ "createdAt": 1777282589093 }, { - "id": "235", + "id": "232", "name": "name", "type": { "id": "varchar", @@ -2961,11 +2923,11 @@ ], "indexes": [ { - "id": "236", + "id": "233", "name": "", "unique": true, "fieldIds": [ - "234" + "231" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2978,14 +2940,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "237", + "id": "234", "name": "collections", "schema": "public", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "238", + "id": "235", "name": "id", "type": { "id": "uuid", @@ -2997,7 +2959,7 @@ "createdAt": 1778733394970 }, { - "id": "239", + "id": "236", "name": "name", "type": { "id": "varchar", @@ -3011,7 +2973,7 @@ "default": null }, { - "id": "240", + "id": "237", "name": "cover_url", "type": { "id": "varchar", @@ -3024,7 +2986,7 @@ "characterMaximumLength": "255" }, { - "id": "241", + "id": "238", "name": "privacy_level", "type": { "id": "privacy_level", @@ -3036,7 +2998,7 @@ "createdAt": 1778766528943 }, { - "id": "242", + "id": "239", "name": "created_at", "type": { "id": "timestamp", @@ -3048,7 +3010,7 @@ "createdAt": 1778733453130 }, { - "id": "243", + "id": "240", "name": "updated_at", "type": { "id": "timestamp", @@ -3062,11 +3024,11 @@ ], "indexes": [ { - "id": "244", + "id": "241", "name": "", "unique": true, "fieldIds": [ - "238" + "235" ], "createdAt": 1778733394970, "isPrimaryKey": true @@ -3079,14 +3041,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "245", + "id": "242", "name": "video_services", "schema": "public", "x": 78.02893671625938, "y": 1219.199725842667, "fields": [ { - "id": "246", + "id": "243", "name": "id", "type": { "id": "uuid", @@ -3098,7 +3060,7 @@ "createdAt": 1777282589094 }, { - "id": "247", + "id": "244", "name": "name", "type": { "id": "varchar", @@ -3111,7 +3073,7 @@ "characterMaximumLength": "155" }, { - "id": "248", + "id": "245", "name": "resolution", "type": { "id": "smallint", @@ -3123,7 +3085,7 @@ "createdAt": 1777282589094 }, { - "id": "249", + "id": "246", "name": "domain", "type": { "id": "varchar", @@ -3136,7 +3098,7 @@ "characterMaximumLength": "255" }, { - "id": "250", + "id": "247", "name": "image_url", "type": { "id": "varchar", @@ -3149,7 +3111,7 @@ "characterMaximumLength": "255" }, { - "id": "251", + "id": "248", "name": "hex_color", "type": { "id": "varchar", @@ -3162,7 +3124,7 @@ "characterMaximumLength": "10" }, { - "id": "252", + "id": "249", "name": "endpoint_video", "type": { "id": "varchar", @@ -3175,7 +3137,7 @@ "characterMaximumLength": "255" }, { - "id": "253", + "id": "250", "name": "endpoint_short", "type": { "id": "varchar", @@ -3188,7 +3150,7 @@ "characterMaximumLength": "255" }, { - "id": "254", + "id": "251", "name": "endpoint_image", "type": { "id": "varchar", @@ -3201,7 +3163,7 @@ "characterMaximumLength": "255" }, { - "id": "255", + "id": "252", "name": "endpoint_download", "type": { "id": "varchar", @@ -3214,7 +3176,7 @@ "characterMaximumLength": "255" }, { - "id": "256", + "id": "253", "name": "created_by", "type": { "id": "uuid", @@ -3226,7 +3188,7 @@ "createdAt": 1777282589094 }, { - "id": "257", + "id": "254", "name": "deleted_at", "type": { "id": "timestamp", @@ -3238,7 +3200,7 @@ "createdAt": 1777282589094 }, { - "id": "258", + "id": "255", "name": "updated_at", "type": { "id": "timestamp", @@ -3250,7 +3212,7 @@ "createdAt": 1777282589094 }, { - "id": "259", + "id": "256", "name": "created_at", "type": { "id": "timestamp", @@ -3264,22 +3226,22 @@ ], "indexes": [ { - "id": "260", + "id": "257", "name": "", "unique": true, "fieldIds": [ - "246" + "243" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "261", + "id": "258", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "247", - "248" + "244", + "245" ], "createdAt": 1777282589094 } @@ -3293,14 +3255,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "262", + "id": "259", "name": "media_licencors", "schema": "public", "x": 194.15644602007046, "y": 251.9575649519487, "fields": [ { - "id": "263", + "id": "260", "name": "media_id", "type": { "id": "uuid", @@ -3312,7 +3274,7 @@ "createdAt": 1777360331507 }, { - "id": "264", + "id": "261", "name": "producer_id", "type": { "id": "uuid", @@ -3326,12 +3288,12 @@ ], "indexes": [ { - "id": "265", + "id": "262", "name": "", "unique": true, "fieldIds": [ - "263", - "264" + "260", + "261" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3344,14 +3306,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "266", + "id": "263", "name": "user_sessions", "schema": "public", "x": -1381.9054198604924, "y": -1329.3058623634636, "fields": [ { - "id": "267", + "id": "264", "name": "id", "type": { "id": "uuid", @@ -3363,7 +3325,7 @@ "createdAt": 1778814742487 }, { - "id": "268", + "id": "265", "name": "user_id", "type": { "id": "uuid", @@ -3375,7 +3337,7 @@ "createdAt": 1778814761364 }, { - "id": "269", + "id": "266", "name": "device_type", "type": { "id": "device_type", @@ -3387,7 +3349,7 @@ "createdAt": 1778814807191 }, { - "id": "270", + "id": "267", "name": "os_type", "type": { "id": "varchar", @@ -3401,7 +3363,7 @@ "default": null }, { - "id": "271", + "id": "268", "name": "os_version", "type": { "id": "varchar", @@ -3414,7 +3376,7 @@ "characterMaximumLength": "50" }, { - "id": "272", + "id": "269", "name": "browser_name", "type": { "id": "varchar", @@ -3427,7 +3389,7 @@ "characterMaximumLength": "50" }, { - "id": "273", + "id": "270", "name": "browser_version", "type": { "id": "varchar", @@ -3440,7 +3402,7 @@ "characterMaximumLength": "50" }, { - "id": "274", + "id": "271", "name": "ip_login", "type": { "id": "inet", @@ -3452,7 +3414,7 @@ "createdAt": 1778814801981 }, { - "id": "275", + "id": "272", "name": "login_at", "type": { "id": "timestamptz", @@ -3464,7 +3426,7 @@ "createdAt": 1778814816604 }, { - "id": "276", + "id": "273", "name": "logout_at", "type": { "id": "timestamptz", @@ -3478,11 +3440,11 @@ ], "indexes": [ { - "id": "277", + "id": "274", "name": "", "unique": true, "fieldIds": [ - "267" + "264" ], "createdAt": 1778814742487, "isPrimaryKey": true @@ -3496,14 +3458,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "278", + "id": "275", "name": "comment_audit_logs", "schema": "public", "x": -1031.768269593756, "y": -322.47738647771854, "fields": [ { - "id": "279", + "id": "276", "name": "id", "type": { "id": "uuid", @@ -3515,7 +3477,7 @@ "createdAt": 1778772275091 }, { - "id": "280", + "id": "277", "name": "comment_id", "type": { "id": "uuid", @@ -3527,7 +3489,7 @@ "createdAt": 1778772293834 }, { - "id": "281", + "id": "278", "name": "performed_by", "type": { "id": "uuid", @@ -3539,7 +3501,7 @@ "createdAt": 1778772315274 }, { - "id": "282", + "id": "279", "name": "action", "type": { "id": "audit_action", @@ -3551,7 +3513,7 @@ "createdAt": 1778772326253 }, { - "id": "283", + "id": "280", "name": "created_at", "type": { "id": "timestamp", @@ -3565,11 +3527,11 @@ ], "indexes": [ { - "id": "284", + "id": "281", "name": "", "unique": true, "fieldIds": [ - "279" + "276" ], "createdAt": 1778772275091, "isPrimaryKey": true @@ -3582,14 +3544,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "285", + "id": "282", "name": "comment_likes", "schema": "public", "x": -1435.9285690968027, "y": 209.11179406446968, "fields": [ { - "id": "286", + "id": "283", "name": "user_id", "type": { "id": "uuid", @@ -3601,7 +3563,7 @@ "createdAt": 1778808096764 }, { - "id": "287", + "id": "284", "name": "comment_id", "type": { "id": "uuid", @@ -3613,7 +3575,7 @@ "createdAt": 1778808185625 }, { - "id": "288", + "id": "285", "name": "type", "type": { "id": "like_type", @@ -3625,7 +3587,7 @@ "createdAt": 1778808192863 }, { - "id": "289", + "id": "286", "name": "created_at", "type": { "id": "timestamp", @@ -3639,12 +3601,12 @@ ], "indexes": [ { - "id": "290", + "id": "287", "name": "index_1", "unique": true, "fieldIds": [ - "287", - "286" + "284", + "283" ], "createdAt": 1778808299354 } @@ -3656,14 +3618,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "291", + "id": "288", "name": "video_service_submissions", "schema": "public", "x": -371.1847878375677, "y": 1294.289208047582, "fields": [ { - "id": "292", + "id": "289", "name": "id", "type": { "id": "uuid", @@ -3675,7 +3637,7 @@ "createdAt": 1777362610195 }, { - "id": "293", + "id": "290", "name": "video_service_id", "type": { "id": "uuid", @@ -3687,7 +3649,7 @@ "createdAt": 1777362624424 }, { - "id": "294", + "id": "291", "name": "created_by", "type": { "id": "uuid", @@ -3700,7 +3662,7 @@ "comments": "" }, { - "id": "295", + "id": "292", "name": "status", "type": { "id": "status_submission", @@ -3714,7 +3676,7 @@ "comments": "" }, { - "id": "296", + "id": "293", "name": "reviewed_by", "type": { "id": "uuid", @@ -3726,7 +3688,7 @@ "createdAt": 1777362758238 }, { - "id": "297", + "id": "294", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3738,7 +3700,7 @@ "createdAt": 1777363627973 }, { - "id": "298", + "id": "295", "name": "reason", "type": { "id": "text", @@ -3750,7 +3712,7 @@ "createdAt": 1777363674757 }, { - "id": "299", + "id": "296", "name": "created_at", "type": { "id": "timestamp", @@ -3765,11 +3727,11 @@ ], "indexes": [ { - "id": "300", + "id": "297", "name": "", "unique": true, "fieldIds": [ - "292" + "289" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3783,14 +3745,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "301", + "id": "298", "name": "provisioned_users", "schema": "public", "x": 204.8991215430349, "y": -1369.625291260797, "fields": [ { - "id": "302", + "id": "299", "name": "provisioned_by", "type": { "id": "uuid", @@ -3802,7 +3764,7 @@ "createdAt": 1778517368377 }, { - "id": "303", + "id": "300", "name": "provisioned_to", "type": { "id": "uuid", @@ -3814,7 +3776,7 @@ "createdAt": 1778517463769 }, { - "id": "304", + "id": "301", "name": "provisioned_at", "type": { "id": "timestamp", @@ -3826,7 +3788,7 @@ "createdAt": 1778517476998 }, { - "id": "305", + "id": "302", "name": "reason", "type": { "id": "varchar", @@ -3847,14 +3809,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "306", + "id": "303", "name": "comment_reports", "schema": "public", "x": -1032.5934799775514, "y": -655.2659179217417, "fields": [ { - "id": "307", + "id": "304", "name": "id", "type": { "id": "uuid", @@ -3866,7 +3828,7 @@ "createdAt": 1778777460892 }, { - "id": "308", + "id": "305", "name": "reporter_id", "type": { "id": "uuid", @@ -3878,7 +3840,7 @@ "createdAt": 1778777475869 }, { - "id": "309", + "id": "306", "name": "comment_id", "type": { "id": "uuid", @@ -3890,7 +3852,7 @@ "createdAt": 1778777483534 }, { - "id": "310", + "id": "307", "name": "title", "type": { "id": "varchar", @@ -3903,7 +3865,7 @@ "characterMaximumLength": "115" }, { - "id": "311", + "id": "308", "name": "status", "type": { "id": "status_submission", @@ -3915,7 +3877,7 @@ "createdAt": 1778777836090 }, { - "id": "312", + "id": "309", "name": "description", "type": { "id": "text", @@ -3927,7 +3889,7 @@ "createdAt": 1778777519944 }, { - "id": "313", + "id": "310", "name": "reported_at", "type": { "id": "timestamp", @@ -3939,7 +3901,7 @@ "createdAt": 1778777537682 }, { - "id": "314", + "id": "311", "name": "closed_at", "type": { "id": "timestamp", @@ -3959,14 +3921,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "315", + "id": "312", "name": "user_preferences", "schema": "public", "x": -675.7144111335546, "y": -1493.2312805453928, "fields": [ { - "id": "316", + "id": "313", "name": "user_id", "type": { "id": "uuid", @@ -3978,7 +3940,7 @@ "createdAt": 1778517633815 }, { - "id": "317", + "id": "314", "name": "character_as_partner", "type": { "id": "uuid", @@ -3990,7 +3952,7 @@ "createdAt": 1778518390023 }, { - "id": "318", + "id": "315", "name": "comment_picture", "type": { "id": "varchar", @@ -4003,7 +3965,7 @@ "characterMaximumLength": "255" }, { - "id": "319", + "id": "316", "name": "enable_watch_history", "type": { "id": "boolean", @@ -4016,7 +3978,7 @@ "default": "true" }, { - "id": "320", + "id": "317", "name": "enable_search_history", "type": { "id": "boolean", @@ -4029,7 +3991,7 @@ "default": "false" }, { - "id": "321", + "id": "318", "name": "is_private_account", "type": { "id": "boolean", @@ -4042,7 +4004,7 @@ "default": "false" }, { - "id": "322", + "id": "319", "name": "can_message_me", "type": { "id": "boolean", @@ -4055,7 +4017,7 @@ "default": "true" }, { - "id": "323", + "id": "320", "name": "publish_birthday", "type": { "id": "boolean", @@ -4068,7 +4030,7 @@ "default": "false" }, { - "id": "324", + "id": "321", "name": "publish_email", "type": { "id": "boolean", @@ -4081,7 +4043,7 @@ "default": "false" }, { - "id": "325", + "id": "322", "name": "publish_phone_number", "type": { "id": "boolean", @@ -4094,7 +4056,7 @@ "default": "false" }, { - "id": "326", + "id": "323", "name": "publish_country", "type": { "id": "boolean", @@ -4107,7 +4069,7 @@ "default": "false" }, { - "id": "327", + "id": "324", "name": "publish_partner", "type": { "id": "boolean", @@ -4120,7 +4082,7 @@ "default": "true" }, { - "id": "328", + "id": "325", "name": "subscribe_to_newsletter", "type": { "id": "boolean", @@ -4133,7 +4095,7 @@ "default": "true" }, { - "id": "329", + "id": "326", "name": "enable_security_alerts", "type": { "id": "boolean", @@ -4148,11 +4110,11 @@ ], "indexes": [ { - "id": "330", + "id": "327", "name": "", "unique": true, "fieldIds": [ - "316" + "313" ], "createdAt": 1778517633815, "isPrimaryKey": true @@ -4166,14 +4128,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "331", + "id": "328", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 283.68770102274635, "fields": [ { - "id": "332", + "id": "329", "name": "id", "type": { "id": "uuid", @@ -4185,7 +4147,7 @@ "createdAt": 1777282589094 }, { - "id": "333", + "id": "330", "name": "mal_id", "type": { "id": "smallint", @@ -4197,7 +4159,7 @@ "createdAt": 1777282589094 }, { - "id": "334", + "id": "331", "name": "name", "type": { "id": "varchar", @@ -4211,7 +4173,7 @@ "default": null }, { - "id": "335", + "id": "332", "name": "slug", "type": { "id": "varchar", @@ -4224,7 +4186,7 @@ "characterMaximumLength": "115" }, { - "id": "336", + "id": "333", "name": "thumbnail_url", "type": { "id": "varchar", @@ -4239,11 +4201,11 @@ ], "indexes": [ { - "id": "337", + "id": "334", "name": "", "unique": true, "fieldIds": [ - "332" + "329" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4256,14 +4218,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "338", + "id": "335", "name": "user_oauth_accounts", "schema": "public", "x": 200.04156829298174, "y": -928.8832495975014, "fields": [ { - "id": "339", + "id": "336", "name": "id", "type": { "id": "uuid", @@ -4275,7 +4237,7 @@ "createdAt": 1778516299633 }, { - "id": "340", + "id": "337", "name": "user_id", "type": { "id": "uuid", @@ -4287,7 +4249,7 @@ "createdAt": 1778516366928 }, { - "id": "341", + "id": "338", "name": "provider_name", "type": { "id": "oauth_provider", @@ -4299,7 +4261,7 @@ "createdAt": 1778822365657 }, { - "id": "342", + "id": "339", "name": "provider_sub", "type": { "id": "varchar", @@ -4312,7 +4274,7 @@ "characterMaximumLength": "255" }, { - "id": "343", + "id": "340", "name": "provider_email", "type": { "id": "varchar", @@ -4326,7 +4288,7 @@ "default": null }, { - "id": "344", + "id": "341", "name": "access_token", "type": { "id": "varchar", @@ -4340,7 +4302,7 @@ "default": null }, { - "id": "345", + "id": "342", "name": "refresh_token", "type": { "id": "varchar", @@ -4353,7 +4315,7 @@ "characterMaximumLength": "255" }, { - "id": "346", + "id": "343", "name": "last_login", "type": { "id": "timestamptz", @@ -4365,7 +4327,7 @@ "createdAt": 1778516872367 }, { - "id": "347", + "id": "344", "name": "expires_at", "type": { "id": "timestamptz", @@ -4377,7 +4339,7 @@ "createdAt": 1778822177415 }, { - "id": "348", + "id": "345", "name": "created_at", "type": { "id": "timestamptz", @@ -4389,7 +4351,7 @@ "createdAt": 1778822183677 }, { - "id": "349", + "id": "346", "name": "updated_at", "type": { "id": "timestamptz", @@ -4403,22 +4365,22 @@ ], "indexes": [ { - "id": "350", + "id": "347", "name": "", "unique": true, "fieldIds": [ - "339" + "336" ], "createdAt": 1778516299633, "isPrimaryKey": true }, { - "id": "351", + "id": "348", "name": "index_2", "unique": true, "fieldIds": [ - "340", - "341" + "337", + "338" ], "createdAt": 1778516903425 } @@ -4431,14 +4393,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "352", + "id": "349", "name": "episodes", "schema": "public", "x": 196.42495741544377, "y": 550.6255135491608, "fields": [ { - "id": "353", + "id": "350", "name": "id", "type": { "id": "uuid", @@ -4450,7 +4412,7 @@ "createdAt": 1777282589093 }, { - "id": "354", + "id": "351", "name": "media_id", "type": { "id": "uuid", @@ -4462,7 +4424,7 @@ "createdAt": 1777282589093 }, { - "id": "355", + "id": "352", "name": "episode", "type": { "id": "smallint", @@ -4474,7 +4436,7 @@ "createdAt": 1777282589093 }, { - "id": "356", + "id": "353", "name": "mal_url", "type": { "id": "varchar", @@ -4487,7 +4449,7 @@ "characterMaximumLength": "255" }, { - "id": "357", + "id": "354", "name": "mal_forum_url", "type": { "id": "varchar", @@ -4500,7 +4462,7 @@ "characterMaximumLength": "255" }, { - "id": "358", + "id": "355", "name": "title", "type": { "id": "varchar", @@ -4513,7 +4475,7 @@ "characterMaximumLength": "155" }, { - "id": "359", + "id": "356", "name": "title_origin", "type": { "id": "varchar", @@ -4526,7 +4488,7 @@ "characterMaximumLength": "155" }, { - "id": "360", + "id": "357", "name": "title_romanji", "type": { "id": "varchar", @@ -4539,7 +4501,7 @@ "characterMaximumLength": "155" }, { - "id": "361", + "id": "358", "name": "aired", "type": { "id": "date", @@ -4551,7 +4513,7 @@ "createdAt": 1777282589093 }, { - "id": "362", + "id": "359", "name": "filler", "type": { "id": "boolean", @@ -4564,7 +4526,7 @@ "default": "false" }, { - "id": "363", + "id": "360", "name": "recap", "type": { "id": "boolean", @@ -4577,7 +4539,7 @@ "default": "false" }, { - "id": "364", + "id": "361", "name": "total_score", "type": { "id": "int", @@ -4589,7 +4551,7 @@ "createdAt": 1777361135322 }, { - "id": "365", + "id": "362", "name": "scored_by", "type": { "id": "int", @@ -4601,7 +4563,7 @@ "createdAt": 1777361233825 }, { - "id": "366", + "id": "363", "name": "videos", "type": { "id": "uuid", @@ -4613,7 +4575,7 @@ "createdAt": 1777282589093 }, { - "id": "367", + "id": "364", "name": "deleted_at", "type": { "id": "timestamp", @@ -4625,7 +4587,7 @@ "createdAt": 1777282589093 }, { - "id": "368", + "id": "365", "name": "updated_at", "type": { "id": "timestamp", @@ -4637,7 +4599,7 @@ "createdAt": 1777282589093 }, { - "id": "369", + "id": "366", "name": "created_at", "type": { "id": "timestamp", @@ -4651,11 +4613,11 @@ ], "indexes": [ { - "id": "370", + "id": "367", "name": "", "unique": true, "fieldIds": [ - "353" + "350" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4669,14 +4631,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "371", + "id": "368", "name": "media_sources", "schema": "public", "x": -680.0105470895069, "y": 97.06852307742538, "fields": [ { - "id": "372", + "id": "369", "name": "id", "type": { "id": "uuid", @@ -4688,7 +4650,7 @@ "createdAt": 1777282589093 }, { - "id": "373", + "id": "370", "name": "name", "type": { "id": "varchar", @@ -4703,11 +4665,11 @@ ], "indexes": [ { - "id": "374", + "id": "371", "name": "", "unique": true, "fieldIds": [ - "372" + "369" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4720,14 +4682,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "375", + "id": "372", "name": "media_producers", "schema": "public", "x": 194.9363737010458, "y": 104.92238147821836, "fields": [ { - "id": "376", + "id": "373", "name": "media_id", "type": { "id": "uuid", @@ -4739,7 +4701,7 @@ "createdAt": 1777360177611 }, { - "id": "377", + "id": "374", "name": "producer_id", "type": { "id": "uuid", @@ -4753,12 +4715,12 @@ ], "indexes": [ { - "id": "378", + "id": "375", "name": "", "unique": true, "fieldIds": [ - "376", - "377" + "373", + "374" ], "createdAt": 1777360177611, "isPrimaryKey": true @@ -4771,14 +4733,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "379", + "id": "376", "name": "videos", "schema": "public", "x": 613.6042418109826, "y": 563.9662290869784, "fields": [ { - "id": "380", + "id": "377", "name": "id", "type": { "id": "uuid", @@ -4790,7 +4752,7 @@ "createdAt": 1777282589094 }, { - "id": "381", + "id": "378", "name": "service_id", "type": { "id": "uuid", @@ -4802,7 +4764,7 @@ "createdAt": 1777282589094 }, { - "id": "382", + "id": "379", "name": "video_code", "type": { "id": "varchar", @@ -4815,7 +4777,7 @@ "characterMaximumLength": "255" }, { - "id": "383", + "id": "380", "name": "short_code", "type": { "id": "varchar", @@ -4828,7 +4790,7 @@ "characterMaximumLength": "255" }, { - "id": "384", + "id": "381", "name": "thumbnail_code", "type": { "id": "varchar", @@ -4841,7 +4803,7 @@ "characterMaximumLength": "255" }, { - "id": "385", + "id": "382", "name": "download_code", "type": { "id": "varchar", @@ -4854,7 +4816,7 @@ "characterMaximumLength": "255" }, { - "id": "386", + "id": "383", "name": "pending_upload", "type": { "id": "boolean", @@ -4867,7 +4829,7 @@ "default": "true" }, { - "id": "387", + "id": "384", "name": "created_by", "type": { "id": "uuid", @@ -4879,7 +4841,7 @@ "createdAt": 1777282589094 }, { - "id": "388", + "id": "385", "name": "deleted_at", "type": { "id": "timestamp", @@ -4891,7 +4853,7 @@ "createdAt": 1777282589094 }, { - "id": "389", + "id": "386", "name": "updated_at", "type": { "id": "timestamp", @@ -4903,7 +4865,7 @@ "createdAt": 1777282589094 }, { - "id": "390", + "id": "387", "name": "created_at", "type": { "id": "timestamp", @@ -4917,11 +4879,11 @@ ], "indexes": [ { - "id": "391", + "id": "388", "name": "", "unique": true, "fieldIds": [ - "380" + "377" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4934,14 +4896,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "392", + "id": "389", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "393", + "id": "390", "name": "id", "type": { "id": "uuid", @@ -4953,7 +4915,7 @@ "createdAt": 1777282589093 }, { - "id": "394", + "id": "391", "name": "mal_id", "type": { "id": "int", @@ -4965,7 +4927,7 @@ "createdAt": 1777282589093 }, { - "id": "395", + "id": "392", "name": "type", "type": { "id": "varchar", @@ -4978,7 +4940,7 @@ "characterMaximumLength": "24" }, { - "id": "396", + "id": "393", "name": "name", "type": { "id": "varchar", @@ -4991,7 +4953,7 @@ "characterMaximumLength": "155" }, { - "id": "397", + "id": "394", "name": "url", "type": { "id": "varchar", @@ -5004,7 +4966,7 @@ "characterMaximumLength": "255" }, { - "id": "398", + "id": "395", "name": "created_by", "type": { "id": "uuid", @@ -5016,7 +4978,7 @@ "createdAt": 1777282589094 }, { - "id": "399", + "id": "396", "name": "deleted_at", "type": { "id": "timestamp", @@ -5028,7 +4990,7 @@ "createdAt": 1777282589094 }, { - "id": "400", + "id": "397", "name": "updated_at", "type": { "id": "timestamp", @@ -5040,7 +5002,7 @@ "createdAt": 1777282589094 }, { - "id": "401", + "id": "398", "name": "created_at", "type": { "id": "timestamp", @@ -5054,11 +5016,11 @@ ], "indexes": [ { - "id": "402", + "id": "399", "name": "", "unique": true, "fieldIds": [ - "393" + "390" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -5071,14 +5033,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "403", + "id": "400", "name": "voice_actors", "schema": "public", "x": -1034.5971892955995, "y": 536.4407371208936, "fields": [ { - "id": "404", + "id": "401", "name": "id", "type": { "id": "uuid", @@ -5090,7 +5052,7 @@ "createdAt": 1777282589093 }, { - "id": "405", + "id": "402", "name": "language", "type": { "id": "varchar", @@ -5103,7 +5065,7 @@ "characterMaximumLength": "115" }, { - "id": "406", + "id": "403", "name": "actor_staff", "type": { "id": "uuid", @@ -5117,11 +5079,11 @@ ], "indexes": [ { - "id": "407", + "id": "404", "name": "", "unique": true, "fieldIds": [ - "404" + "401" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -5134,14 +5096,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "408", + "id": "405", "name": "user_genre_preferences", "schema": "public", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "409", + "id": "406", "name": "user_id", "type": { "id": "uuid", @@ -5153,7 +5115,7 @@ "createdAt": 1778548513047 }, { - "id": "410", + "id": "407", "name": "genre_id", "type": { "id": "uuid", @@ -5165,7 +5127,7 @@ "createdAt": 1778548529915 }, { - "id": "411", + "id": "408", "name": "state", "type": { "id": "user_preference_state", @@ -5179,12 +5141,12 @@ ], "indexes": [ { - "id": "412", + "id": "409", "name": "index_1", "unique": true, "fieldIds": [ - "409", - "410" + "406", + "407" ], "createdAt": 1778548614328 } @@ -5198,265 +5160,265 @@ ], "relationships": [ { - "id": "413", + "id": "410", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "237", + "sourceTableId": "234", "targetSchema": "public", - "targetTableId": "205", - "sourceFieldId": "238", - "targetFieldId": "207", + "targetTableId": "202", + "sourceFieldId": "235", + "targetFieldId": "204", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766565819, "diagramId": "3taaalng0ut0" }, { - "id": "414", + "id": "411", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "205", - "sourceFieldId": "160", - "targetFieldId": "210", + "targetTableId": "202", + "sourceFieldId": "157", + "targetFieldId": "207", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766863110, "diagramId": "3taaalng0ut0" }, { - "id": "415", + "id": "412", "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "205", - "sourceFieldId": "160", - "targetFieldId": "208", + "targetTableId": "202", + "sourceFieldId": "157", + "targetFieldId": "205", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766807732, "diagramId": "3taaalng0ut0" }, { - "id": "416", + "id": "413", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "127", + "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "278", - "sourceFieldId": "128", - "targetFieldId": "280", + "targetTableId": "275", + "sourceFieldId": "126", + "targetFieldId": "277", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777327740, "diagramId": "3taaalng0ut0" }, { - "id": "417", + "id": "414", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "278", - "sourceFieldId": "160", - "targetFieldId": "281", + "targetTableId": "275", + "sourceFieldId": "157", + "targetFieldId": "278", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777342519, "diagramId": "3taaalng0ut0" }, { - "id": "418", + "id": "415", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "127", + "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "285", - "sourceFieldId": "128", - "targetFieldId": "287", + "targetTableId": "282", + "sourceFieldId": "126", + "targetFieldId": "284", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916, "diagramId": "3taaalng0ut0" }, { - "id": "419", + "id": "416", "name": "comment_likes_user_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "285", - "sourceFieldId": "81", - "targetFieldId": "286", + "targetTableId": "282", + "sourceFieldId": "79", + "targetFieldId": "283", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808338630, "diagramId": "3taaalng0ut0" }, { - "id": "420", + "id": "417", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "127", + "sourceTableId": "125", "targetSchema": "public", - "targetTableId": "306", - "sourceFieldId": "128", - "targetFieldId": "309", + "targetTableId": "303", + "sourceFieldId": "126", + "targetFieldId": "306", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777586444, "diagramId": "3taaalng0ut0" }, { - "id": "421", + "id": "418", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "306", - "sourceFieldId": "160", - "targetFieldId": "308", + "targetTableId": "303", + "sourceFieldId": "157", + "targetFieldId": "305", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777570446, "diagramId": "3taaalng0ut0" }, { - "id": "422", + "id": "419", "name": "comments_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "352", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "127", - "sourceFieldId": "353", - "targetFieldId": "130", + "targetTableId": "125", + "sourceFieldId": "350", + "targetFieldId": "128", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777292243, "diagramId": "3taaalng0ut0" }, { - "id": "423", + "id": "420", "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "127", - "sourceFieldId": "160", - "targetFieldId": "129", + "targetTableId": "125", + "sourceFieldId": "157", + "targetFieldId": "127", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777252269, "diagramId": "3taaalng0ut0" }, { - "id": "424", + "id": "421", "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "352", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "354", - "targetFieldId": "81", + "targetTableId": "78", + "sourceFieldId": "351", + "targetFieldId": "79", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "425", + "id": "422", "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "352", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "379", - "sourceFieldId": "366", - "targetFieldId": "380", + "targetTableId": "376", + "sourceFieldId": "363", + "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "426", + "id": "423", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "331", + "sourceTableId": "328", "targetSchema": "public", - "targetTableId": "408", - "sourceFieldId": "332", - "targetFieldId": "410", + "targetTableId": "405", + "sourceFieldId": "329", + "targetFieldId": "407", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, "diagramId": "3taaalng0ut0" }, { - "id": "427", + "id": "424", "name": "genre_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "315", + "sourceTableId": "312", "targetSchema": "public", - "targetTableId": "408", - "sourceFieldId": "316", - "targetFieldId": "409", + "targetTableId": "405", + "sourceFieldId": "313", + "targetFieldId": "406", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, "diagramId": "3taaalng0ut0" }, { - "id": "428", + "id": "425", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "331", + "sourceTableId": "328", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "332", - "targetFieldId": "78", + "targetTableId": "74", + "sourceFieldId": "329", + "targetFieldId": "76", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "3taaalng0ut0" }, { - "id": "429", + "id": "426", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "51", - "sourceFieldId": "160", - "targetFieldId": "54", + "targetTableId": "49", + "sourceFieldId": "157", + "targetFieldId": "52", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771806907, "diagramId": "3taaalng0ut0" }, { - "id": "430", + "id": "427", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "51", - "sourceFieldId": "81", - "targetFieldId": "53", + "targetTableId": "49", + "sourceFieldId": "79", + "targetFieldId": "51", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771781222, "diagramId": "3taaalng0ut0" }, { - "id": "431", + "id": "428", "name": "media_characters_characters_characters_id", "sourceSchema": "public", - "sourceTableId": "35", + "sourceTableId": "33", "targetSchema": "public", "targetTableId": "5", - "sourceFieldId": "38", + "sourceFieldId": "35", "targetFieldId": "6", "sourceCardinality": "many", "targetCardinality": "one", @@ -5464,55 +5426,55 @@ "diagramId": "3taaalng0ut0" }, { - "id": "432", + "id": "429", "name": "media_characters_voice_actor_voice_actors_id", "sourceSchema": "public", - "sourceTableId": "35", + "sourceTableId": "33", "targetSchema": "public", - "targetTableId": "403", - "sourceFieldId": "39", - "targetFieldId": "404", + "targetTableId": "400", + "sourceFieldId": "37", + "targetFieldId": "401", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "433", + "id": "430", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "213", - "sourceFieldId": "160", - "targetFieldId": "216", + "targetTableId": "210", + "sourceFieldId": "157", + "targetFieldId": "213", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733368958, "diagramId": "3taaalng0ut0" }, { - "id": "434", + "id": "431", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "237", + "sourceTableId": "234", "targetSchema": "public", - "targetTableId": "213", - "sourceFieldId": "238", - "targetFieldId": "214", + "targetTableId": "210", + "sourceFieldId": "235", + "targetFieldId": "211", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733702652, "diagramId": "3taaalng0ut0" }, { - "id": "435", + "id": "432", "name": "media_demographics_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "331", + "sourceTableId": "328", "targetSchema": "public", "targetTableId": "1", - "sourceFieldId": "332", + "sourceFieldId": "329", "targetFieldId": "3", "sourceCardinality": "one", "targetCardinality": "many", @@ -5520,154 +5482,196 @@ "diagramId": "3taaalng0ut0" }, { - "id": "436", + "id": "433", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "331", + "sourceTableId": "328", "targetSchema": "public", - "targetTableId": "229", - "sourceFieldId": "332", - "targetFieldId": "231", + "targetTableId": "226", + "sourceFieldId": "329", + "targetFieldId": "228", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283900006, "diagramId": "3taaalng0ut0" }, { - "id": "437", + "id": "434", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "229", - "sourceFieldId": "110", - "targetFieldId": "230", + "targetTableId": "226", + "sourceFieldId": "108", + "targetFieldId": "227", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283887322, "diagramId": "3taaalng0ut0" }, { - "id": "438", + "id": "435", "name": "media_external_links_media_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "60", - "sourceFieldId": "81", - "targetFieldId": "62", + "targetTableId": "58", + "sourceFieldId": "79", + "targetFieldId": "60", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299855251, "diagramId": "3taaalng0ut0" }, { - "id": "439", + "id": "436", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "60", + "sourceTableId": "58", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "62", - "targetFieldId": "81", + "targetTableId": "78", + "sourceFieldId": "60", + "targetFieldId": "79", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "440", + "id": "437", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "331", + "sourceTableId": "328", "targetSchema": "public", - "targetTableId": "18", - "sourceFieldId": "332", - "targetFieldId": "20", + "targetTableId": "16", + "sourceFieldId": "329", + "targetFieldId": "18", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283616203, "diagramId": "3taaalng0ut0" }, { - "id": "441", + "id": "438", "name": "media_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "18", - "sourceFieldId": "109", - "targetFieldId": "19", + "targetTableId": "16", + "sourceFieldId": "107", + "targetFieldId": "17", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283611719, "diagramId": "3taaalng0ut0" }, { - "id": "442", + "id": "439", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "392", + "sourceTableId": "389", "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "393", - "targetFieldId": "377", + "targetTableId": "372", + "sourceFieldId": "390", + "targetFieldId": "374", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360252829, "diagramId": "3taaalng0ut0" }, { - "id": "443", + "id": "440", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "224", - "sourceFieldId": "81", - "targetFieldId": "226", + "targetTableId": "221", + "sourceFieldId": "79", + "targetFieldId": "223", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299808576, "diagramId": "3taaalng0ut0" }, { - "id": "444", + "id": "441", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "224", + "sourceTableId": "221", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "226", - "targetFieldId": "81", + "targetTableId": "78", + "sourceFieldId": "223", + "targetFieldId": "79", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299804996, "diagramId": "3taaalng0ut0" }, { - "id": "445", + "id": "442", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "224", + "sourceTableId": "221", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "226", - "targetFieldId": "81", + "targetTableId": "78", + "sourceFieldId": "223", + "targetFieldId": "79", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299795695, "diagramId": "3taaalng0ut0" }, { - "id": "446", + "id": "443", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", - "sourceTableId": "224", + "sourceTableId": "221", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "226", - "targetFieldId": "81", + "targetTableId": "78", + "sourceFieldId": "223", + "targetFieldId": "79", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "444", + "name": "media_submissions_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "39", + "targetSchema": "public", + "targetTableId": "78", + "sourceFieldId": "41", + "targetFieldId": "79", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777636061160, + "diagramId": "3taaalng0ut0" + }, + { + "id": "445", + "name": "media_submissions_media_id_fk", + "sourceSchema": "public", + "sourceTableId": "39", + "targetSchema": "public", + "targetTableId": "78", + "sourceFieldId": "41", + "targetFieldId": "79", + "sourceCardinality": "one", + "targetCardinality": "one", + "createdAt": 1777364362256, + "diagramId": "3taaalng0ut0" + }, + { + "id": "446", + "name": "media_types_id_medias_type", + "sourceSchema": "public", + "sourceTableId": "147", + "targetSchema": "public", + "targetTableId": "78", + "sourceFieldId": "148", + "targetFieldId": "90", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, @@ -5675,96 +5679,54 @@ }, { "id": "447", - "name": "media_submissions_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "41", - "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "43", - "targetFieldId": "81", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777636061160, - "diagramId": "3taaalng0ut0" - }, - { - "id": "448", - "name": "media_submissions_media_id_fk", - "sourceSchema": "public", - "sourceTableId": "41", - "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "43", - "targetFieldId": "81", - "sourceCardinality": "one", - "targetCardinality": "one", - "createdAt": 1777364362256, - "diagramId": "3taaalng0ut0" - }, - { - "id": "449", - "name": "media_types_id_medias_type", - "sourceSchema": "public", - "sourceTableId": "150", - "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "151", - "targetFieldId": "92", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "3taaalng0ut0" - }, - { - "id": "450", "name": "medias_age_rating_media_age_ratings_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "191", - "sourceFieldId": "98", - "targetFieldId": "192", + "targetTableId": "188", + "sourceFieldId": "96", + "targetFieldId": "189", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "451", + "id": "448", "name": "medias_characters_media_characters_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "35", - "sourceFieldId": "115", - "targetFieldId": "36", + "targetTableId": "33", + "sourceFieldId": "113", + "targetFieldId": "34", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "452", + "id": "449", "name": "medias_country_fk", "sourceSchema": "public", - "sourceTableId": "23", + "sourceTableId": "21", "targetSchema": "public", - "targetTableId": "80", - "sourceFieldId": "24", - "targetFieldId": "104", + "targetTableId": "78", + "sourceFieldId": "22", + "targetFieldId": "102", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402285202, "diagramId": "3taaalng0ut0" }, { - "id": "453", + "id": "450", "name": "medias_demographics_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", "targetTableId": "1", - "sourceFieldId": "112", + "sourceFieldId": "110", "targetFieldId": "2", "sourceCardinality": "one", "targetCardinality": "many", @@ -5772,476 +5734,476 @@ "diagramId": "3taaalng0ut0" }, { - "id": "454", + "id": "451", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "60", - "sourceFieldId": "114", - "targetFieldId": "61", + "targetTableId": "58", + "sourceFieldId": "112", + "targetFieldId": "59", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "455", + "id": "452", "name": "medias_id_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "213", - "sourceFieldId": "81", - "targetFieldId": "215", + "targetTableId": "210", + "sourceFieldId": "79", + "targetFieldId": "212", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733359073, "diagramId": "3taaalng0ut0" }, { - "id": "456", + "id": "453", "name": "medias_licensors_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "262", - "sourceFieldId": "107", - "targetFieldId": "263", + "targetTableId": "259", + "sourceFieldId": "105", + "targetFieldId": "260", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "3taaalng0ut0" }, { - "id": "457", + "id": "454", "name": "medias_producers_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "375", - "sourceFieldId": "106", - "targetFieldId": "376", + "targetTableId": "372", + "sourceFieldId": "104", + "targetFieldId": "373", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360239834, "diagramId": "3taaalng0ut0" }, { - "id": "458", + "id": "455", "name": "medias_relations_media_relations_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "224", - "sourceFieldId": "113", - "targetFieldId": "225", + "targetTableId": "221", + "sourceFieldId": "111", + "targetFieldId": "222", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "459", + "id": "456", "name": "medias_source_media_sources_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "371", - "sourceFieldId": "93", - "targetFieldId": "372", + "targetTableId": "368", + "sourceFieldId": "91", + "targetFieldId": "369", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "460", + "id": "457", "name": "medias_status_media_statuses_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "233", - "sourceFieldId": "94", - "targetFieldId": "234", + "targetTableId": "230", + "sourceFieldId": "92", + "targetFieldId": "231", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "461", + "id": "458", "name": "medias_studios_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "123", - "sourceFieldId": "108", - "targetFieldId": "124", + "targetTableId": "121", + "sourceFieldId": "106", + "targetFieldId": "122", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "3taaalng0ut0" }, { - "id": "462", + "id": "459", "name": "medias_themes_fk", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "76", - "sourceFieldId": "111", - "targetFieldId": "77", + "targetTableId": "74", + "sourceFieldId": "109", + "targetFieldId": "75", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "3taaalng0ut0" }, { - "id": "463", + "id": "460", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", - "sourceTableId": "80", + "sourceTableId": "78", "targetSchema": "public", - "targetTableId": "196", - "sourceFieldId": "87", - "targetFieldId": "197", + "targetTableId": "193", + "sourceFieldId": "85", + "targetFieldId": "194", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "464", + "id": "461", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "392", + "sourceTableId": "389", "targetSchema": "public", - "targetTableId": "123", - "sourceFieldId": "393", - "targetFieldId": "125", + "targetTableId": "121", + "sourceFieldId": "390", + "targetFieldId": "123", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "3taaalng0ut0" }, { - "id": "465", + "id": "462", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "392", + "sourceTableId": "389", "targetSchema": "public", - "targetTableId": "262", - "sourceFieldId": "393", - "targetFieldId": "264", + "targetTableId": "259", + "sourceFieldId": "390", + "targetFieldId": "261", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "3taaalng0ut0" }, { - "id": "466", + "id": "463", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "301", - "sourceFieldId": "160", - "targetFieldId": "302", + "targetTableId": "298", + "sourceFieldId": "157", + "targetFieldId": "299", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517515380, "diagramId": "3taaalng0ut0" }, { - "id": "467", + "id": "464", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "301", - "sourceFieldId": "160", - "targetFieldId": "303", + "targetTableId": "298", + "sourceFieldId": "157", + "targetFieldId": "300", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517541887, "diagramId": "3taaalng0ut0" }, { - "id": "468", + "id": "465", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", - "sourceTableId": "191", + "sourceTableId": "188", "targetSchema": "public", - "targetTableId": "146", - "sourceFieldId": "192", - "targetFieldId": "148", + "targetTableId": "143", + "sourceFieldId": "189", + "targetFieldId": "145", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548767353, "diagramId": "3taaalng0ut0" }, { - "id": "469", + "id": "466", "name": "rating_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "315", + "sourceTableId": "312", "targetSchema": "public", - "targetTableId": "146", - "sourceFieldId": "316", - "targetFieldId": "147", + "targetTableId": "143", + "sourceFieldId": "313", + "targetFieldId": "144", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548748682, "diagramId": "3taaalng0ut0" }, { - "id": "470", + "id": "467", "name": "user_addresses_user_id_fk", "sourceSchema": "public", - "sourceTableId": "66", + "sourceTableId": "64", "targetSchema": "public", - "targetTableId": "159", - "sourceFieldId": "67", - "targetFieldId": "160", + "targetTableId": "156", + "sourceFieldId": "65", + "targetFieldId": "157", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778816615538, "diagramId": "3taaalng0ut0" }, { - "id": "471", + "id": "468", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", - "sourceTableId": "23", + "sourceTableId": "21", "targetSchema": "public", - "targetTableId": "31", - "sourceFieldId": "24", - "targetFieldId": "33", + "targetTableId": "29", + "sourceFieldId": "22", + "targetFieldId": "31", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778549061296, "diagramId": "3taaalng0ut0" }, { - "id": "472", + "id": "469", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "315", + "sourceTableId": "312", "targetSchema": "public", - "targetTableId": "31", - "sourceFieldId": "316", - "targetFieldId": "32", + "targetTableId": "29", + "sourceFieldId": "313", + "targetFieldId": "30", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778549044482, "diagramId": "3taaalng0ut0" }, { - "id": "473", + "id": "470", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "219", - "sourceFieldId": "160", - "targetFieldId": "220", + "targetTableId": "216", + "sourceFieldId": "157", + "targetFieldId": "217", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "3taaalng0ut0" }, { - "id": "474", + "id": "471", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "219", - "sourceFieldId": "160", - "targetFieldId": "221", + "targetTableId": "216", + "sourceFieldId": "157", + "targetFieldId": "218", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "3taaalng0ut0" }, { - "id": "475", + "id": "472", "name": "user_oauth_credentials_user_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "338", - "sourceFieldId": "160", - "targetFieldId": "340", + "targetTableId": "335", + "sourceFieldId": "157", + "targetFieldId": "337", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778822260934, "diagramId": "3taaalng0ut0" }, { - "id": "476", + "id": "473", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "315", + "targetTableId": "312", "sourceFieldId": "6", - "targetFieldId": "317", + "targetFieldId": "314", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778518451836, "diagramId": "3taaalng0ut0" }, { - "id": "477", + "id": "474", "name": "user_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "315", + "sourceTableId": "312", "targetSchema": "public", - "targetTableId": "159", - "sourceFieldId": "316", - "targetFieldId": "160", + "targetTableId": "156", + "sourceFieldId": "313", + "targetFieldId": "157", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "3taaalng0ut0" }, { - "id": "478", + "id": "475", "name": "user_sessions_user_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "266", - "sourceFieldId": "160", - "targetFieldId": "268", + "targetTableId": "263", + "sourceFieldId": "157", + "targetFieldId": "265", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778815073839, "diagramId": "3taaalng0ut0" }, { - "id": "479", + "id": "476", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "352", + "sourceTableId": "349", "targetSchema": "public", - "targetTableId": "154", - "sourceFieldId": "353", - "targetFieldId": "156", + "targetTableId": "151", + "sourceFieldId": "350", + "targetFieldId": "153", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732139998, "diagramId": "3taaalng0ut0" }, { - "id": "480", + "id": "477", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "154", - "sourceFieldId": "160", - "targetFieldId": "155", + "targetTableId": "151", + "sourceFieldId": "157", + "targetFieldId": "152", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778731708617, "diagramId": "3taaalng0ut0" }, { - "id": "481", + "id": "478", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "23", - "sourceFieldId": "171", - "targetFieldId": "24", + "targetTableId": "21", + "sourceFieldId": "168", + "targetFieldId": "22", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778401651979, "diagramId": "3taaalng0ut0" }, { - "id": "482", + "id": "479", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "291", + "sourceTableId": "288", "targetSchema": "public", - "targetTableId": "245", - "sourceFieldId": "293", - "targetFieldId": "246", + "targetTableId": "242", + "sourceFieldId": "290", + "targetFieldId": "243", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "3taaalng0ut0" }, { - "id": "483", + "id": "480", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "181", - "sourceFieldId": "160", - "targetFieldId": "184", + "targetTableId": "178", + "sourceFieldId": "157", + "targetFieldId": "181", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "3taaalng0ut0" }, { - "id": "484", + "id": "481", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "159", + "sourceTableId": "156", "targetSchema": "public", - "targetTableId": "181", - "sourceFieldId": "160", - "targetFieldId": "185", + "targetTableId": "178", + "sourceFieldId": "157", + "targetFieldId": "182", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "3taaalng0ut0" }, { - "id": "485", + "id": "482", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "181", + "sourceTableId": "178", "targetSchema": "public", - "targetTableId": "379", - "sourceFieldId": "183", - "targetFieldId": "380", + "targetTableId": "376", + "sourceFieldId": "180", + "targetFieldId": "377", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778732648012, "diagramId": "3taaalng0ut0" }, { - "id": "486", + "id": "483", "name": "videos_service_id_video_services_id", "sourceSchema": "public", - "sourceTableId": "379", + "sourceTableId": "376", "targetSchema": "public", - "targetTableId": "245", - "sourceFieldId": "381", - "targetFieldId": "246", + "targetTableId": "242", + "sourceFieldId": "378", + "targetFieldId": "243", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "487", + "id": "484", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "403", + "sourceTableId": "400", "targetSchema": "public", - "targetTableId": "136", - "sourceFieldId": "406", - "targetFieldId": "137", + "targetTableId": "134", + "sourceFieldId": "403", + "targetFieldId": "135", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, @@ -6252,7 +6214,7 @@ "areas": [], "customTypes": [ { - "id": "488", + "id": "485", "name": "audit_action", "kind": "enum", "values": [ @@ -6265,7 +6227,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "489", + "id": "486", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6278,7 +6240,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "490", + "id": "487", "name": "device_type", "kind": "enum", "values": [ @@ -6291,7 +6253,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "491", + "id": "488", "name": "like_type", "kind": "enum", "values": [ @@ -6302,7 +6264,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "492", + "id": "489", "name": "media_season", "kind": "enum", "values": [ @@ -6315,7 +6277,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "493", + "id": "490", "name": "oauth_provider", "kind": "enum", "values": [ @@ -6326,7 +6288,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "494", + "id": "491", "name": "privacy_level", "kind": "enum", "values": [ @@ -6338,7 +6300,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "495", + "id": "492", "name": "status_submission", "kind": "enum", "values": [ @@ -6350,7 +6312,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "496", + "id": "493", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6361,7 +6323,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "497", + "id": "494", "name": "user_role", "kind": "enum", "values": [ @@ -6374,7 +6336,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "498", + "id": "495", "name": "user_sex", "kind": "enum", "values": [ diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 224597b..72a7118 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -450,13 +450,14 @@ model MediaExternalLink { } model MediaCharacter { + id String @id @db.Uuid @default(uuid(7)) media Media @relation(fields: [media_id], references: [id]) character Character @relation(fields: [character_id], references: [id]) + voice_actors VoiceActor[] role character_role media_id String @db.Uuid character_id String @db.Uuid - @@id([media_id, character_id]) @@map("media_characters") } @@ -477,6 +478,17 @@ model Character { @@map("characters") } +model VoiceActor { + id String @id @db.Uuid @default(uuid(7)) + media_character_id String @db.Uuid + language String @db.VarChar(115) + actor_staff Staff @relation(fields: [staff_id], references: [id]) + + staff_id String @db.Uuid + media_character MediaCharacter @relation(fields: [media_character_id], references: [id]) + @@map("voice_actors") +} + model Staff { id String @id @db.Uuid @default(uuid(7)) name String @db.VarChar(255) @@ -486,6 +498,7 @@ model Staff { updated_at DateTime @updatedAt @db.Timestamptz() created_at DateTime @default(now()) @db.Timestamptz() + voice_actors VoiceActor[] @@map("staff") } From b824daf079fe9358066b8b32468c115673493449 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 22 May 2026 07:38:53 +0700 Subject: [PATCH 30/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20complete=20?= =?UTF-8?q?required=20fields=20for=20media=20schemaa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 72a7118..d0aa8dd 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -103,6 +103,10 @@ model User { provisioned_as_admin ProvisionedUser[] @relation("ProvisionedUserAdmin") provisioned_as_user ProvisionedUser[] @relation("ProvisionedUserUser") created_producers Producer[] + approved_media Media[] @relation("MediaApprover") + created_media Media[] @relation("MediaCreator") + updated_media Media[] @relation("MediaUpdater") + deleted_media Media[] @relation("MediaDeleter") @@map("users") } @@ -265,13 +269,14 @@ model Media { relations MediaRelation[] @relation("MediaRelationMedia") external_links MediaExternalLink[] characters MediaCharacter[] - // approved_by User? @relation(fields: [approver_id], references: [id]) - // approved_at Boolean @default(false) - // created_by User? @relation(fields: [created_by_id], references: [id]) - // created_at DateTime @default(now()) @db.Timestamptz() - // updated_by User? @relation(fields: [updated_by_id], references: [id]) - // deleted_at DateTime? @db.Timestamptz() - + approved_by User? @relation(fields: [approver_id], references: [id], name: "MediaApprover") + approved_at DateTime? + created_by User? @relation(fields: [created_by_id], references: [id], name: "MediaCreator") + created_at DateTime @default(now()) @db.Timestamptz() + updated_by User? @relation(fields: [updated_by_id], references: [id], name: "MediaUpdater") + updated_at DateTime @updatedAt @db.Timestamptz() + deleted_by User? @relation(fields: [deleted_by_id], references: [id], name: "MediaDeleter") + deleted_at DateTime? @db.Timestamptz() type_id String @db.Uuid source_id String @db.Uuid @@ -279,6 +284,10 @@ model Media { age_rating_id String? @db.Uuid country_id String? @db.Uuid related_media MediaRelation[] @relation("MediaRelationRelatedMedia") + approver_id String? @db.Uuid + created_by_id String? @db.Uuid + updated_by_id String? @db.Uuid + deleted_by_id String? @db.Uuid @@map("medias") } From 68fd5843c7902d3eecff4959283f48415835d847 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Fri, 22 May 2026 07:46:31 +0700 Subject: [PATCH 31/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20align=20med?= =?UTF-8?q?ia=20schema=20with=20JSON=20diagram=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/diagram.json | 1746 ++++++++++++++++++++++-------------------- prisma/schema.prisma | 3 - 2 files changed, 904 insertions(+), 845 deletions(-) diff --git a/prisma/diagram.json b/prisma/diagram.json index 6c98583..b6c7bf1 100644 --- a/prisma/diagram.json +++ b/prisma/diagram.json @@ -2,7 +2,7 @@ "id": "0", "name": "Main Diagram", "createdAt": "2026-05-19T16:28:02.086Z", - "updatedAt": "2026-05-21T16:04:03.060Z", + "updatedAt": "2026-05-22T00:43:03.985Z", "databaseType": "postgresql", "tables": [ { @@ -60,8 +60,8 @@ "id": "5", "name": "characters", "schema": "public", - "x": -1029.4414354197875, - "y": 693.766860683375, + "x": -1033.0409991807485, + "y": 748.9601716847773, "fields": [ { "id": "6", @@ -420,18 +420,30 @@ "fields": [ { "id": "34", + "name": "id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": true, + "nullable": false, + "primaryKey": true, + "createdAt": 1779379905921 + }, + { + "id": "35", "name": "media", "type": { "id": "uuid", "name": "uuid" }, - "primaryKey": true, + "primaryKey": false, "unique": true, "nullable": false, "createdAt": 1777282589093 }, { - "id": "35", + "id": "36", "name": "character", "type": { "id": "uuid", @@ -443,7 +455,7 @@ "createdAt": 1777282589093 }, { - "id": "36", + "id": "37", "name": "role", "type": { "id": "enum", @@ -456,7 +468,7 @@ "comments": "main, supporting" }, { - "id": "37", + "id": "38", "name": "voice_actor", "type": { "id": "uuid", @@ -470,12 +482,12 @@ ], "indexes": [ { - "id": "38", + "id": "39", "name": "", "unique": true, "fieldIds": [ "34", - "35" + "36" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -488,14 +500,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "39", + "id": "40", "name": "media_submissions", "schema": "public", "x": -677.2819917810897, "y": -656.6674640748546, "fields": [ { - "id": "40", + "id": "41", "name": "id", "type": { "id": "uuid", @@ -507,7 +519,7 @@ "createdAt": 1777362610195 }, { - "id": "41", + "id": "42", "name": "media_id", "type": { "id": "uuid", @@ -519,7 +531,7 @@ "createdAt": 1777362624424 }, { - "id": "42", + "id": "43", "name": "created_by", "type": { "id": "uuid", @@ -532,7 +544,7 @@ "comments": "" }, { - "id": "43", + "id": "44", "name": "status", "type": { "id": "status_submission", @@ -545,7 +557,7 @@ "comments": "" }, { - "id": "44", + "id": "45", "name": "reviewed_by", "type": { "id": "uuid", @@ -557,7 +569,7 @@ "createdAt": 1777362758238 }, { - "id": "45", + "id": "46", "name": "reviewed_at", "type": { "id": "timestamp", @@ -569,7 +581,7 @@ "createdAt": 1777363627973 }, { - "id": "46", + "id": "47", "name": "reason", "type": { "id": "text", @@ -581,7 +593,7 @@ "createdAt": 1777363674757 }, { - "id": "47", + "id": "48", "name": "created_at", "type": { "id": "timestamp", @@ -596,11 +608,11 @@ ], "indexes": [ { - "id": "48", + "id": "49", "name": "", "unique": true, "fieldIds": [ - "40" + "41" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -613,14 +625,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "49", + "id": "50", "name": "home_media_banner", "schema": "public", "x": -1034.714934672103, "y": -969.0938770634809, "fields": [ { - "id": "50", + "id": "51", "name": "id", "type": { "id": "uuid", @@ -632,7 +644,7 @@ "createdAt": 1778771594518 }, { - "id": "51", + "id": "52", "name": "media_id", "type": { "id": "uuid", @@ -644,7 +656,7 @@ "createdAt": 1778771625245 }, { - "id": "52", + "id": "53", "name": "created_by", "type": { "id": "uuid", @@ -656,7 +668,7 @@ "createdAt": 1778771632111 }, { - "id": "53", + "id": "54", "name": "priority", "type": { "id": "smallint", @@ -668,7 +680,7 @@ "createdAt": 1778771638786 }, { - "id": "54", + "id": "55", "name": "start_show", "type": { "id": "timestamp", @@ -680,7 +692,7 @@ "createdAt": 1778771679920 }, { - "id": "55", + "id": "56", "name": "end_show", "type": { "id": "timestamp", @@ -692,7 +704,7 @@ "createdAt": 1778771687135 }, { - "id": "56", + "id": "57", "name": "created_at", "type": { "id": "timestamp", @@ -706,11 +718,11 @@ ], "indexes": [ { - "id": "57", + "id": "58", "name": "", "unique": true, "fieldIds": [ - "50" + "51" ], "createdAt": 1778771594518, "isPrimaryKey": true @@ -723,14 +735,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "58", + "id": "59", "name": "media_external_links", "schema": "public", "x": 194.5066892978357, "y": -264.72537027522213, "fields": [ { - "id": "59", + "id": "60", "name": "id", "type": { "id": "uuid", @@ -742,7 +754,7 @@ "createdAt": 1777282589093 }, { - "id": "60", + "id": "61", "name": "media", "type": { "id": "uuid", @@ -754,7 +766,7 @@ "createdAt": 1777282589093 }, { - "id": "61", + "id": "62", "name": "site_name", "type": { "id": "varchar", @@ -767,7 +779,7 @@ "characterMaximumLength": "64" }, { - "id": "62", + "id": "63", "name": "url", "type": { "id": "varchar", @@ -782,11 +794,11 @@ ], "indexes": [ { - "id": "63", + "id": "64", "name": "", "unique": true, "fieldIds": [ - "59" + "60" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -799,14 +811,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "64", + "id": "65", "name": "user_addresses", "schema": "public", "x": 655.2842034425264, "y": -1010.0698801871714, "fields": [ { - "id": "65", + "id": "66", "name": "user_id", "type": { "id": "uuid", @@ -818,7 +830,7 @@ "createdAt": 1778816506150 }, { - "id": "66", + "id": "67", "name": "street_address", "type": { "id": "varchar", @@ -831,7 +843,7 @@ "characterMaximumLength": "255" }, { - "id": "67", + "id": "68", "name": "district", "type": { "id": "varchar", @@ -844,7 +856,7 @@ "characterMaximumLength": "100" }, { - "id": "68", + "id": "69", "name": "city", "type": { "id": "varchar", @@ -857,7 +869,7 @@ "characterMaximumLength": "100" }, { - "id": "69", + "id": "70", "name": "province", "type": { "id": "varchar", @@ -870,7 +882,7 @@ "characterMaximumLength": "100" }, { - "id": "70", + "id": "71", "name": "postal_code", "type": { "id": "varchar", @@ -883,7 +895,7 @@ "characterMaximumLength": "20" }, { - "id": "71", + "id": "72", "name": "coordinate", "type": { "id": "varchar", @@ -896,7 +908,7 @@ "characterMaximumLength": "50" }, { - "id": "72", + "id": "73", "name": "updated_at", "type": { "id": "timestamp", @@ -910,11 +922,11 @@ ], "indexes": [ { - "id": "73", + "id": "74", "name": "", "unique": true, "fieldIds": [ - "65" + "66" ], "createdAt": 1778816506150, "isPrimaryKey": true @@ -927,14 +939,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "74", + "id": "75", "name": "media_themes", "schema": "public", "x": -681.5109900103016, "y": 752.8680228454149, "fields": [ { - "id": "75", + "id": "76", "name": "media_id", "type": { "id": "uuid", @@ -946,7 +958,7 @@ "createdAt": 1777295294621 }, { - "id": "76", + "id": "77", "name": "genre_id", "type": { "id": "uuid", @@ -960,12 +972,12 @@ ], "indexes": [ { - "id": "77", + "id": "78", "name": "", "unique": true, "fieldIds": [ - "75", - "76" + "76", + "77" ], "createdAt": 1777295294621, "isPrimaryKey": true @@ -979,14 +991,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "78", + "id": "79", "name": "medias", "schema": "public", "x": -338.2943640690703, "y": -279.84862879126985, "fields": [ { - "id": "79", + "id": "80", "name": "id", "type": { "id": "uuid", @@ -998,7 +1010,7 @@ "createdAt": 1777282589092 }, { - "id": "80", + "id": "81", "name": "mal_id", "type": { "id": "int", @@ -1010,7 +1022,7 @@ "createdAt": 1777282589092 }, { - "id": "81", + "id": "82", "name": "title", "type": { "id": "varchar", @@ -1023,7 +1035,7 @@ "characterMaximumLength": "255" }, { - "id": "82", + "id": "83", "name": "title_secondary", "type": { "id": "varchar", @@ -1036,7 +1048,7 @@ "characterMaximumLength": "255" }, { - "id": "83", + "id": "84", "name": "title_original", "type": { "id": "varchar", @@ -1049,7 +1061,7 @@ "characterMaximumLength": "255" }, { - "id": "84", + "id": "85", "name": "title_synonyms", "type": { "id": "varchar", @@ -1064,7 +1076,7 @@ "comments": "" }, { - "id": "85", + "id": "86", "name": "trailers", "type": { "id": "uuid", @@ -1076,7 +1088,7 @@ "createdAt": 1777282589092 }, { - "id": "86", + "id": "87", "name": "synopsis", "type": { "id": "text", @@ -1088,7 +1100,7 @@ "createdAt": 1777282589092 }, { - "id": "87", + "id": "88", "name": "small_image_url", "type": { "id": "varchar", @@ -1101,7 +1113,7 @@ "characterMaximumLength": "255" }, { - "id": "88", + "id": "89", "name": "medium_image_url", "type": { "id": "varchar", @@ -1114,7 +1126,7 @@ "characterMaximumLength": "255" }, { - "id": "89", + "id": "90", "name": "large_image_url", "type": { "id": "varchar", @@ -1127,7 +1139,7 @@ "characterMaximumLength": "255" }, { - "id": "90", + "id": "91", "name": "type", "type": { "id": "uuid", @@ -1139,7 +1151,7 @@ "createdAt": 1777282589092 }, { - "id": "91", + "id": "92", "name": "source", "type": { "id": "uuid", @@ -1151,7 +1163,7 @@ "createdAt": 1777282589092 }, { - "id": "92", + "id": "93", "name": "status", "type": { "id": "uuid", @@ -1163,7 +1175,7 @@ "createdAt": 1777282589092 }, { - "id": "93", + "id": "94", "name": "airing", "type": { "id": "boolean", @@ -1176,7 +1188,7 @@ "default": "false" }, { - "id": "94", + "id": "95", "name": "start_airing", "type": { "id": "date", @@ -1188,7 +1200,7 @@ "createdAt": 1777282589092 }, { - "id": "95", + "id": "96", "name": "end_airing", "type": { "id": "date", @@ -1200,7 +1212,7 @@ "createdAt": 1777282589092 }, { - "id": "96", + "id": "97", "name": "age_rating", "type": { "id": "uuid", @@ -1212,7 +1224,7 @@ "createdAt": 1777282589092 }, { - "id": "97", + "id": "98", "name": "score_total", "type": { "id": "int", @@ -1225,7 +1237,7 @@ "default": "0" }, { - "id": "98", + "id": "99", "name": "score_count", "type": { "id": "int", @@ -1238,7 +1250,7 @@ "default": "0" }, { - "id": "99", + "id": "100", "name": "background", "type": { "id": "text", @@ -1250,7 +1262,7 @@ "createdAt": 1777282589092 }, { - "id": "100", + "id": "101", "name": "season", "type": { "id": "media_season", @@ -1263,7 +1275,7 @@ "comments": "enum(winter, spring, summer, fall)" }, { - "id": "101", + "id": "102", "name": "year", "type": { "id": "smallint", @@ -1275,7 +1287,7 @@ "createdAt": 1777282589092 }, { - "id": "102", + "id": "103", "name": "country", "type": { "id": "uuid", @@ -1287,7 +1299,7 @@ "createdAt": 1777635858846 }, { - "id": "103", + "id": "104", "name": "broadcast_date", "type": { "id": "varchar", @@ -1300,7 +1312,7 @@ "characterMaximumLength": "64" }, { - "id": "104", + "id": "105", "name": "producers", "type": { "id": "uuid", @@ -1312,7 +1324,7 @@ "createdAt": 1777282589092 }, { - "id": "105", + "id": "106", "name": "licensors", "type": { "id": "uuid", @@ -1324,7 +1336,7 @@ "createdAt": 1777282589092 }, { - "id": "106", + "id": "107", "name": "studios", "type": { "id": "uuid", @@ -1336,7 +1348,7 @@ "createdAt": 1777282589092 }, { - "id": "107", + "id": "108", "name": "genres", "type": { "id": "uuid", @@ -1348,7 +1360,7 @@ "createdAt": 1777282589092 }, { - "id": "108", + "id": "109", "name": "explicit_genres", "type": { "id": "uuid", @@ -1360,7 +1372,7 @@ "createdAt": 1777282589092 }, { - "id": "109", + "id": "110", "name": "themes", "type": { "id": "uuid", @@ -1372,7 +1384,7 @@ "createdAt": 1777282589092 }, { - "id": "110", + "id": "111", "name": "demographics", "type": { "id": "uuid", @@ -1384,7 +1396,7 @@ "createdAt": 1777282589092 }, { - "id": "111", + "id": "112", "name": "relations", "type": { "id": "uuid", @@ -1396,7 +1408,7 @@ "createdAt": 1777282589092 }, { - "id": "112", + "id": "113", "name": "external_links", "type": { "id": "uuid", @@ -1408,7 +1420,7 @@ "createdAt": 1777282589092 }, { - "id": "113", + "id": "114", "name": "characters", "type": { "id": "uuid", @@ -1419,33 +1431,8 @@ "nullable": true, "createdAt": 1777282589092 }, - { - "id": "114", - "name": "approved", - "type": { - "id": "boolean", - "name": "boolean" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589092, - "default": "false" - }, { "id": "115", - "name": "approved_by", - "type": { - "id": "uuid", - "name": "uuid" - }, - "primaryKey": false, - "unique": false, - "nullable": true, - "createdAt": 1777282589092 - }, - { - "id": "116", "name": "created_by", "type": { "id": "uuid", @@ -1457,17 +1444,29 @@ "createdAt": 1777282589092 }, { - "id": "117", - "name": "deleted_at", + "id": "116", + "name": "created_at", "type": { "id": "timestamp", "name": "timestamp" }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589092 }, + { + "id": "117", + "name": "updated_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1779410426323 + }, { "id": "118", "name": "updated_at", @@ -1482,24 +1481,36 @@ }, { "id": "119", - "name": "created_at", + "name": "deleted_by", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": true, + "primaryKey": false, + "createdAt": 1779410375341 + }, + { + "id": "120", + "name": "deleted_at", "type": { "id": "timestamp", "name": "timestamp" }, "primaryKey": false, "unique": false, - "nullable": false, + "nullable": true, "createdAt": 1777282589092 } ], "indexes": [ { - "id": "120", + "id": "121", "name": "", "unique": true, "fieldIds": [ - "79" + "80" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -1514,14 +1525,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "121", + "id": "122", "name": "media_studios", "schema": "public", "x": 194.57420294478976, "y": 402.07246285824783, "fields": [ { - "id": "122", + "id": "123", "name": "media_id", "type": { "id": "uuid", @@ -1533,7 +1544,7 @@ "createdAt": 1777360514222 }, { - "id": "123", + "id": "124", "name": "producer_id", "type": { "id": "uuid", @@ -1547,12 +1558,12 @@ ], "indexes": [ { - "id": "124", + "id": "125", "name": "", "unique": true, "fieldIds": [ - "122", - "123" + "123", + "124" ], "createdAt": 1777360514222, "isPrimaryKey": true @@ -1565,14 +1576,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "125", + "id": "126", "name": "comments", "schema": "public", "x": -1035.4972528190797, "y": -21.831519473281823, "fields": [ { - "id": "126", + "id": "127", "name": "id", "type": { "id": "uuid", @@ -1584,7 +1595,7 @@ "createdAt": 1778772484798 }, { - "id": "127", + "id": "128", "name": "user_id", "type": { "id": "uuid", @@ -1596,7 +1607,7 @@ "createdAt": 1778772536237 }, { - "id": "128", + "id": "129", "name": "episode_id", "type": { "id": "uuid", @@ -1608,7 +1619,7 @@ "createdAt": 1778772542751 }, { - "id": "129", + "id": "130", "name": "content", "type": { "id": "varchar", @@ -1621,7 +1632,7 @@ "characterMaximumLength": "255" }, { - "id": "130", + "id": "131", "name": "created_at", "type": { "id": "timestamp", @@ -1633,7 +1644,7 @@ "createdAt": 1778777149915 }, { - "id": "131", + "id": "132", "name": "updated_at", "type": { "id": "timestamp", @@ -1645,7 +1656,7 @@ "createdAt": 1778777198204 }, { - "id": "132", + "id": "133", "name": "deleted_at", "type": { "id": "timestamp", @@ -1659,11 +1670,11 @@ ], "indexes": [ { - "id": "133", + "id": "134", "name": "", "unique": true, "fieldIds": [ - "126" + "127" ], "createdAt": 1778772484798, "isPrimaryKey": true @@ -1676,14 +1687,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "134", + "id": "135", "name": "staff", "schema": "public", "x": -1434.8828256841582, "y": 424.7769062913411, "fields": [ { - "id": "135", + "id": "136", "name": "id", "type": { "id": "uuid", @@ -1695,7 +1706,7 @@ "createdAt": 1777282589093 }, { - "id": "136", + "id": "137", "name": "name", "type": { "id": "varchar", @@ -1708,7 +1719,7 @@ "characterMaximumLength": "255" }, { - "id": "137", + "id": "138", "name": "image", "type": { "id": "varchar", @@ -1721,7 +1732,7 @@ "characterMaximumLength": "255" }, { - "id": "138", + "id": "139", "name": "mal_id", "type": { "id": "int", @@ -1733,7 +1744,7 @@ "createdAt": 1777282589093 }, { - "id": "139", + "id": "140", "name": "deleted_at", "type": { "id": "timestamp", @@ -1745,7 +1756,7 @@ "createdAt": 1777282589093 }, { - "id": "140", + "id": "141", "name": "updated_at", "type": { "id": "timestamp", @@ -1757,7 +1768,7 @@ "createdAt": 1777282589093 }, { - "id": "141", + "id": "142", "name": "created_at", "type": { "id": "timestamp", @@ -1771,11 +1782,11 @@ ], "indexes": [ { - "id": "142", + "id": "143", "name": "", "unique": true, "fieldIds": [ - "135" + "136" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1788,14 +1799,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "143", + "id": "144", "name": "user_rating_preferences", "schema": "public", "x": -1036.138591583759, "y": -1328.817114710954, "fields": [ { - "id": "144", + "id": "145", "name": "user_id", "type": { "id": "uuid", @@ -1807,7 +1818,7 @@ "createdAt": 1778548671790 }, { - "id": "145", + "id": "146", "name": "rating_id", "type": { "id": "uuid", @@ -1819,7 +1830,7 @@ "createdAt": 1778548699069 }, { - "id": "146", + "id": "147", "name": "state", "type": { "id": "user_preference_state", @@ -1839,14 +1850,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "147", + "id": "148", "name": "media_types", "schema": "public", "x": -678.8247906473255, "y": -28.0163584990978, "fields": [ { - "id": "148", + "id": "149", "name": "id", "type": { "id": "uuid", @@ -1858,7 +1869,7 @@ "createdAt": 1777282589093 }, { - "id": "149", + "id": "150", "name": "name", "type": { "id": "varchar", @@ -1873,11 +1884,11 @@ ], "indexes": [ { - "id": "150", + "id": "151", "name": "", "unique": true, "fieldIds": [ - "148" + "149" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -1890,14 +1901,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "151", + "id": "152", "name": "user_watch_histories", "schema": "public", "x": -335.9290422316319, "y": -1189.7301850410581, "fields": [ { - "id": "152", + "id": "153", "name": "user_id", "type": { "id": "uuid", @@ -1909,7 +1920,7 @@ "createdAt": 1778569467263 }, { - "id": "153", + "id": "154", "name": "episode_id", "type": { "id": "uuid", @@ -1921,7 +1932,7 @@ "createdAt": 1778569477336 }, { - "id": "154", + "id": "155", "name": "updated_at", "type": { "id": "timestamp", @@ -1935,12 +1946,12 @@ ], "indexes": [ { - "id": "155", + "id": "156", "name": "index_1", "unique": true, "fieldIds": [ - "153", - "152" + "154", + "153" ], "createdAt": 1778732177200 } @@ -1953,14 +1964,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "156", + "id": "157", "name": "users", "schema": "public", "x": -333.07222985751173, "y": -1009.2656254027879, "fields": [ { - "id": "157", + "id": "158", "name": "id", "type": { "id": "uuid", @@ -1972,7 +1983,7 @@ "createdAt": 1778390635628 }, { - "id": "158", + "id": "159", "name": "email", "type": { "id": "varchar", @@ -1984,7 +1995,7 @@ "createdAt": 1778391266880 }, { - "id": "159", + "id": "160", "name": "password", "type": { "id": "varchar", @@ -1997,7 +2008,7 @@ "characterMaximumLength": "255" }, { - "id": "160", + "id": "161", "name": "username", "type": { "id": "varchar", @@ -2010,7 +2021,7 @@ "characterMaximumLength": "28" }, { - "id": "161", + "id": "162", "name": "fullname", "type": { "id": "varchar", @@ -2023,7 +2034,7 @@ "characterMaximumLength": "32" }, { - "id": "162", + "id": "163", "name": "avatar", "type": { "id": "varchar", @@ -2036,7 +2047,7 @@ "characterMaximumLength": "255" }, { - "id": "163", + "id": "164", "name": "bio", "type": { "id": "text", @@ -2048,7 +2059,7 @@ "createdAt": 1778390888222 }, { - "id": "164", + "id": "165", "name": "datebirth", "type": { "id": "date", @@ -2060,7 +2071,7 @@ "createdAt": 1778391007890 }, { - "id": "165", + "id": "166", "name": "role", "type": { "id": "user_role", @@ -2072,7 +2083,7 @@ "createdAt": 1778771211530 }, { - "id": "166", + "id": "167", "name": "sex", "type": { "id": "user_sex", @@ -2084,7 +2095,7 @@ "createdAt": 1778391031530 }, { - "id": "167", + "id": "168", "name": "phone_number", "type": { "id": "varchar", @@ -2097,7 +2108,7 @@ "characterMaximumLength": "15" }, { - "id": "168", + "id": "169", "name": "country", "type": { "id": "uuid", @@ -2109,7 +2120,7 @@ "createdAt": 1778401621258 }, { - "id": "169", + "id": "170", "name": "auth_provider", "type": { "id": "varchar", @@ -2122,7 +2133,7 @@ "characterMaximumLength": "64" }, { - "id": "170", + "id": "171", "name": "provider_token", "type": { "id": "varchar", @@ -2135,7 +2146,7 @@ "characterMaximumLength": "255" }, { - "id": "171", + "id": "172", "name": "created_at", "type": { "id": "timestamp", @@ -2148,7 +2159,7 @@ "default": "now()" }, { - "id": "172", + "id": "173", "name": "verified_at", "type": { "id": "timestamp", @@ -2160,7 +2171,7 @@ "createdAt": 1778815129265 }, { - "id": "173", + "id": "174", "name": "updated_at", "type": { "id": "timestamp", @@ -2172,7 +2183,7 @@ "createdAt": 1778517127447 }, { - "id": "174", + "id": "175", "name": "deleted_at", "type": { "id": "timestamp", @@ -2186,30 +2197,30 @@ ], "indexes": [ { - "id": "175", + "id": "176", "name": "", "unique": true, "fieldIds": [ - "157" + "158" ], "createdAt": 1778390635628, "isPrimaryKey": true }, { - "id": "176", + "id": "177", "name": "index_2", "unique": true, "fieldIds": [ - "160" + "161" ], "createdAt": 1778401234711 }, { - "id": "177", + "id": "178", "name": "index_3", "unique": true, "fieldIds": [ - "158" + "159" ], "createdAt": 1778401248519 } @@ -2224,14 +2235,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "178", + "id": "179", "name": "video_submissions", "schema": "public", "x": 1034.3413138628948, "y": 376.2391754093071, "fields": [ { - "id": "179", + "id": "180", "name": "id", "type": { "id": "uuid", @@ -2243,7 +2254,7 @@ "createdAt": 1777362610195 }, { - "id": "180", + "id": "181", "name": "video_id", "type": { "id": "uuid", @@ -2255,7 +2266,7 @@ "createdAt": 1777362624424 }, { - "id": "181", + "id": "182", "name": "created_by", "type": { "id": "uuid", @@ -2268,7 +2279,7 @@ "comments": "" }, { - "id": "182", + "id": "183", "name": "reviewed_by", "type": { "id": "uuid", @@ -2280,7 +2291,7 @@ "createdAt": 1777362758238 }, { - "id": "183", + "id": "184", "name": "status", "type": { "id": "status_submission", @@ -2294,7 +2305,7 @@ "comments": "" }, { - "id": "184", + "id": "185", "name": "reviewed_at", "type": { "id": "timestamp", @@ -2306,7 +2317,7 @@ "createdAt": 1777363627973 }, { - "id": "185", + "id": "186", "name": "reason", "type": { "id": "text", @@ -2318,7 +2329,7 @@ "createdAt": 1777363674757 }, { - "id": "186", + "id": "187", "name": "created_at", "type": { "id": "timestamp", @@ -2333,11 +2344,11 @@ ], "indexes": [ { - "id": "187", + "id": "188", "name": "", "unique": true, "fieldIds": [ - "179" + "180" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -2351,14 +2362,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "188", + "id": "189", "name": "media_age_ratings", "schema": "public", "x": -679.7484316247582, "y": 342.88283833657397, "fields": [ { - "id": "189", + "id": "190", "name": "id", "type": { "id": "uuid", @@ -2370,7 +2381,7 @@ "createdAt": 1777282589093 }, { - "id": "190", + "id": "191", "name": "name", "type": { "id": "varchar", @@ -2383,7 +2394,7 @@ "characterMaximumLength": "64" }, { - "id": "191", + "id": "192", "name": "min_age", "type": { "id": "smallint", @@ -2397,11 +2408,11 @@ ], "indexes": [ { - "id": "192", + "id": "193", "name": "", "unique": true, "fieldIds": [ - "189" + "190" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2414,14 +2425,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "193", + "id": "194", "name": "media_trailers", "schema": "public", "x": -679.0151464808563, "y": -319.10973511128714, "fields": [ { - "id": "194", + "id": "195", "name": "id", "type": { "id": "uuid", @@ -2433,7 +2444,7 @@ "createdAt": 1777282589092 }, { - "id": "195", + "id": "196", "name": "url", "type": { "id": "varchar", @@ -2446,7 +2457,7 @@ "characterMaximumLength": "255" }, { - "id": "196", + "id": "197", "name": "embed_url", "type": { "id": "varchar", @@ -2459,7 +2470,7 @@ "characterMaximumLength": "255" }, { - "id": "197", + "id": "198", "name": "small_image_url", "type": { "id": "varchar", @@ -2472,7 +2483,7 @@ "characterMaximumLength": "255" }, { - "id": "198", + "id": "199", "name": "medium_image_url", "type": { "id": "varchar", @@ -2485,7 +2496,7 @@ "characterMaximumLength": "255" }, { - "id": "199", + "id": "200", "name": "large_image_url", "type": { "id": "varchar", @@ -2498,7 +2509,7 @@ "characterMaximumLength": "255" }, { - "id": "200", + "id": "201", "name": "maximum_image_url", "type": { "id": "varchar", @@ -2513,11 +2524,11 @@ ], "indexes": [ { - "id": "201", + "id": "202", "name": "", "unique": true, "fieldIds": [ - "194" + "195" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2530,14 +2541,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "202", + "id": "203", "name": "collection_members", "schema": "public", "x": -338.05774312036385, "y": -1466.6668409654785, "fields": [ { - "id": "203", + "id": "204", "name": "id", "type": { "id": "uuid", @@ -2549,7 +2560,7 @@ "createdAt": 1778766471107 }, { - "id": "204", + "id": "205", "name": "collection_id", "type": { "id": "uuid", @@ -2561,7 +2572,7 @@ "createdAt": 1778766493931 }, { - "id": "205", + "id": "206", "name": "user_id", "type": { "id": "uuid", @@ -2573,7 +2584,7 @@ "createdAt": 1778766580515 }, { - "id": "206", + "id": "207", "name": "access_level", "type": { "id": "collection_access_level", @@ -2585,7 +2596,7 @@ "createdAt": 1778766832324 }, { - "id": "207", + "id": "208", "name": "invited_by", "type": { "id": "uuid", @@ -2597,7 +2608,7 @@ "createdAt": 1778766846050 }, { - "id": "208", + "id": "209", "name": "joined_at", "type": { "id": "timestamp", @@ -2611,11 +2622,11 @@ ], "indexes": [ { - "id": "209", + "id": "210", "name": "", "unique": true, "fieldIds": [ - "203" + "204" ], "createdAt": 1778766471107, "isPrimaryKey": true @@ -2629,14 +2640,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "210", + "id": "211", "name": "media_collections", "schema": "public", "x": 197.36608531341386, "y": -468.796634019804, "fields": [ { - "id": "211", + "id": "212", "name": "collection_id", "type": { "id": "uuid", @@ -2648,7 +2659,7 @@ "createdAt": 1778733152986 }, { - "id": "212", + "id": "213", "name": "media_id", "type": { "id": "uuid", @@ -2660,7 +2671,7 @@ "createdAt": 1778733195744 }, { - "id": "213", + "id": "214", "name": "added_by", "type": { "id": "uuid", @@ -2672,7 +2683,7 @@ "createdAt": 1778733169676 }, { - "id": "214", + "id": "215", "name": "added_at", "type": { "id": "bigint", @@ -2686,12 +2697,12 @@ ], "indexes": [ { - "id": "215", + "id": "216", "name": "index_1", "unique": true, "fieldIds": [ - "211", - "212" + "212", + "213" ], "createdAt": 1778733335908 } @@ -2703,14 +2714,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "216", + "id": "217", "name": "user_follows", "schema": "public", "x": 200.64283100307347, "y": -1141.2347344393859, "fields": [ { - "id": "217", + "id": "218", "name": "follower_id", "type": { "id": "uuid", @@ -2722,7 +2733,7 @@ "createdAt": 1778401701334 }, { - "id": "218", + "id": "219", "name": "following_id", "type": { "id": "uuid", @@ -2734,7 +2745,7 @@ "createdAt": 1778401722682 }, { - "id": "219", + "id": "220", "name": "followed_at", "type": { "id": "timestamp", @@ -2748,12 +2759,12 @@ ], "indexes": [ { - "id": "220", + "id": "221", "name": "index_1", "unique": true, "fieldIds": [ - "218", - "217" + "219", + "218" ], "createdAt": 1778401874053 } @@ -2773,14 +2784,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "221", + "id": "222", "name": "media_relations", "schema": "public", "x": 194.39903094287618, "y": -61.06914750749248, "fields": [ { - "id": "222", + "id": "223", "name": "id", "type": { "id": "uuid", @@ -2792,7 +2803,7 @@ "createdAt": 1777282589092 }, { - "id": "223", + "id": "224", "name": "target_media", "type": { "id": "uuid", @@ -2804,7 +2815,7 @@ "createdAt": 1777282589092 }, { - "id": "224", + "id": "225", "name": "relation", "type": { "id": "varchar", @@ -2819,12 +2830,12 @@ ], "indexes": [ { - "id": "225", + "id": "226", "name": "", "unique": true, "fieldIds": [ - "222", - "223" + "223", + "224" ], "createdAt": 1777282589092, "isPrimaryKey": true @@ -2837,14 +2848,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "226", + "id": "227", "name": "media_explicit_genres", "schema": "public", "x": -681.3338818918861, "y": 628.1224828360978, "fields": [ { - "id": "227", + "id": "228", "name": "media_id", "type": { "id": "uuid", @@ -2856,7 +2867,7 @@ "createdAt": 1777283776082 }, { - "id": "228", + "id": "229", "name": "genre_id", "type": { "id": "uuid", @@ -2870,12 +2881,12 @@ ], "indexes": [ { - "id": "229", + "id": "230", "name": "", "unique": true, "fieldIds": [ - "227", - "228" + "228", + "229" ], "createdAt": 1777283776082, "isPrimaryKey": true @@ -2889,14 +2900,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "230", + "id": "231", "name": "media_statuses", "schema": "public", "x": -679.4669719043579, "y": 219.3548090436041, "fields": [ { - "id": "231", + "id": "232", "name": "id", "type": { "id": "uuid", @@ -2908,7 +2919,7 @@ "createdAt": 1777282589093 }, { - "id": "232", + "id": "233", "name": "name", "type": { "id": "varchar", @@ -2923,11 +2934,11 @@ ], "indexes": [ { - "id": "233", + "id": "234", "name": "", "unique": true, "fieldIds": [ - "231" + "232" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -2940,14 +2951,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "234", + "id": "235", "name": "collections", "schema": "public", "x": 206.14708211340167, "y": -1637.469796851602, "fields": [ { - "id": "235", + "id": "236", "name": "id", "type": { "id": "uuid", @@ -2959,7 +2970,7 @@ "createdAt": 1778733394970 }, { - "id": "236", + "id": "237", "name": "name", "type": { "id": "varchar", @@ -2973,7 +2984,7 @@ "default": null }, { - "id": "237", + "id": "238", "name": "cover_url", "type": { "id": "varchar", @@ -2986,7 +2997,7 @@ "characterMaximumLength": "255" }, { - "id": "238", + "id": "239", "name": "privacy_level", "type": { "id": "privacy_level", @@ -2998,7 +3009,7 @@ "createdAt": 1778766528943 }, { - "id": "239", + "id": "240", "name": "created_at", "type": { "id": "timestamp", @@ -3010,7 +3021,7 @@ "createdAt": 1778733453130 }, { - "id": "240", + "id": "241", "name": "updated_at", "type": { "id": "timestamp", @@ -3024,11 +3035,11 @@ ], "indexes": [ { - "id": "241", + "id": "242", "name": "", "unique": true, "fieldIds": [ - "235" + "236" ], "createdAt": 1778733394970, "isPrimaryKey": true @@ -3041,14 +3052,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "242", + "id": "243", "name": "video_services", "schema": "public", "x": 78.02893671625938, "y": 1219.199725842667, "fields": [ { - "id": "243", + "id": "244", "name": "id", "type": { "id": "uuid", @@ -3060,7 +3071,7 @@ "createdAt": 1777282589094 }, { - "id": "244", + "id": "245", "name": "name", "type": { "id": "varchar", @@ -3073,7 +3084,7 @@ "characterMaximumLength": "155" }, { - "id": "245", + "id": "246", "name": "resolution", "type": { "id": "smallint", @@ -3085,7 +3096,7 @@ "createdAt": 1777282589094 }, { - "id": "246", + "id": "247", "name": "domain", "type": { "id": "varchar", @@ -3098,7 +3109,7 @@ "characterMaximumLength": "255" }, { - "id": "247", + "id": "248", "name": "image_url", "type": { "id": "varchar", @@ -3111,7 +3122,7 @@ "characterMaximumLength": "255" }, { - "id": "248", + "id": "249", "name": "hex_color", "type": { "id": "varchar", @@ -3124,7 +3135,7 @@ "characterMaximumLength": "10" }, { - "id": "249", + "id": "250", "name": "endpoint_video", "type": { "id": "varchar", @@ -3137,7 +3148,7 @@ "characterMaximumLength": "255" }, { - "id": "250", + "id": "251", "name": "endpoint_short", "type": { "id": "varchar", @@ -3150,7 +3161,7 @@ "characterMaximumLength": "255" }, { - "id": "251", + "id": "252", "name": "endpoint_image", "type": { "id": "varchar", @@ -3163,7 +3174,7 @@ "characterMaximumLength": "255" }, { - "id": "252", + "id": "253", "name": "endpoint_download", "type": { "id": "varchar", @@ -3176,7 +3187,7 @@ "characterMaximumLength": "255" }, { - "id": "253", + "id": "254", "name": "created_by", "type": { "id": "uuid", @@ -3188,7 +3199,7 @@ "createdAt": 1777282589094 }, { - "id": "254", + "id": "255", "name": "deleted_at", "type": { "id": "timestamp", @@ -3200,7 +3211,7 @@ "createdAt": 1777282589094 }, { - "id": "255", + "id": "256", "name": "updated_at", "type": { "id": "timestamp", @@ -3212,7 +3223,7 @@ "createdAt": 1777282589094 }, { - "id": "256", + "id": "257", "name": "created_at", "type": { "id": "timestamp", @@ -3226,22 +3237,22 @@ ], "indexes": [ { - "id": "257", + "id": "258", "name": "", "unique": true, "fieldIds": [ - "243" + "244" ], "createdAt": 1777282589094, "isPrimaryKey": true }, { - "id": "258", + "id": "259", "name": "idx_video_services_name_resolution", "unique": true, "fieldIds": [ - "244", - "245" + "245", + "246" ], "createdAt": 1777282589094 } @@ -3255,14 +3266,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "259", + "id": "260", "name": "media_licencors", "schema": "public", "x": 194.15644602007046, "y": 251.9575649519487, "fields": [ { - "id": "260", + "id": "261", "name": "media_id", "type": { "id": "uuid", @@ -3274,7 +3285,7 @@ "createdAt": 1777360331507 }, { - "id": "261", + "id": "262", "name": "producer_id", "type": { "id": "uuid", @@ -3288,12 +3299,12 @@ ], "indexes": [ { - "id": "262", + "id": "263", "name": "", "unique": true, "fieldIds": [ - "260", - "261" + "261", + "262" ], "createdAt": 1777360331507, "isPrimaryKey": true @@ -3306,14 +3317,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "263", + "id": "264", "name": "user_sessions", "schema": "public", "x": -1381.9054198604924, "y": -1329.3058623634636, "fields": [ { - "id": "264", + "id": "265", "name": "id", "type": { "id": "uuid", @@ -3325,7 +3336,7 @@ "createdAt": 1778814742487 }, { - "id": "265", + "id": "266", "name": "user_id", "type": { "id": "uuid", @@ -3337,7 +3348,7 @@ "createdAt": 1778814761364 }, { - "id": "266", + "id": "267", "name": "device_type", "type": { "id": "device_type", @@ -3349,7 +3360,7 @@ "createdAt": 1778814807191 }, { - "id": "267", + "id": "268", "name": "os_type", "type": { "id": "varchar", @@ -3363,7 +3374,7 @@ "default": null }, { - "id": "268", + "id": "269", "name": "os_version", "type": { "id": "varchar", @@ -3376,7 +3387,7 @@ "characterMaximumLength": "50" }, { - "id": "269", + "id": "270", "name": "browser_name", "type": { "id": "varchar", @@ -3389,7 +3400,7 @@ "characterMaximumLength": "50" }, { - "id": "270", + "id": "271", "name": "browser_version", "type": { "id": "varchar", @@ -3402,7 +3413,7 @@ "characterMaximumLength": "50" }, { - "id": "271", + "id": "272", "name": "ip_login", "type": { "id": "inet", @@ -3414,7 +3425,7 @@ "createdAt": 1778814801981 }, { - "id": "272", + "id": "273", "name": "login_at", "type": { "id": "timestamptz", @@ -3426,7 +3437,7 @@ "createdAt": 1778814816604 }, { - "id": "273", + "id": "274", "name": "logout_at", "type": { "id": "timestamptz", @@ -3440,11 +3451,11 @@ ], "indexes": [ { - "id": "274", + "id": "275", "name": "", "unique": true, "fieldIds": [ - "264" + "265" ], "createdAt": 1778814742487, "isPrimaryKey": true @@ -3458,14 +3469,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "275", + "id": "276", "name": "comment_audit_logs", "schema": "public", "x": -1031.768269593756, "y": -322.47738647771854, "fields": [ { - "id": "276", + "id": "277", "name": "id", "type": { "id": "uuid", @@ -3477,7 +3488,7 @@ "createdAt": 1778772275091 }, { - "id": "277", + "id": "278", "name": "comment_id", "type": { "id": "uuid", @@ -3489,7 +3500,7 @@ "createdAt": 1778772293834 }, { - "id": "278", + "id": "279", "name": "performed_by", "type": { "id": "uuid", @@ -3501,7 +3512,7 @@ "createdAt": 1778772315274 }, { - "id": "279", + "id": "280", "name": "action", "type": { "id": "audit_action", @@ -3513,7 +3524,7 @@ "createdAt": 1778772326253 }, { - "id": "280", + "id": "281", "name": "created_at", "type": { "id": "timestamp", @@ -3527,11 +3538,11 @@ ], "indexes": [ { - "id": "281", + "id": "282", "name": "", "unique": true, "fieldIds": [ - "276" + "277" ], "createdAt": 1778772275091, "isPrimaryKey": true @@ -3544,14 +3555,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "282", + "id": "283", "name": "comment_likes", "schema": "public", "x": -1435.9285690968027, "y": 209.11179406446968, "fields": [ { - "id": "283", + "id": "284", "name": "user_id", "type": { "id": "uuid", @@ -3563,7 +3574,7 @@ "createdAt": 1778808096764 }, { - "id": "284", + "id": "285", "name": "comment_id", "type": { "id": "uuid", @@ -3575,7 +3586,7 @@ "createdAt": 1778808185625 }, { - "id": "285", + "id": "286", "name": "type", "type": { "id": "like_type", @@ -3587,7 +3598,7 @@ "createdAt": 1778808192863 }, { - "id": "286", + "id": "287", "name": "created_at", "type": { "id": "timestamp", @@ -3601,12 +3612,12 @@ ], "indexes": [ { - "id": "287", + "id": "288", "name": "index_1", "unique": true, "fieldIds": [ - "284", - "283" + "285", + "284" ], "createdAt": 1778808299354 } @@ -3618,14 +3629,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "288", + "id": "289", "name": "video_service_submissions", "schema": "public", "x": -371.1847878375677, "y": 1294.289208047582, "fields": [ { - "id": "289", + "id": "290", "name": "id", "type": { "id": "uuid", @@ -3637,7 +3648,7 @@ "createdAt": 1777362610195 }, { - "id": "290", + "id": "291", "name": "video_service_id", "type": { "id": "uuid", @@ -3649,7 +3660,7 @@ "createdAt": 1777362624424 }, { - "id": "291", + "id": "292", "name": "created_by", "type": { "id": "uuid", @@ -3662,7 +3673,7 @@ "comments": "" }, { - "id": "292", + "id": "293", "name": "status", "type": { "id": "status_submission", @@ -3676,7 +3687,7 @@ "comments": "" }, { - "id": "293", + "id": "294", "name": "reviewed_by", "type": { "id": "uuid", @@ -3688,7 +3699,7 @@ "createdAt": 1777362758238 }, { - "id": "294", + "id": "295", "name": "reviewed_at", "type": { "id": "timestamp", @@ -3700,7 +3711,7 @@ "createdAt": 1777363627973 }, { - "id": "295", + "id": "296", "name": "reason", "type": { "id": "text", @@ -3712,7 +3723,7 @@ "createdAt": 1777363674757 }, { - "id": "296", + "id": "297", "name": "created_at", "type": { "id": "timestamp", @@ -3727,11 +3738,11 @@ ], "indexes": [ { - "id": "297", + "id": "298", "name": "", "unique": true, "fieldIds": [ - "289" + "290" ], "createdAt": 1777362610195, "isPrimaryKey": true @@ -3745,14 +3756,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "298", + "id": "299", "name": "provisioned_users", "schema": "public", "x": 204.8991215430349, "y": -1369.625291260797, "fields": [ { - "id": "299", + "id": "300", "name": "provisioned_by", "type": { "id": "uuid", @@ -3764,7 +3775,7 @@ "createdAt": 1778517368377 }, { - "id": "300", + "id": "301", "name": "provisioned_to", "type": { "id": "uuid", @@ -3776,7 +3787,7 @@ "createdAt": 1778517463769 }, { - "id": "301", + "id": "302", "name": "provisioned_at", "type": { "id": "timestamp", @@ -3788,7 +3799,7 @@ "createdAt": 1778517476998 }, { - "id": "302", + "id": "303", "name": "reason", "type": { "id": "varchar", @@ -3809,14 +3820,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "303", + "id": "304", "name": "comment_reports", "schema": "public", "x": -1032.5934799775514, "y": -655.2659179217417, "fields": [ { - "id": "304", + "id": "305", "name": "id", "type": { "id": "uuid", @@ -3828,7 +3839,7 @@ "createdAt": 1778777460892 }, { - "id": "305", + "id": "306", "name": "reporter_id", "type": { "id": "uuid", @@ -3840,7 +3851,7 @@ "createdAt": 1778777475869 }, { - "id": "306", + "id": "307", "name": "comment_id", "type": { "id": "uuid", @@ -3852,7 +3863,7 @@ "createdAt": 1778777483534 }, { - "id": "307", + "id": "308", "name": "title", "type": { "id": "varchar", @@ -3865,7 +3876,7 @@ "characterMaximumLength": "115" }, { - "id": "308", + "id": "309", "name": "status", "type": { "id": "status_submission", @@ -3877,7 +3888,7 @@ "createdAt": 1778777836090 }, { - "id": "309", + "id": "310", "name": "description", "type": { "id": "text", @@ -3889,7 +3900,7 @@ "createdAt": 1778777519944 }, { - "id": "310", + "id": "311", "name": "reported_at", "type": { "id": "timestamp", @@ -3901,7 +3912,7 @@ "createdAt": 1778777537682 }, { - "id": "311", + "id": "312", "name": "closed_at", "type": { "id": "timestamp", @@ -3921,14 +3932,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "312", + "id": "313", "name": "user_preferences", "schema": "public", "x": -675.7144111335546, "y": -1493.2312805453928, "fields": [ { - "id": "313", + "id": "314", "name": "user_id", "type": { "id": "uuid", @@ -3940,7 +3951,7 @@ "createdAt": 1778517633815 }, { - "id": "314", + "id": "315", "name": "character_as_partner", "type": { "id": "uuid", @@ -3952,7 +3963,7 @@ "createdAt": 1778518390023 }, { - "id": "315", + "id": "316", "name": "comment_picture", "type": { "id": "varchar", @@ -3965,7 +3976,7 @@ "characterMaximumLength": "255" }, { - "id": "316", + "id": "317", "name": "enable_watch_history", "type": { "id": "boolean", @@ -3978,7 +3989,7 @@ "default": "true" }, { - "id": "317", + "id": "318", "name": "enable_search_history", "type": { "id": "boolean", @@ -3991,7 +4002,7 @@ "default": "false" }, { - "id": "318", + "id": "319", "name": "is_private_account", "type": { "id": "boolean", @@ -4004,7 +4015,7 @@ "default": "false" }, { - "id": "319", + "id": "320", "name": "can_message_me", "type": { "id": "boolean", @@ -4017,7 +4028,7 @@ "default": "true" }, { - "id": "320", + "id": "321", "name": "publish_birthday", "type": { "id": "boolean", @@ -4030,7 +4041,7 @@ "default": "false" }, { - "id": "321", + "id": "322", "name": "publish_email", "type": { "id": "boolean", @@ -4043,7 +4054,7 @@ "default": "false" }, { - "id": "322", + "id": "323", "name": "publish_phone_number", "type": { "id": "boolean", @@ -4056,7 +4067,7 @@ "default": "false" }, { - "id": "323", + "id": "324", "name": "publish_country", "type": { "id": "boolean", @@ -4069,7 +4080,7 @@ "default": "false" }, { - "id": "324", + "id": "325", "name": "publish_partner", "type": { "id": "boolean", @@ -4082,7 +4093,7 @@ "default": "true" }, { - "id": "325", + "id": "326", "name": "subscribe_to_newsletter", "type": { "id": "boolean", @@ -4095,7 +4106,7 @@ "default": "true" }, { - "id": "326", + "id": "327", "name": "enable_security_alerts", "type": { "id": "boolean", @@ -4110,11 +4121,11 @@ ], "indexes": [ { - "id": "327", + "id": "328", "name": "", "unique": true, "fieldIds": [ - "313" + "314" ], "createdAt": 1778517633815, "isPrimaryKey": true @@ -4128,14 +4139,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "328", + "id": "329", "name": "genres", "schema": "public", "x": -1033.3879847948956, "y": 283.68770102274635, "fields": [ { - "id": "329", + "id": "330", "name": "id", "type": { "id": "uuid", @@ -4147,7 +4158,7 @@ "createdAt": 1777282589094 }, { - "id": "330", + "id": "331", "name": "mal_id", "type": { "id": "smallint", @@ -4159,7 +4170,7 @@ "createdAt": 1777282589094 }, { - "id": "331", + "id": "332", "name": "name", "type": { "id": "varchar", @@ -4173,7 +4184,7 @@ "default": null }, { - "id": "332", + "id": "333", "name": "slug", "type": { "id": "varchar", @@ -4186,7 +4197,7 @@ "characterMaximumLength": "115" }, { - "id": "333", + "id": "334", "name": "thumbnail_url", "type": { "id": "varchar", @@ -4201,11 +4212,11 @@ ], "indexes": [ { - "id": "334", + "id": "335", "name": "", "unique": true, "fieldIds": [ - "329" + "330" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4218,14 +4229,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "335", + "id": "336", "name": "user_oauth_accounts", "schema": "public", "x": 200.04156829298174, "y": -928.8832495975014, "fields": [ { - "id": "336", + "id": "337", "name": "id", "type": { "id": "uuid", @@ -4237,7 +4248,7 @@ "createdAt": 1778516299633 }, { - "id": "337", + "id": "338", "name": "user_id", "type": { "id": "uuid", @@ -4249,7 +4260,7 @@ "createdAt": 1778516366928 }, { - "id": "338", + "id": "339", "name": "provider_name", "type": { "id": "oauth_provider", @@ -4261,7 +4272,7 @@ "createdAt": 1778822365657 }, { - "id": "339", + "id": "340", "name": "provider_sub", "type": { "id": "varchar", @@ -4274,7 +4285,7 @@ "characterMaximumLength": "255" }, { - "id": "340", + "id": "341", "name": "provider_email", "type": { "id": "varchar", @@ -4288,7 +4299,7 @@ "default": null }, { - "id": "341", + "id": "342", "name": "access_token", "type": { "id": "varchar", @@ -4302,7 +4313,7 @@ "default": null }, { - "id": "342", + "id": "343", "name": "refresh_token", "type": { "id": "varchar", @@ -4315,7 +4326,7 @@ "characterMaximumLength": "255" }, { - "id": "343", + "id": "344", "name": "last_login", "type": { "id": "timestamptz", @@ -4327,7 +4338,7 @@ "createdAt": 1778516872367 }, { - "id": "344", + "id": "345", "name": "expires_at", "type": { "id": "timestamptz", @@ -4339,7 +4350,7 @@ "createdAt": 1778822177415 }, { - "id": "345", + "id": "346", "name": "created_at", "type": { "id": "timestamptz", @@ -4351,7 +4362,7 @@ "createdAt": 1778822183677 }, { - "id": "346", + "id": "347", "name": "updated_at", "type": { "id": "timestamptz", @@ -4365,22 +4376,22 @@ ], "indexes": [ { - "id": "347", + "id": "348", "name": "", "unique": true, "fieldIds": [ - "336" + "337" ], "createdAt": 1778516299633, "isPrimaryKey": true }, { - "id": "348", + "id": "349", "name": "index_2", "unique": true, "fieldIds": [ - "337", - "338" + "338", + "339" ], "createdAt": 1778516903425 } @@ -4393,14 +4404,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "349", + "id": "350", "name": "episodes", "schema": "public", "x": 196.42495741544377, "y": 550.6255135491608, "fields": [ { - "id": "350", + "id": "351", "name": "id", "type": { "id": "uuid", @@ -4412,7 +4423,7 @@ "createdAt": 1777282589093 }, { - "id": "351", + "id": "352", "name": "media_id", "type": { "id": "uuid", @@ -4424,7 +4435,7 @@ "createdAt": 1777282589093 }, { - "id": "352", + "id": "353", "name": "episode", "type": { "id": "smallint", @@ -4436,7 +4447,7 @@ "createdAt": 1777282589093 }, { - "id": "353", + "id": "354", "name": "mal_url", "type": { "id": "varchar", @@ -4449,7 +4460,7 @@ "characterMaximumLength": "255" }, { - "id": "354", + "id": "355", "name": "mal_forum_url", "type": { "id": "varchar", @@ -4462,7 +4473,7 @@ "characterMaximumLength": "255" }, { - "id": "355", + "id": "356", "name": "title", "type": { "id": "varchar", @@ -4475,7 +4486,7 @@ "characterMaximumLength": "155" }, { - "id": "356", + "id": "357", "name": "title_origin", "type": { "id": "varchar", @@ -4488,7 +4499,7 @@ "characterMaximumLength": "155" }, { - "id": "357", + "id": "358", "name": "title_romanji", "type": { "id": "varchar", @@ -4501,7 +4512,7 @@ "characterMaximumLength": "155" }, { - "id": "358", + "id": "359", "name": "aired", "type": { "id": "date", @@ -4513,7 +4524,7 @@ "createdAt": 1777282589093 }, { - "id": "359", + "id": "360", "name": "filler", "type": { "id": "boolean", @@ -4526,7 +4537,7 @@ "default": "false" }, { - "id": "360", + "id": "361", "name": "recap", "type": { "id": "boolean", @@ -4539,7 +4550,7 @@ "default": "false" }, { - "id": "361", + "id": "362", "name": "total_score", "type": { "id": "int", @@ -4551,7 +4562,7 @@ "createdAt": 1777361135322 }, { - "id": "362", + "id": "363", "name": "scored_by", "type": { "id": "int", @@ -4563,7 +4574,7 @@ "createdAt": 1777361233825 }, { - "id": "363", + "id": "364", "name": "videos", "type": { "id": "uuid", @@ -4575,7 +4586,7 @@ "createdAt": 1777282589093 }, { - "id": "364", + "id": "365", "name": "deleted_at", "type": { "id": "timestamp", @@ -4587,7 +4598,7 @@ "createdAt": 1777282589093 }, { - "id": "365", + "id": "366", "name": "updated_at", "type": { "id": "timestamp", @@ -4599,7 +4610,7 @@ "createdAt": 1777282589093 }, { - "id": "366", + "id": "367", "name": "created_at", "type": { "id": "timestamp", @@ -4613,11 +4624,11 @@ ], "indexes": [ { - "id": "367", + "id": "368", "name": "", "unique": true, "fieldIds": [ - "350" + "351" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4631,14 +4642,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "368", + "id": "369", "name": "media_sources", "schema": "public", "x": -680.0105470895069, "y": 97.06852307742538, "fields": [ { - "id": "369", + "id": "370", "name": "id", "type": { "id": "uuid", @@ -4650,7 +4661,7 @@ "createdAt": 1777282589093 }, { - "id": "370", + "id": "371", "name": "name", "type": { "id": "varchar", @@ -4665,11 +4676,11 @@ ], "indexes": [ { - "id": "371", + "id": "372", "name": "", "unique": true, "fieldIds": [ - "369" + "370" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -4682,14 +4693,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "372", + "id": "373", "name": "media_producers", "schema": "public", "x": 194.9363737010458, "y": 104.92238147821836, "fields": [ { - "id": "373", + "id": "374", "name": "media_id", "type": { "id": "uuid", @@ -4701,7 +4712,7 @@ "createdAt": 1777360177611 }, { - "id": "374", + "id": "375", "name": "producer_id", "type": { "id": "uuid", @@ -4715,12 +4726,12 @@ ], "indexes": [ { - "id": "375", + "id": "376", "name": "", "unique": true, "fieldIds": [ - "373", - "374" + "374", + "375" ], "createdAt": 1777360177611, "isPrimaryKey": true @@ -4733,14 +4744,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "376", + "id": "377", "name": "videos", "schema": "public", "x": 613.6042418109826, "y": 563.9662290869784, "fields": [ { - "id": "377", + "id": "378", "name": "id", "type": { "id": "uuid", @@ -4752,7 +4763,7 @@ "createdAt": 1777282589094 }, { - "id": "378", + "id": "379", "name": "service_id", "type": { "id": "uuid", @@ -4764,7 +4775,7 @@ "createdAt": 1777282589094 }, { - "id": "379", + "id": "380", "name": "video_code", "type": { "id": "varchar", @@ -4777,7 +4788,7 @@ "characterMaximumLength": "255" }, { - "id": "380", + "id": "381", "name": "short_code", "type": { "id": "varchar", @@ -4790,7 +4801,7 @@ "characterMaximumLength": "255" }, { - "id": "381", + "id": "382", "name": "thumbnail_code", "type": { "id": "varchar", @@ -4803,7 +4814,7 @@ "characterMaximumLength": "255" }, { - "id": "382", + "id": "383", "name": "download_code", "type": { "id": "varchar", @@ -4816,7 +4827,7 @@ "characterMaximumLength": "255" }, { - "id": "383", + "id": "384", "name": "pending_upload", "type": { "id": "boolean", @@ -4829,7 +4840,7 @@ "default": "true" }, { - "id": "384", + "id": "385", "name": "created_by", "type": { "id": "uuid", @@ -4841,7 +4852,7 @@ "createdAt": 1777282589094 }, { - "id": "385", + "id": "386", "name": "deleted_at", "type": { "id": "timestamp", @@ -4853,7 +4864,7 @@ "createdAt": 1777282589094 }, { - "id": "386", + "id": "387", "name": "updated_at", "type": { "id": "timestamp", @@ -4865,7 +4876,7 @@ "createdAt": 1777282589094 }, { - "id": "387", + "id": "388", "name": "created_at", "type": { "id": "timestamp", @@ -4879,11 +4890,11 @@ ], "indexes": [ { - "id": "388", + "id": "389", "name": "", "unique": true, "fieldIds": [ - "377" + "378" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -4896,14 +4907,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "389", + "id": "390", "name": "producers", "schema": "public", "x": 614.2665328827337, "y": 137.7660218436568, "fields": [ { - "id": "390", + "id": "391", "name": "id", "type": { "id": "uuid", @@ -4915,7 +4926,7 @@ "createdAt": 1777282589093 }, { - "id": "391", + "id": "392", "name": "mal_id", "type": { "id": "int", @@ -4927,7 +4938,7 @@ "createdAt": 1777282589093 }, { - "id": "392", + "id": "393", "name": "type", "type": { "id": "varchar", @@ -4940,7 +4951,7 @@ "characterMaximumLength": "24" }, { - "id": "393", + "id": "394", "name": "name", "type": { "id": "varchar", @@ -4953,7 +4964,7 @@ "characterMaximumLength": "155" }, { - "id": "394", + "id": "395", "name": "url", "type": { "id": "varchar", @@ -4966,7 +4977,7 @@ "characterMaximumLength": "255" }, { - "id": "395", + "id": "396", "name": "created_by", "type": { "id": "uuid", @@ -4978,7 +4989,7 @@ "createdAt": 1777282589094 }, { - "id": "396", + "id": "397", "name": "deleted_at", "type": { "id": "timestamp", @@ -4990,7 +5001,7 @@ "createdAt": 1777282589094 }, { - "id": "397", + "id": "398", "name": "updated_at", "type": { "id": "timestamp", @@ -5002,7 +5013,7 @@ "createdAt": 1777282589094 }, { - "id": "398", + "id": "399", "name": "created_at", "type": { "id": "timestamp", @@ -5016,11 +5027,11 @@ ], "indexes": [ { - "id": "399", + "id": "400", "name": "", "unique": true, "fieldIds": [ - "390" + "391" ], "createdAt": 1777282589094, "isPrimaryKey": true @@ -5033,14 +5044,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "400", + "id": "401", "name": "voice_actors", "schema": "public", "x": -1034.5971892955995, "y": 536.4407371208936, "fields": [ { - "id": "401", + "id": "402", "name": "id", "type": { "id": "uuid", @@ -5052,7 +5063,19 @@ "createdAt": 1777282589093 }, { - "id": "402", + "id": "403", + "name": "media_character_id", + "type": { + "id": "uuid", + "name": "uuid" + }, + "unique": false, + "nullable": false, + "primaryKey": false, + "createdAt": 1779379833155 + }, + { + "id": "404", "name": "language", "type": { "id": "varchar", @@ -5060,12 +5083,12 @@ }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589093, "characterMaximumLength": "115" }, { - "id": "403", + "id": "405", "name": "actor_staff", "type": { "id": "uuid", @@ -5073,17 +5096,17 @@ }, "primaryKey": false, "unique": false, - "nullable": true, + "nullable": false, "createdAt": 1777282589093 } ], "indexes": [ { - "id": "404", + "id": "406", "name": "", "unique": true, "fieldIds": [ - "401" + "402" ], "createdAt": 1777282589093, "isPrimaryKey": true @@ -5096,14 +5119,14 @@ "diagramId": "3taaalng0ut0" }, { - "id": "405", + "id": "407", "name": "user_genre_preferences", "schema": "public", "x": -1033.5708487432953, "y": -1502.401339834144, "fields": [ { - "id": "406", + "id": "408", "name": "user_id", "type": { "id": "uuid", @@ -5115,7 +5138,7 @@ "createdAt": 1778548513047 }, { - "id": "407", + "id": "409", "name": "genre_id", "type": { "id": "uuid", @@ -5127,7 +5150,7 @@ "createdAt": 1778548529915 }, { - "id": "408", + "id": "410", "name": "state", "type": { "id": "user_preference_state", @@ -5141,12 +5164,12 @@ ], "indexes": [ { - "id": "409", + "id": "411", "name": "index_1", "unique": true, "fieldIds": [ - "406", - "407" + "408", + "409" ], "createdAt": 1778548614328 } @@ -5160,265 +5183,265 @@ ], "relationships": [ { - "id": "410", + "id": "412", "name": "collection_members_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "234", + "sourceTableId": "235", "targetSchema": "public", - "targetTableId": "202", - "sourceFieldId": "235", - "targetFieldId": "204", + "targetTableId": "203", + "sourceFieldId": "236", + "targetFieldId": "205", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766565819, "diagramId": "3taaalng0ut0" }, { - "id": "411", + "id": "413", "name": "collection_members_invited_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "202", - "sourceFieldId": "157", - "targetFieldId": "207", + "targetTableId": "203", + "sourceFieldId": "158", + "targetFieldId": "208", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766863110, "diagramId": "3taaalng0ut0" }, { - "id": "412", + "id": "414", "name": "collection_members_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "202", - "sourceFieldId": "157", - "targetFieldId": "205", + "targetTableId": "203", + "sourceFieldId": "158", + "targetFieldId": "206", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778766807732, "diagramId": "3taaalng0ut0" }, { - "id": "413", + "id": "415", "name": "comment_audit_logs_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "125", + "sourceTableId": "126", "targetSchema": "public", - "targetTableId": "275", - "sourceFieldId": "126", - "targetFieldId": "277", + "targetTableId": "276", + "sourceFieldId": "127", + "targetFieldId": "278", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777327740, "diagramId": "3taaalng0ut0" }, { - "id": "414", + "id": "416", "name": "comment_audit_logs_performed_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "275", - "sourceFieldId": "157", - "targetFieldId": "278", + "targetTableId": "276", + "sourceFieldId": "158", + "targetFieldId": "279", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777342519, "diagramId": "3taaalng0ut0" }, { - "id": "415", + "id": "417", "name": "comment_likes_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "125", + "sourceTableId": "126", "targetSchema": "public", - "targetTableId": "282", - "sourceFieldId": "126", - "targetFieldId": "284", + "targetTableId": "283", + "sourceFieldId": "127", + "targetFieldId": "285", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808350916, "diagramId": "3taaalng0ut0" }, { - "id": "416", + "id": "418", "name": "comment_likes_user_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "282", - "sourceFieldId": "79", - "targetFieldId": "283", + "targetTableId": "283", + "sourceFieldId": "80", + "targetFieldId": "284", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778808338630, "diagramId": "3taaalng0ut0" }, { - "id": "417", + "id": "419", "name": "comment_reports_comment_id_fk", "sourceSchema": "public", - "sourceTableId": "125", + "sourceTableId": "126", "targetSchema": "public", - "targetTableId": "303", - "sourceFieldId": "126", - "targetFieldId": "306", + "targetTableId": "304", + "sourceFieldId": "127", + "targetFieldId": "307", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777586444, "diagramId": "3taaalng0ut0" }, { - "id": "418", + "id": "420", "name": "comment_reports_reporter_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "303", - "sourceFieldId": "157", - "targetFieldId": "305", + "targetTableId": "304", + "sourceFieldId": "158", + "targetFieldId": "306", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777570446, "diagramId": "3taaalng0ut0" }, { - "id": "419", + "id": "421", "name": "comments_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "350", "targetSchema": "public", - "targetTableId": "125", - "sourceFieldId": "350", - "targetFieldId": "128", + "targetTableId": "126", + "sourceFieldId": "351", + "targetFieldId": "129", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777292243, "diagramId": "3taaalng0ut0" }, { - "id": "420", + "id": "422", "name": "comments_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "125", - "sourceFieldId": "157", - "targetFieldId": "127", + "targetTableId": "126", + "sourceFieldId": "158", + "targetFieldId": "128", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778777252269, "diagramId": "3taaalng0ut0" }, { - "id": "421", + "id": "423", "name": "episodes_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "350", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "351", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "352", + "targetFieldId": "80", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "422", + "id": "424", "name": "episodes_videos_videos_id", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "350", "targetSchema": "public", - "targetTableId": "376", - "sourceFieldId": "363", - "targetFieldId": "377", + "targetTableId": "377", + "sourceFieldId": "364", + "targetFieldId": "378", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "423", + "id": "425", "name": "genre_selected_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "328", + "sourceTableId": "329", "targetSchema": "public", - "targetTableId": "405", - "sourceFieldId": "329", - "targetFieldId": "407", + "targetTableId": "407", + "sourceFieldId": "330", + "targetFieldId": "409", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548598785, "diagramId": "3taaalng0ut0" }, { - "id": "424", + "id": "426", "name": "genre_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "312", + "sourceTableId": "313", "targetSchema": "public", - "targetTableId": "405", - "sourceFieldId": "313", - "targetFieldId": "406", + "targetTableId": "407", + "sourceFieldId": "314", + "targetFieldId": "408", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548583401, "diagramId": "3taaalng0ut0" }, { - "id": "425", + "id": "427", "name": "genres_id_fk", "sourceSchema": "public", - "sourceTableId": "328", + "sourceTableId": "329", "targetSchema": "public", - "targetTableId": "74", - "sourceFieldId": "329", - "targetFieldId": "76", + "targetTableId": "75", + "sourceFieldId": "330", + "targetFieldId": "77", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295361546, "diagramId": "3taaalng0ut0" }, { - "id": "426", + "id": "428", "name": "home_media_banner_created_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "49", - "sourceFieldId": "157", - "targetFieldId": "52", + "targetTableId": "50", + "sourceFieldId": "158", + "targetFieldId": "53", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771806907, "diagramId": "3taaalng0ut0" }, { - "id": "427", + "id": "429", "name": "home_media_banner_media_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "49", - "sourceFieldId": "79", - "targetFieldId": "51", + "targetTableId": "50", + "sourceFieldId": "80", + "targetFieldId": "52", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778771781222, "diagramId": "3taaalng0ut0" }, { - "id": "428", + "id": "430", "name": "media_characters_characters_characters_id", "sourceSchema": "public", "sourceTableId": "33", "targetSchema": "public", "targetTableId": "5", - "sourceFieldId": "35", + "sourceFieldId": "36", "targetFieldId": "6", "sourceCardinality": "many", "targetCardinality": "one", @@ -5426,55 +5449,55 @@ "diagramId": "3taaalng0ut0" }, { - "id": "429", - "name": "media_characters_voice_actor_voice_actors_id", + "id": "431", + "name": "media_characters_voice_actor_fk", "sourceSchema": "public", "sourceTableId": "33", "targetSchema": "public", - "targetTableId": "400", - "sourceFieldId": "37", - "targetFieldId": "401", + "targetTableId": "401", + "sourceFieldId": "38", + "targetFieldId": "403", "sourceCardinality": "one", "targetCardinality": "many", - "createdAt": 1777282589095, + "createdAt": 1779379852942, "diagramId": "3taaalng0ut0" }, { - "id": "430", + "id": "432", "name": "media_collections_added_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "157", - "targetFieldId": "213", + "targetTableId": "211", + "sourceFieldId": "158", + "targetFieldId": "214", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733368958, "diagramId": "3taaalng0ut0" }, { - "id": "431", + "id": "433", "name": "media_collections_collection_id_fk", "sourceSchema": "public", - "sourceTableId": "234", + "sourceTableId": "235", "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "235", - "targetFieldId": "211", + "targetTableId": "211", + "sourceFieldId": "236", + "targetFieldId": "212", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733702652, "diagramId": "3taaalng0ut0" }, { - "id": "432", + "id": "434", "name": "media_demographics_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "328", + "sourceTableId": "329", "targetSchema": "public", "targetTableId": "1", - "sourceFieldId": "329", + "sourceFieldId": "330", "targetFieldId": "3", "sourceCardinality": "one", "targetCardinality": "many", @@ -5482,69 +5505,69 @@ "diagramId": "3taaalng0ut0" }, { - "id": "433", + "id": "435", "name": "media_explicit_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "328", + "sourceTableId": "329", "targetSchema": "public", - "targetTableId": "226", - "sourceFieldId": "329", - "targetFieldId": "228", + "targetTableId": "227", + "sourceFieldId": "330", + "targetFieldId": "229", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283900006, "diagramId": "3taaalng0ut0" }, { - "id": "434", + "id": "436", "name": "media_explicit_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "226", - "sourceFieldId": "108", - "targetFieldId": "227", + "targetTableId": "227", + "sourceFieldId": "109", + "targetFieldId": "228", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777283887322, "diagramId": "3taaalng0ut0" }, { - "id": "435", + "id": "437", "name": "media_external_links_media_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "58", - "sourceFieldId": "79", - "targetFieldId": "60", + "targetTableId": "59", + "sourceFieldId": "80", + "targetFieldId": "61", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299855251, "diagramId": "3taaalng0ut0" }, { - "id": "436", + "id": "438", "name": "media_external_links_media_id_medias_id", "sourceSchema": "public", - "sourceTableId": "58", + "sourceTableId": "59", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "60", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "61", + "targetFieldId": "80", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "437", + "id": "439", "name": "media_genres_genre_id_fk", "sourceSchema": "public", - "sourceTableId": "328", + "sourceTableId": "329", "targetSchema": "public", "targetTableId": "16", - "sourceFieldId": "329", + "sourceFieldId": "330", "targetFieldId": "18", "sourceCardinality": "one", "targetCardinality": "many", @@ -5552,13 +5575,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "438", + "id": "440", "name": "media_genres_media_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", "targetTableId": "16", - "sourceFieldId": "107", + "sourceFieldId": "108", "targetFieldId": "17", "sourceCardinality": "one", "targetCardinality": "many", @@ -5566,140 +5589,112 @@ "diagramId": "3taaalng0ut0" }, { - "id": "439", + "id": "441", "name": "media_producers_producer_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "390", "targetSchema": "public", - "targetTableId": "372", - "sourceFieldId": "390", - "targetFieldId": "374", + "targetTableId": "373", + "sourceFieldId": "391", + "targetFieldId": "375", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360252829, "diagramId": "3taaalng0ut0" }, { - "id": "440", + "id": "442", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "221", - "sourceFieldId": "79", - "targetFieldId": "223", + "targetTableId": "222", + "sourceFieldId": "80", + "targetFieldId": "224", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777299808576, "diagramId": "3taaalng0ut0" }, { - "id": "441", + "id": "443", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "221", + "sourceTableId": "222", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "223", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "224", + "targetFieldId": "80", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299804996, "diagramId": "3taaalng0ut0" }, { - "id": "442", + "id": "444", "name": "media_relations_target_media_fk", "sourceSchema": "public", - "sourceTableId": "221", + "sourceTableId": "222", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "223", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "224", + "targetFieldId": "80", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777299795695, "diagramId": "3taaalng0ut0" }, { - "id": "443", + "id": "445", "name": "media_relations_target_media_medias_id", "sourceSchema": "public", - "sourceTableId": "221", + "sourceTableId": "222", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "223", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "224", + "targetFieldId": "80", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "444", + "id": "446", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "39", + "sourceTableId": "40", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "41", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "42", + "targetFieldId": "80", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777636061160, "diagramId": "3taaalng0ut0" }, { - "id": "445", + "id": "447", "name": "media_submissions_media_id_fk", "sourceSchema": "public", - "sourceTableId": "39", + "sourceTableId": "40", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "41", - "targetFieldId": "79", + "targetTableId": "79", + "sourceFieldId": "42", + "targetFieldId": "80", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364362256, "diagramId": "3taaalng0ut0" }, { - "id": "446", + "id": "448", "name": "media_types_id_medias_type", "sourceSchema": "public", - "sourceTableId": "147", + "sourceTableId": "148", "targetSchema": "public", - "targetTableId": "78", - "sourceFieldId": "148", - "targetFieldId": "90", - "sourceCardinality": "one", - "targetCardinality": "many", - "createdAt": 1777282589094, - "diagramId": "3taaalng0ut0" - }, - { - "id": "447", - "name": "medias_age_rating_media_age_ratings_id", - "sourceSchema": "public", - "sourceTableId": "78", - "targetSchema": "public", - "targetTableId": "188", - "sourceFieldId": "96", - "targetFieldId": "189", - "sourceCardinality": "many", - "targetCardinality": "one", - "createdAt": 1777282589094, - "diagramId": "3taaalng0ut0" - }, - { - "id": "448", - "name": "medias_characters_media_characters_id", - "sourceSchema": "public", - "sourceTableId": "78", - "targetSchema": "public", - "targetTableId": "33", - "sourceFieldId": "113", - "targetFieldId": "34", + "targetTableId": "79", + "sourceFieldId": "149", + "targetFieldId": "91", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, @@ -5707,26 +5702,54 @@ }, { "id": "449", + "name": "medias_age_rating_media_age_ratings_id", + "sourceSchema": "public", + "sourceTableId": "79", + "targetSchema": "public", + "targetTableId": "189", + "sourceFieldId": "97", + "targetFieldId": "190", + "sourceCardinality": "many", + "targetCardinality": "one", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "450", + "name": "medias_characters_media_characters_id", + "sourceSchema": "public", + "sourceTableId": "79", + "targetSchema": "public", + "targetTableId": "33", + "sourceFieldId": "114", + "targetFieldId": "35", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1777282589094, + "diagramId": "3taaalng0ut0" + }, + { + "id": "451", "name": "medias_country_fk", "sourceSchema": "public", "sourceTableId": "21", "targetSchema": "public", - "targetTableId": "78", + "targetTableId": "79", "sourceFieldId": "22", - "targetFieldId": "102", + "targetFieldId": "103", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402285202, "diagramId": "3taaalng0ut0" }, { - "id": "450", + "id": "452", "name": "medias_demographics_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", "targetTableId": "1", - "sourceFieldId": "110", + "sourceFieldId": "111", "targetFieldId": "2", "sourceCardinality": "one", "targetCardinality": "many", @@ -5734,245 +5757,245 @@ "diagramId": "3taaalng0ut0" }, { - "id": "451", + "id": "453", "name": "medias_external_links_media_external_links_id", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "58", - "sourceFieldId": "112", - "targetFieldId": "59", + "targetTableId": "59", + "sourceFieldId": "113", + "targetFieldId": "60", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "452", + "id": "454", "name": "medias_id_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "210", - "sourceFieldId": "79", - "targetFieldId": "212", + "targetTableId": "211", + "sourceFieldId": "80", + "targetFieldId": "213", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778733359073, "diagramId": "3taaalng0ut0" }, { - "id": "453", + "id": "455", "name": "medias_licensors_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "259", - "sourceFieldId": "105", - "targetFieldId": "260", + "targetTableId": "260", + "sourceFieldId": "106", + "targetFieldId": "261", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360403880, "diagramId": "3taaalng0ut0" }, { - "id": "454", + "id": "456", "name": "medias_producers_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "372", - "sourceFieldId": "104", - "targetFieldId": "373", + "targetTableId": "373", + "sourceFieldId": "105", + "targetFieldId": "374", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360239834, "diagramId": "3taaalng0ut0" }, { - "id": "455", + "id": "457", "name": "medias_relations_media_relations_id", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "221", - "sourceFieldId": "111", - "targetFieldId": "222", + "targetTableId": "222", + "sourceFieldId": "112", + "targetFieldId": "223", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "456", + "id": "458", "name": "medias_source_media_sources_id", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "368", - "sourceFieldId": "91", - "targetFieldId": "369", + "targetTableId": "369", + "sourceFieldId": "92", + "targetFieldId": "370", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "457", + "id": "459", "name": "medias_status_media_statuses_id", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "230", - "sourceFieldId": "92", - "targetFieldId": "231", + "targetTableId": "231", + "sourceFieldId": "93", + "targetFieldId": "232", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "458", + "id": "460", "name": "medias_studios_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "121", - "sourceFieldId": "106", - "targetFieldId": "122", + "targetTableId": "122", + "sourceFieldId": "107", + "targetFieldId": "123", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360574406, "diagramId": "3taaalng0ut0" }, { - "id": "459", + "id": "461", "name": "medias_themes_fk", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "74", - "sourceFieldId": "109", - "targetFieldId": "75", + "targetTableId": "75", + "sourceFieldId": "110", + "targetFieldId": "76", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777295350412, "diagramId": "3taaalng0ut0" }, { - "id": "460", + "id": "462", "name": "medias_trailers_media_trailers_id", "sourceSchema": "public", - "sourceTableId": "78", + "sourceTableId": "79", "targetSchema": "public", - "targetTableId": "193", - "sourceFieldId": "85", - "targetFieldId": "194", + "targetTableId": "194", + "sourceFieldId": "86", + "targetFieldId": "195", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" }, { - "id": "461", + "id": "463", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "390", "targetSchema": "public", - "targetTableId": "121", - "sourceFieldId": "390", - "targetFieldId": "123", + "targetTableId": "122", + "sourceFieldId": "391", + "targetFieldId": "124", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360597827, "diagramId": "3taaalng0ut0" }, { - "id": "462", + "id": "464", "name": "producers_id_fk", "sourceSchema": "public", - "sourceTableId": "389", + "sourceTableId": "390", "targetSchema": "public", - "targetTableId": "259", - "sourceFieldId": "390", - "targetFieldId": "261", + "targetTableId": "260", + "sourceFieldId": "391", + "targetFieldId": "262", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1777360416280, "diagramId": "3taaalng0ut0" }, { - "id": "463", + "id": "465", "name": "provisioned_users_provisioned_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "298", - "sourceFieldId": "157", - "targetFieldId": "299", + "targetTableId": "299", + "sourceFieldId": "158", + "targetFieldId": "300", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517515380, "diagramId": "3taaalng0ut0" }, { - "id": "464", + "id": "466", "name": "provisioned_users_provisioned_to_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "298", - "sourceFieldId": "157", - "targetFieldId": "300", + "targetTableId": "299", + "sourceFieldId": "158", + "targetFieldId": "301", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778517541887, "diagramId": "3taaalng0ut0" }, { - "id": "465", + "id": "467", "name": "rating_selected_rating_id_fk", "sourceSchema": "public", - "sourceTableId": "188", + "sourceTableId": "189", "targetSchema": "public", - "targetTableId": "143", - "sourceFieldId": "189", - "targetFieldId": "145", + "targetTableId": "144", + "sourceFieldId": "190", + "targetFieldId": "146", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548767353, "diagramId": "3taaalng0ut0" }, { - "id": "466", + "id": "468", "name": "rating_selected_user_id_fk", "sourceSchema": "public", - "sourceTableId": "312", + "sourceTableId": "313", "targetSchema": "public", - "targetTableId": "143", - "sourceFieldId": "313", - "targetFieldId": "144", + "targetTableId": "144", + "sourceFieldId": "314", + "targetFieldId": "145", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778548748682, "diagramId": "3taaalng0ut0" }, { - "id": "467", + "id": "469", "name": "user_addresses_user_id_fk", "sourceSchema": "public", - "sourceTableId": "64", + "sourceTableId": "65", "targetSchema": "public", - "targetTableId": "156", - "sourceFieldId": "65", - "targetFieldId": "157", + "targetTableId": "157", + "sourceFieldId": "66", + "targetFieldId": "158", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778816615538, "diagramId": "3taaalng0ut0" }, { - "id": "468", + "id": "470", "name": "user_country_preferences_country_id_fk", "sourceSchema": "public", "sourceTableId": "21", @@ -5986,13 +6009,13 @@ "diagramId": "3taaalng0ut0" }, { - "id": "469", + "id": "471", "name": "user_country_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "312", + "sourceTableId": "313", "targetSchema": "public", "targetTableId": "29", - "sourceFieldId": "313", + "sourceFieldId": "314", "targetFieldId": "30", "sourceCardinality": "one", "targetCardinality": "many", @@ -6000,125 +6023,125 @@ "diagramId": "3taaalng0ut0" }, { - "id": "470", + "id": "472", "name": "user_follows_follower_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "216", - "sourceFieldId": "157", - "targetFieldId": "217", + "targetTableId": "217", + "sourceFieldId": "158", + "targetFieldId": "218", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402073659, "diagramId": "3taaalng0ut0" }, { - "id": "471", + "id": "473", "name": "user_follows_following_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "216", - "sourceFieldId": "157", - "targetFieldId": "218", + "targetTableId": "217", + "sourceFieldId": "158", + "targetFieldId": "219", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778402077836, "diagramId": "3taaalng0ut0" }, { - "id": "472", + "id": "474", "name": "user_oauth_credentials_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "335", - "sourceFieldId": "157", - "targetFieldId": "337", + "targetTableId": "336", + "sourceFieldId": "158", + "targetFieldId": "338", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778822260934, "diagramId": "3taaalng0ut0" }, { - "id": "473", + "id": "475", "name": "user_preferences_character_as_partner_fk", "sourceSchema": "public", "sourceTableId": "5", "targetSchema": "public", - "targetTableId": "312", + "targetTableId": "313", "sourceFieldId": "6", - "targetFieldId": "314", + "targetFieldId": "315", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778518451836, "diagramId": "3taaalng0ut0" }, { - "id": "474", + "id": "476", "name": "user_preferences_user_id_fk", "sourceSchema": "public", - "sourceTableId": "312", + "sourceTableId": "313", "targetSchema": "public", - "targetTableId": "156", - "sourceFieldId": "313", - "targetFieldId": "157", + "targetTableId": "157", + "sourceFieldId": "314", + "targetFieldId": "158", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778517654898, "diagramId": "3taaalng0ut0" }, { - "id": "475", + "id": "477", "name": "user_sessions_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "263", - "sourceFieldId": "157", - "targetFieldId": "265", + "targetTableId": "264", + "sourceFieldId": "158", + "targetFieldId": "266", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778815073839, "diagramId": "3taaalng0ut0" }, { - "id": "476", + "id": "478", "name": "user_watch_histories_episode_id_fk", "sourceSchema": "public", - "sourceTableId": "349", + "sourceTableId": "350", "targetSchema": "public", - "targetTableId": "151", - "sourceFieldId": "350", - "targetFieldId": "153", + "targetTableId": "152", + "sourceFieldId": "351", + "targetFieldId": "154", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732139998, "diagramId": "3taaalng0ut0" }, { - "id": "477", + "id": "479", "name": "user_watch_histories_user_id_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "151", - "sourceFieldId": "157", - "targetFieldId": "152", + "targetTableId": "152", + "sourceFieldId": "158", + "targetFieldId": "153", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778731708617, "diagramId": "3taaalng0ut0" }, { - "id": "478", + "id": "480", "name": "users_country_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", "targetTableId": "21", - "sourceFieldId": "168", + "sourceFieldId": "169", "targetFieldId": "22", "sourceCardinality": "one", "targetCardinality": "one", @@ -6126,95 +6149,134 @@ "diagramId": "3taaalng0ut0" }, { - "id": "479", + "id": "481", "name": "video_service_submissions_video_service_id_fk", "sourceSchema": "public", - "sourceTableId": "288", + "sourceTableId": "289", "targetSchema": "public", - "targetTableId": "242", - "sourceFieldId": "290", - "targetFieldId": "243", + "targetTableId": "243", + "sourceFieldId": "291", + "targetFieldId": "244", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1777364068966, "diagramId": "3taaalng0ut0" }, { - "id": "480", + "id": "482", "name": "video_submissions_created_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "178", - "sourceFieldId": "157", - "targetFieldId": "181", + "targetTableId": "179", + "sourceFieldId": "158", + "targetFieldId": "182", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732667055, "diagramId": "3taaalng0ut0" }, { - "id": "481", + "id": "483", "name": "video_submissions_reviewed_by_fk", "sourceSchema": "public", - "sourceTableId": "156", + "sourceTableId": "157", "targetSchema": "public", - "targetTableId": "178", - "sourceFieldId": "157", - "targetFieldId": "182", + "targetTableId": "179", + "sourceFieldId": "158", + "targetFieldId": "183", "sourceCardinality": "one", "targetCardinality": "many", "createdAt": 1778732708490, "diagramId": "3taaalng0ut0" }, { - "id": "482", + "id": "484", "name": "video_submissions_video_id_fk", "sourceSchema": "public", - "sourceTableId": "178", + "sourceTableId": "179", "targetSchema": "public", - "targetTableId": "376", - "sourceFieldId": "180", - "targetFieldId": "377", + "targetTableId": "377", + "sourceFieldId": "181", + "targetFieldId": "378", "sourceCardinality": "one", "targetCardinality": "one", "createdAt": 1778732648012, "diagramId": "3taaalng0ut0" }, { - "id": "483", + "id": "485", "name": "videos_service_id_video_services_id", "sourceSchema": "public", - "sourceTableId": "376", + "sourceTableId": "377", "targetSchema": "public", - "targetTableId": "242", - "sourceFieldId": "378", - "targetFieldId": "243", + "targetTableId": "243", + "sourceFieldId": "379", + "targetFieldId": "244", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589095, "diagramId": "3taaalng0ut0" }, { - "id": "484", + "id": "486", "name": "voice_actors_actor_staff_staff_id", "sourceSchema": "public", - "sourceTableId": "400", + "sourceTableId": "401", "targetSchema": "public", - "targetTableId": "134", - "sourceFieldId": "403", - "targetFieldId": "135", + "targetTableId": "135", + "sourceFieldId": "405", + "targetFieldId": "136", "sourceCardinality": "many", "targetCardinality": "one", "createdAt": 1777282589094, "diagramId": "3taaalng0ut0" + }, + { + "id": "487", + "name": "medias_deleted_by_fk", + "sourceSchema": "public", + "sourceTableId": "157", + "targetSchema": "public", + "targetTableId": "79", + "sourceFieldId": "158", + "targetFieldId": "119", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779410452620 + }, + { + "id": "488", + "name": "medias_updated_by_fk", + "sourceSchema": "public", + "sourceTableId": "157", + "targetSchema": "public", + "targetTableId": "79", + "sourceFieldId": "158", + "targetFieldId": "117", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779410488128 + }, + { + "id": "489", + "name": "medias_created_by_fk", + "sourceSchema": "public", + "sourceTableId": "157", + "targetSchema": "public", + "targetTableId": "79", + "sourceFieldId": "158", + "targetFieldId": "115", + "sourceCardinality": "one", + "targetCardinality": "many", + "createdAt": 1779410515297 } ], "dependencies": [], "areas": [], "customTypes": [ { - "id": "485", + "id": "490", "name": "audit_action", "kind": "enum", "values": [ @@ -6227,7 +6289,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "486", + "id": "491", "name": "collection_access_level", "kind": "enum", "values": [ @@ -6240,7 +6302,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "487", + "id": "492", "name": "device_type", "kind": "enum", "values": [ @@ -6253,7 +6315,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "488", + "id": "493", "name": "like_type", "kind": "enum", "values": [ @@ -6264,7 +6326,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "489", + "id": "494", "name": "media_season", "kind": "enum", "values": [ @@ -6277,7 +6339,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "490", + "id": "495", "name": "oauth_provider", "kind": "enum", "values": [ @@ -6288,7 +6350,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "491", + "id": "496", "name": "privacy_level", "kind": "enum", "values": [ @@ -6300,7 +6362,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "492", + "id": "497", "name": "status_submission", "kind": "enum", "values": [ @@ -6312,7 +6374,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "493", + "id": "498", "name": "user_preference_state", "kind": "enum", "values": [ @@ -6323,7 +6385,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "494", + "id": "499", "name": "user_role", "kind": "enum", "values": [ @@ -6336,7 +6398,7 @@ "diagramId": "3taaalng0ut0" }, { - "id": "495", + "id": "500", "name": "user_sex", "kind": "enum", "values": [ diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d0aa8dd..c3c3714 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -103,7 +103,6 @@ model User { provisioned_as_admin ProvisionedUser[] @relation("ProvisionedUserAdmin") provisioned_as_user ProvisionedUser[] @relation("ProvisionedUserUser") created_producers Producer[] - approved_media Media[] @relation("MediaApprover") created_media Media[] @relation("MediaCreator") updated_media Media[] @relation("MediaUpdater") deleted_media Media[] @relation("MediaDeleter") @@ -269,8 +268,6 @@ model Media { relations MediaRelation[] @relation("MediaRelationMedia") external_links MediaExternalLink[] characters MediaCharacter[] - approved_by User? @relation(fields: [approver_id], references: [id], name: "MediaApprover") - approved_at DateTime? created_by User? @relation(fields: [created_by_id], references: [id], name: "MediaCreator") created_at DateTime @default(now()) @db.Timestamptz() updated_by User? @relation(fields: [updated_by_id], references: [id], name: "MediaUpdater") From 7244b29f8d12114fcccf47ae499b61a8ae50aede Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 23 May 2026 23:26:24 +0700 Subject: [PATCH 32/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20genre?= =?UTF-8?q?=20and=20rating=20preferences=20to=20user=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c3c3714..fdc4e9d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -182,7 +182,7 @@ model UserPreference { model UserGenrePreference { user UserPreference @relation(fields: [user_id], references: [user_id]) - // genre Genre @relation(fields: [genre_id], references: [id]) + genre Genre @relation(fields: [genre_id], references: [id]) state user_preference_state user_id String @db.Uuid @@ -193,10 +193,10 @@ model UserGenrePreference { model UserRatingPreference { user UserPreference @relation(fields: [user_id], references: [user_id]) - // rating Rating @relation(fields: [rating_id], references: [id]) + rating MediaAgeRating @relation(fields: [rating_id], references: [id]) state user_preference_state - user_id String @db.Uuid + user_id String @db.Uuid rating_id String @db.Uuid @@id([user_id, rating_id]) @@map("user_rating_preferences") @@ -327,8 +327,10 @@ model MediaStatus { model MediaAgeRating { id String @id @db.Uuid @default(uuid(7)) name String @db.VarChar(100) @unique + min_age Int @db.SmallInt media Media[] + user_rating_preferences UserRatingPreference[] @@map("media_age_ratings") } @@ -427,10 +429,11 @@ model Genre { slug String @db.VarChar(115) thumbnail_url String? @db.VarChar(255) - media_genres MediaGenre[] - media_explicit_genres MediaExplicitGenre[] - media_themes MediaTheme[] - media_demographics MediaDemographic[] + media_genres MediaGenre[] + media_explicit_genres MediaExplicitGenre[] + media_themes MediaTheme[] + media_demographics MediaDemographic[] + user_genre_preferences UserGenrePreference[] @@map("genres") } From dfd54090577ccb7968708ebb43896e1eacf38c5c Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 23 May 2026 23:51:58 +0700 Subject: [PATCH 33/42] =?UTF-8?q?=F0=9F=9A=A7=20wip:=20add=20media=20submi?= =?UTF-8?q?ssion=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index fdc4e9d..2ef1fce 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -67,6 +67,12 @@ enum character_role { background } +enum status_submission { + pending + approved + rejected +} + /** @@ -288,6 +294,22 @@ model Media { @@map("medias") } +model MediaSubmission { + id String @id @db.Uuid @default(uuid(7)) + media Media @relation(fields: [media_id], references: [id]) + submitter User @relation(fields: [submitter_id], references: [id], name: "MediaSubmissionSubmitter") + status status_submission @default(pending) + reviewer User? @relation(fields: [reviewer_id], references: [id], name: "MediaSubmissionReviewer") + reviewed_at DateTime? @db.Timestamptz() + reason String? @db.Text + created_at DateTime @default(now()) @db.Timestamptz() + + media_id String @db.Uuid + submitter_id String @db.Uuid + reviewer_id String? @db.Uuid + @@map("media_submissions") +} + model MediaTrailer { media_id String @id @db.Uuid url String? @db.VarChar(255) From 2a5098a89ca1d94eefc8d10e5999d8932990effa Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sat, 23 May 2026 23:58:00 +0700 Subject: [PATCH 34/42] =?UTF-8?q?=F0=9F=90=9B=20fix:=20resolve=20media=20s?= =?UTF-8?q?ubmission=20schema=20and=20relation=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2ef1fce..c99e487 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -109,7 +109,8 @@ model User { provisioned_as_admin ProvisionedUser[] @relation("ProvisionedUserAdmin") provisioned_as_user ProvisionedUser[] @relation("ProvisionedUserUser") created_producers Producer[] - created_media Media[] @relation("MediaCreator") + submitted_media MediaSubmission[] @relation("MediaSubmissionSubmitter") + reviewed_media MediaSubmission[] @relation("MediaSubmissionReviewer") updated_media Media[] @relation("MediaUpdater") deleted_media Media[] @relation("MediaDeleter") @@map("users") @@ -274,7 +275,7 @@ model Media { relations MediaRelation[] @relation("MediaRelationMedia") external_links MediaExternalLink[] characters MediaCharacter[] - created_by User? @relation(fields: [created_by_id], references: [id], name: "MediaCreator") + submissions MediaSubmission? created_at DateTime @default(now()) @db.Timestamptz() updated_by User? @relation(fields: [updated_by_id], references: [id], name: "MediaUpdater") updated_at DateTime @updatedAt @db.Timestamptz() @@ -304,7 +305,7 @@ model MediaSubmission { reason String? @db.Text created_at DateTime @default(now()) @db.Timestamptz() - media_id String @db.Uuid + media_id String @db.Uuid @unique submitter_id String @db.Uuid reviewer_id String? @db.Uuid @@map("media_submissions") From f35e38b1feb1077ff455304f1368368e2b38a500 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 24 May 2026 10:43:34 +0700 Subject: [PATCH 35/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20video?= =?UTF-8?q?=20and=20episode=20schemas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c99e487..8a6e4ba 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -113,6 +113,10 @@ model User { reviewed_media MediaSubmission[] @relation("MediaSubmissionReviewer") updated_media Media[] @relation("MediaUpdater") deleted_media Media[] @relation("MediaDeleter") + created_episodes Episode[] + created_videos Video[] + @@index([email]) + @@index([username]) @@map("users") } @@ -534,6 +538,50 @@ model Staff { @@map("staff") } +model Episode { + id String @id @db.Uuid @default(uuid(7)) + media_id String @db.Uuid + episode Int @db.SmallInt + mal_url String? @db.VarChar(255) + forum_url String? @db.VarChar(255) + title String @db.VarChar(155) + title_origin String? @db.VarChar(155) + title_romanji String? @db.VarChar(155) + aired_at DateTime? @db.Date + filler Boolean + recap Boolean + total_score Int @default(0) + score_count Int @default(0) + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + created_by User @relation(fields: [created_by_id], references: [id]) + + videos Video[] + created_by_id String @db.Uuid + @@index([media_id, episode]) + @@map("episodes") +} + +model Video { + id String @id @db.Uuid @default(uuid(7)) + // service VideoService[] + Episode Episode @relation(fields: [episode_id], references: [id]) + video_code String @db.VarChar(255) + short_code String? @db.VarChar(255) + thumbnail_code String? @db.VarChar(255) + download_code String? @db.VarChar(255) + pending_upload Boolean @default(true) + created_by User @relation(fields: [created_by_id], references: [id]) + created_at DateTime @default(now()) @db.Timestamptz() + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + + episode_id String @db.Uuid + created_by_id String @db.Uuid + @@map("videos") +} + /** From b43210fca6930dbb60d323678e3049d896e42152 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 24 May 2026 10:50:20 +0700 Subject: [PATCH 36/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20video?= =?UTF-8?q?=20submission=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 8a6e4ba..417ef22 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -114,7 +114,8 @@ model User { updated_media Media[] @relation("MediaUpdater") deleted_media Media[] @relation("MediaDeleter") created_episodes Episode[] - created_videos Video[] + submitted_videos VideoSubmission[] @relation("VideoSubmissionSubmitter") + reviewed_videos VideoSubmission[] @relation("VideoSubmissionReviewer") @@index([email]) @@index([username]) @@map("users") @@ -571,17 +572,31 @@ model Video { short_code String? @db.VarChar(255) thumbnail_code String? @db.VarChar(255) download_code String? @db.VarChar(255) - pending_upload Boolean @default(true) - created_by User @relation(fields: [created_by_id], references: [id]) created_at DateTime @default(now()) @db.Timestamptz() deleted_at DateTime? @db.Timestamptz() updated_at DateTime @updatedAt @db.Timestamptz() episode_id String @db.Uuid created_by_id String @db.Uuid + video_submission VideoSubmission? @@map("videos") } +model VideoSubmission { + video_id String @id @db.Uuid + created_by User @relation(fields: [created_by_id], references: [id], name: "VideoSubmissionSubmitter") + reviewer User? @relation(fields: [reviewer_id], references: [id], name: "VideoSubmissionReviewer") + status status_submission @default(pending) + reviewed_at DateTime? @db.Timestamptz() + reason String? @db.Text + created_at DateTime @default(now()) @db.Timestamptz() + + created_by_id String @db.Uuid + reviewer_id String? @db.Uuid + video Video @relation(fields: [video_id], references: [id]) + @@map("video_submissions") +} + /** From 9d6857f08ce23ea750aa180a9d8066ddf749d2db Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 24 May 2026 11:12:05 +0700 Subject: [PATCH 37/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20video?= =?UTF-8?q?=20service=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 417ef22..3f3f705 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -116,6 +116,8 @@ model User { created_episodes Episode[] submitted_videos VideoSubmission[] @relation("VideoSubmissionSubmitter") reviewed_videos VideoSubmission[] @relation("VideoSubmissionReviewer") + submitted_video_services VideoServiceSubmission[] @relation("VideoServiceSubmissionSubmitter") + reviewed_video_services VideoServiceSubmission[] @relation("VideoServiceSubmissionReviewer") @@index([email]) @@index([username]) @@map("users") @@ -597,6 +599,39 @@ model VideoSubmission { @@map("video_submissions") } +model VideoService { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(155) + resolution Int @db.SmallInt + domain String @db.VarChar(255) + image_url String? @db.VarChar(255) + hex_color String? @db.VarChar(10) + endpoint_video String @db.VarChar(255) + endpoint_short String? @db.VarChar(255) + endpoint_image String? @db.VarChar(255) + endpoint_download String? @db.VarChar(255) + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + + @@unique([name, resolution]) + @@map("video_services") +} + +model VideoServiceSubmission { + video_service_id String @id @db.Uuid + created_by User @relation(fields: [created_by_id], references: [id], name: "VideoServiceSubmissionSubmitter") + status status_submission @default(pending) + reviewer User? @relation(fields: [reviewer_id], references: [id], name: "VideoServiceSubmissionReviewer") + reviewed_at DateTime? @db.Timestamptz() + reason String? @db.Text + created_at DateTime @default(now()) @db.Timestamptz() + + created_by_id String @db.Uuid + reviewer_id String? @db.Uuid + @@map("video_service_submissions") +} + /** From 72a33377ebfd421cd763746043da5eca656e6634 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Sun, 24 May 2026 11:21:52 +0700 Subject: [PATCH 38/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20comme?= =?UTF-8?q?nt=20and=20comment=20like=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 66 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 3f3f705..289f8e7 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -73,6 +73,11 @@ enum status_submission { rejected } +enum like_type { + like + dislike +} + /** @@ -118,6 +123,8 @@ model User { reviewed_videos VideoSubmission[] @relation("VideoSubmissionReviewer") submitted_video_services VideoServiceSubmission[] @relation("VideoServiceSubmissionSubmitter") reviewed_video_services VideoServiceSubmission[] @relation("VideoServiceSubmissionReviewer") + comments Comment[] + comment_likes CommentLike[] @@index([email]) @@index([username]) @@map("users") @@ -562,13 +569,14 @@ model Episode { videos Video[] created_by_id String @db.Uuid + comments Comment[] @@index([media_id, episode]) @@map("episodes") } model Video { id String @id @db.Uuid @default(uuid(7)) - // service VideoService[] + service VideoService[] Episode Episode @relation(fields: [episode_id], references: [id]) video_code String @db.VarChar(255) short_code String? @db.VarChar(255) @@ -600,20 +608,22 @@ model VideoSubmission { } model VideoService { - id String @id @db.Uuid @default(uuid(7)) - name String @db.VarChar(155) - resolution Int @db.SmallInt - domain String @db.VarChar(255) - image_url String? @db.VarChar(255) - hex_color String? @db.VarChar(10) - endpoint_video String @db.VarChar(255) - endpoint_short String? @db.VarChar(255) - endpoint_image String? @db.VarChar(255) + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(155) + resolution Int @db.SmallInt + domain String @db.VarChar(255) + image_url String? @db.VarChar(255) + hex_color String? @db.VarChar(10) + endpoint_video String @db.VarChar(255) + endpoint_short String? @db.VarChar(255) + endpoint_image String? @db.VarChar(255) endpoint_download String? @db.VarChar(255) - deleted_at DateTime? @db.Timestamptz() - updated_at DateTime @updatedAt @db.Timestamptz() - created_at DateTime @default(now()) @db.Timestamptz() + deleted_at DateTime? @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + created_at DateTime @default(now()) @db.Timestamptz() + videos Video[] + video_service_submissions VideoServiceSubmission? @@unique([name, resolution]) @@map("video_services") } @@ -627,11 +637,39 @@ model VideoServiceSubmission { reason String? @db.Text created_at DateTime @default(now()) @db.Timestamptz() - created_by_id String @db.Uuid + video_service VideoService @relation(fields: [video_service_id], references: [id]) + created_by_id String @db.Uuid reviewer_id String? @db.Uuid @@map("video_service_submissions") } +model Comment { + id String @id @db.Uuid @default(uuid(7)) + user User @relation(fields: [user_id], references: [id]) + episode Episode @relation(fields: [episode_id], references: [id]) + content String @db.Text + created_at DateTime @default(now()) @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + deleted_at DateTime? @db.Timestamptz() + + user_id String @db.Uuid + episode_id String @db.Uuid + likes CommentLike[] + @@map("comments") +} + +model CommentLike { + user_id String @db.Uuid + comment_id String @db.Uuid + type like_type + created_at DateTime @default(now()) @db.Timestamptz() + + user User @relation(fields: [user_id], references: [id]) + comment Comment @relation(fields: [comment_id], references: [id]) + @@id([user_id, comment_id]) + @@map("comment_likes") +} + /** From 183642805d947e8721b02cdfd3988b1b9d063f15 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 25 May 2026 21:00:00 +0700 Subject: [PATCH 39/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20comme?= =?UTF-8?q?nt=20audit=20logs=20in=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 289f8e7..1587e24 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -78,6 +78,13 @@ enum like_type { dislike } +enum audit_action { + delete + restore + edit + flag +} + /** @@ -125,6 +132,7 @@ model User { reviewed_video_services VideoServiceSubmission[] @relation("VideoServiceSubmissionReviewer") comments Comment[] comment_likes CommentLike[] + comment_audit_logs CommentAuditLog[] @@index([email]) @@index([username]) @@map("users") @@ -655,6 +663,7 @@ model Comment { user_id String @db.Uuid episode_id String @db.Uuid likes CommentLike[] + audit_logs CommentAuditLog[] @@map("comments") } @@ -670,6 +679,18 @@ model CommentLike { @@map("comment_likes") } +model CommentAuditLog { + id String @id @db.Uuid @default(uuid(7)) + comment Comment @relation(fields: [comment_id], references: [id]) + performed_by User @relation(fields: [performed_by_id], references: [id]) + action audit_action + created_at DateTime @default(now()) @db.Timestamptz() + + comment_id String @db.Uuid + performed_by_id String @db.Uuid + @@map("comment_audit_logs") +} + /** From 03acd7be29cbc71932398c12bef1baf875c612c7 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 26 May 2026 20:57:59 +0700 Subject: [PATCH 40/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20comme?= =?UTF-8?q?nt=20report=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 1587e24..94ffe80 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -133,6 +133,7 @@ model User { comments Comment[] comment_likes CommentLike[] comment_audit_logs CommentAuditLog[] + comment_reports CommentReport[] @@index([email]) @@index([username]) @@map("users") @@ -664,6 +665,7 @@ model Comment { episode_id String @db.Uuid likes CommentLike[] audit_logs CommentAuditLog[] + reports CommentReport[] @@map("comments") } @@ -686,11 +688,26 @@ model CommentAuditLog { action audit_action created_at DateTime @default(now()) @db.Timestamptz() - comment_id String @db.Uuid + comment_id String @db.Uuid performed_by_id String @db.Uuid @@map("comment_audit_logs") } +model CommentReport { + id String @id @db.Uuid @default(uuid(7)) + reporter User @relation(fields: [reporter_id], references: [id]) + comment Comment @relation(fields: [comment_id], references: [id]) + title String @db.VarChar(115) + status status_submission + description String? @db.Text + reported_at DateTime @default(now()) @db.Timestamptz() + closed_at DateTime? @db.Timestamptz() + + reporter_id String @db.Uuid + comment_id String @db.Uuid + @@map("comment_reports") +} + /** From 8cb63e0e36488bddbbcba617327a0c87b37a8372 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 26 May 2026 21:21:06 +0700 Subject: [PATCH 41/42] =?UTF-8?q?=F0=9F=97=83=20db:=20create=20collection?= =?UTF-8?q?=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 54 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 94ffe80..37b6bb7 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -85,6 +85,12 @@ enum audit_action { flag } +enum privacy_level { + public + unlisted + private +} + /** @@ -134,6 +140,8 @@ model User { comment_likes CommentLike[] comment_audit_logs CommentAuditLog[] comment_reports CommentReport[] + home_media_banners HomeMediaBanner[] + watch_histories UserWatchHistory[] @@index([email]) @@index([username]) @@map("users") @@ -187,7 +195,7 @@ model UserSession { } model UserPreference { - user_id String @id @db.Uuid + user User @relation(fields: [user_id], references: [id]) char_as_partner Character @relation(fields: [char_as_partner_id], references: [id]) comment_picture String? @db.VarChar(255) enable_watch_history Boolean @default(true) @@ -205,7 +213,7 @@ model UserPreference { rating_preferences UserRatingPreference[] country_preferences UserCountryPreference[] - user User @relation(fields: [user_id], references: [id]) + user_id String @id @db.Uuid char_as_partner_id String @db.Uuid @@map("user_preferences") } @@ -248,12 +256,34 @@ model UserFollow { following User @relation("UserFollowFollowing", fields: [following_id], references: [id]) created_at DateTime @default(now()) @db.Timestamptz() - follower_id String @db.Uuid - following_id String @db.Uuid + follower_id String @db.Uuid + following_id String @db.Uuid @@id([follower_id, following_id]) @@map("user_follows") } +model UserWatchHistory { + user User @relation(fields: [user_id], references: [id]) + episode Episode @relation(fields: [episode_id], references: [id]) + updated_at DateTime @updatedAt @db.Timestamptz() + + user_id String @db.Uuid + episode_id String @db.Uuid + @@id([user_id, episode_id]) + @@map("user_watch_histories") +} + +model Collection { + id String @id @db.Uuid @default(uuid(7)) + name String @db.VarChar(64) + code String? @db.VarChar(12) + cover_url String? @db.VarChar(255) + privacy privacy_level @default(private) + created_at DateTime @default(now()) @db.Timestamptz() + updated_at DateTime @updatedAt @db.Timestamptz() + @@map("collections") +} + /** @@ -315,6 +345,7 @@ model Media { created_by_id String? @db.Uuid updated_by_id String? @db.Uuid deleted_by_id String? @db.Uuid + home_media_banners HomeMediaBanner[] @@map("medias") } @@ -579,6 +610,7 @@ model Episode { videos Video[] created_by_id String @db.Uuid comments Comment[] + watch_histories UserWatchHistory[] @@index([media_id, episode]) @@map("episodes") } @@ -739,4 +771,18 @@ model Country { UserCountryPreference UserCountryPreference[] Media Media[] @@map("countries") +} + +model HomeMediaBanner { + id String @id @db.Uuid @default(uuid(7)) + media Media @relation(fields: [media_id], references: [id]) + created_by User @relation(fields: [created_by_id], references: [id]) + priority Int @db.SmallInt @unique + start_show DateTime @db.Date + end_show DateTime @db.Date + created_at DateTime @default(now()) @db.Timestamptz() + + media_id String @db.Uuid + created_by_id String @db.Uuid + @@map("home_media_banners") } \ No newline at end of file From e07d9cfa871e42db4905eb396ac0990325170ae9 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 26 May 2026 21:32:13 +0700 Subject: [PATCH 42/42] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20colle?= =?UTF-8?q?ction=20schema=20support=20and=20finalize=20schema=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 37b6bb7..0aeca59 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -91,6 +91,13 @@ enum privacy_level { private } +enum collection_access_level { + owner + moderator + contributor + viewer +} + /** @@ -142,6 +149,9 @@ model User { comment_reports CommentReport[] home_media_banners HomeMediaBanner[] watch_histories UserWatchHistory[] + saved_collections CollectionMember[] @relation("CollectionMemberUser") + invited_collections CollectionMember[] @relation("CollectionMemberInviter") + contributed_collections MediaCollection[] @relation("MediaCollectionAdder") @@index([email]) @@index([username]) @@map("users") @@ -281,9 +291,26 @@ model Collection { privacy privacy_level @default(private) created_at DateTime @default(now()) @db.Timestamptz() updated_at DateTime @updatedAt @db.Timestamptz() + + saved_media MediaCollection[] + members CollectionMember[] @@map("collections") } +model CollectionMember { + collection Collection @relation(fields: [collection_id], references: [id]) + user User @relation(fields: [user_id], references: [id], name: "CollectionMemberUser") + access_level collection_access_level + invited_by User? @relation(fields: [invited_by_id], references: [id], name: "CollectionMemberInviter") + invited_at DateTime? @db.Timestamptz() + + collection_id String @db.Uuid + user_id String @db.Uuid + invited_by_id String? @db.Uuid + @@id([collection_id, user_id]) + @@map("collection_members") +} + /** @@ -345,7 +372,8 @@ model Media { created_by_id String? @db.Uuid updated_by_id String? @db.Uuid deleted_by_id String? @db.Uuid - home_media_banners HomeMediaBanner[] + home_media_banners HomeMediaBanner[] + saved_to_collections MediaCollection[] @@map("medias") } @@ -365,6 +393,19 @@ model MediaSubmission { @@map("media_submissions") } +model MediaCollection { + media Media @relation(fields: [media_id], references: [id]) + collection Collection @relation(fields: [collection_id], references: [id]) + added_by User @relation(fields: [added_by_id], references: [id], name: "MediaCollectionAdder") + added_at DateTime @default(now()) @db.Timestamptz() + + media_id String @db.Uuid + collection_id String @db.Uuid + added_by_id String @db.Uuid + @@id([media_id, collection_id]) + @@map("media_collections") +} + model MediaTrailer { media_id String @id @db.Uuid url String? @db.VarChar(255)