Add image_path column to albums table
This commit is contained in:
parent
60ad643669
commit
cc4aee4ab4
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,
|
||||
/// The album's release date
|
||||
pub release_date: Option<Date>,
|
||||
/// The path to the album's image file
|
||||
pub image_path: Option<String>,
|
||||
}
|
||||
|
||||
impl Album {
|
||||
|
@ -12,6 +12,7 @@ diesel::table! {
|
||||
id -> Int4,
|
||||
title -> Varchar,
|
||||
release_date -> Nullable<Date>,
|
||||
image_path -> Nullable<Varchar>,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user