rating-orama/db/schema.dbml
2023-04-09 06:45:27 +02:00

33 lines
630 B
Plaintext

Table tv_show {
show_id integer [pk]
title varchar [not null]
runtime integer [not null]
popularity integer [not null, default: 0]
created_at timestamp [not null, default: `now()`]
updated_at timestamp [not null, default: `now()`]
indexes {
show_id
title
updated_at
}
}
Table episodes {
episode_id integer [pk]
tv_show_id integer [not null]
season_number integer [not null]
title varchar [not null]
number int [not null]
aired date [not null]
avg_rating decimal [not null]
votes int [not null]
indexes {
avg_rating
}
}
Ref: "tv_show"."show_id" < "episodes"."tv_show_id"