Merge branch '39-add-images-to-albums' into 'main'
Add image_path column to albums table Closes #39 See merge request libretunes/libretunes!25
This commit is contained in:
commit
26c34e0012
1
migrations/2024-05-16-220659_add_album_images/down.sql
Normal file
1
migrations/2024-05-16-220659_add_album_images/down.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE albums DROP COLUMN image_path;
|
1
migrations/2024-05-16-220659_add_album_images/up.sql
Normal file
1
migrations/2024-05-16-220659_add_album_images/up.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE albums ADD COLUMN image_path VARCHAR;
|
@ -177,6 +177,8 @@ pub struct Album {
|
|||||||
pub title: String,
|
pub title: String,
|
||||||
/// The album's release date
|
/// The album's release date
|
||||||
pub release_date: Option<Date>,
|
pub release_date: Option<Date>,
|
||||||
|
/// The path to the album's image file
|
||||||
|
pub image_path: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Album {
|
impl Album {
|
||||||
|
@ -12,6 +12,7 @@ diesel::table! {
|
|||||||
id -> Int4,
|
id -> Int4,
|
||||||
title -> Varchar,
|
title -> Varchar,
|
||||||
release_date -> Nullable<Date>,
|
release_date -> Nullable<Date>,
|
||||||
|
image_path -> Nullable<Varchar>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user