Skip to content

Commit

Permalink
refactor(database): restructure database entities
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasberggren committed Apr 13, 2024
1 parent 339552f commit f4bcafe
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 231 deletions.
117 changes: 0 additions & 117 deletions apps/api/prisma/schema.prisma

This file was deleted.

9 changes: 0 additions & 9 deletions apps/api/prisma/subschemas/account.prisma

This file was deleted.

7 changes: 0 additions & 7 deletions apps/api/prisma/subschemas/actor.prisma

This file was deleted.

17 changes: 0 additions & 17 deletions apps/api/prisma/subschemas/base.prisma

This file was deleted.

7 changes: 0 additions & 7 deletions apps/api/prisma/subschemas/language.prisma

This file was deleted.

12 changes: 0 additions & 12 deletions apps/api/prisma/subschemas/movie.prisma

This file was deleted.

8 changes: 0 additions & 8 deletions apps/api/prisma/subschemas/movieTitle.prisma

This file was deleted.

9 changes: 0 additions & 9 deletions apps/api/prisma/subschemas/rating.prisma

This file was deleted.

11 changes: 0 additions & 11 deletions apps/api/prisma/subschemas/streamingAvailability.prisma

This file was deleted.

6 changes: 0 additions & 6 deletions apps/api/prisma/subschemas/streamingService.prisma

This file was deleted.

9 changes: 0 additions & 9 deletions apps/api/prisma/subschemas/subscriptionOffer.prisma

This file was deleted.

8 changes: 0 additions & 8 deletions apps/api/prisma/subschemas/subtitle.prisma

This file was deleted.

5 changes: 0 additions & 5 deletions apps/api/prisma/subschemas/user.prisma

This file was deleted.

6 changes: 0 additions & 6 deletions apps/api/prisma/subschemas/watchlist.prisma

This file was deleted.

File renamed without changes.
28 changes: 28 additions & 0 deletions apps/api/src/database/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Movie {
id Int @id @default(autoincrement())
genre String
director String
duration Int
subtitles String[]
releaseDate DateTime @map("release_date")
movieTitle MovieTitle[]
}

model MovieTitle {
movieTitleId Int @id @default(autoincrement()) @map("movie_title_id")
movieId Int @map("movie_id")
Movie Movie @relation(fields: [movieId], references: [id])
language String
title String
}

0 comments on commit f4bcafe

Please sign in to comment.