Skip to content
Snippets Groups Projects
Verified Commit fff11b4d authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Update schema for translated images

parent 2e280d8b
No related branches found
No related tags found
No related merge requests found
......@@ -131,6 +131,7 @@ create table if not exists title_images
constraint title_images_pkey
primary key,
kind text not null,
language text not null,
mime text not null,
src text not null,
created_at timestamp with time zone not null,
......
......@@ -197,6 +197,7 @@ impl InstalmentDto {
#[serde(rename_all = "camelCase")]
pub struct ImageDto {
pub kind: String,
pub language: Option<String>,
pub mime: String,
pub src: String,
}
......@@ -205,6 +206,7 @@ impl ImageDto {
pub fn of(src: TitleImage, config: &Config) -> Result<Self, url::ParseError> {
Ok(ImageDto {
kind: src.kind,
language: src.language,
mime: src.mime,
src: absolute_url(config, UrlKind::Static, src.src)?,
})
......
......@@ -86,6 +86,7 @@ pub struct TitleGenre {
pub struct TitleImage {
pub id: uuid::Uuid,
pub kind: String,
pub language: Option<String>,
pub mime: String,
pub src: String,
pub created_at: chrono::DateTime<chrono::Utc>,
......
......@@ -72,6 +72,7 @@ table! {
title_images (id) {
id -> Uuid,
kind -> Text,
language -> Nullable<Text>,
mime -> Text,
src -> Text,
created_at -> Timestamptz,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment