Skip to content

Commit

Permalink
Update schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Jul 25, 2023
1 parent 2adddcf commit e616fe7
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions src/dbconfig/schemas/postgresql/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ diesel::table! {
username -> Varchar,
device -> Varchar,
podcast -> Varchar,
episode -> Varchar,
episode -> Text,
timestamp -> Timestamp,
guid -> Nullable<Varchar>,
guid -> Nullable<Text>,
action -> Varchar,
started -> Nullable<Int4>,
position -> Nullable<Int4>,
Expand Down Expand Up @@ -65,6 +65,22 @@ diesel::table! {
}
}

diesel::table! {
playlist_items (playlist_id, episode) {
playlist_id -> Text,
episode -> Int4,
position -> Int4,
}
}

diesel::table! {
playlists (id) {
id -> Text,
name -> Text,
user_id -> Int4,
}
}

diesel::table! {
podcast_episodes (id) {
id -> Int4,
Expand All @@ -80,7 +96,7 @@ diesel::table! {
description -> Text,
status -> Bpchar,
download_time -> Nullable<Timestamp>,
guid -> Varchar
guid -> Text,
}
}

Expand Down Expand Up @@ -109,8 +125,8 @@ diesel::table! {
last_build_date -> Nullable<Text>,
author -> Nullable<Text>,
active -> Bool,
original_image_url -> Varchar,
directory_name -> Varchar,
original_image_url -> Text,
directory_name -> Text,
}
}

Expand Down Expand Up @@ -161,6 +177,8 @@ diesel::table! {
}

diesel::joinable!(favorites -> podcasts (podcast_id));
diesel::joinable!(playlist_items -> playlists (playlist_id));
diesel::joinable!(playlist_items -> podcast_episodes (episode));
diesel::joinable!(podcast_episodes -> podcasts (podcast_id));
diesel::joinable!(podcast_history_items -> podcasts (podcast_id));

Expand All @@ -171,6 +189,8 @@ diesel::allow_tables_to_appear_in_same_query!(
filters,
invites,
notifications,
playlist_items,
playlists,
podcast_episodes,
podcast_history_items,
podcasts,
Expand Down

0 comments on commit e616fe7

Please sign in to comment.