From dd912a2fc73fbda57783ecb6b1f401ee7aa4e29f Mon Sep 17 00:00:00 2001 From: trivernis Date: Thu, 14 Oct 2021 21:00:34 +0200 Subject: [PATCH] Move adding of files to the repo helper Signed-off-by: trivernis --- .../migrations/20211014184628_add-mime-to-thumbnail.sql | 3 +++ mediarepo-daemon/mediarepo-database/src/entities/thumbnail.rs | 1 + 2 files changed, 4 insertions(+) create mode 100644 mediarepo-daemon/mediarepo-database/migrations/20211014184628_add-mime-to-thumbnail.sql diff --git a/mediarepo-daemon/mediarepo-database/migrations/20211014184628_add-mime-to-thumbnail.sql b/mediarepo-daemon/mediarepo-database/migrations/20211014184628_add-mime-to-thumbnail.sql new file mode 100644 index 0000000..ce6f32c --- /dev/null +++ b/mediarepo-daemon/mediarepo-database/migrations/20211014184628_add-mime-to-thumbnail.sql @@ -0,0 +1,3 @@ +-- Add migration script here +ALTER TABLE thumbnails + ADD COLUMN mime VARCHAR(128); \ No newline at end of file diff --git a/mediarepo-daemon/mediarepo-database/src/entities/thumbnail.rs b/mediarepo-daemon/mediarepo-database/src/entities/thumbnail.rs index 3be621c..06e3f98 100644 --- a/mediarepo-daemon/mediarepo-database/src/entities/thumbnail.rs +++ b/mediarepo-daemon/mediarepo-database/src/entities/thumbnail.rs @@ -10,6 +10,7 @@ pub struct Model { pub hash_id: i64, pub height: i32, pub width: i32, + pub mime: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]