From 8655e5fa04fe8c69f80c63e3204c72fbe65fbcc0 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 5 Mar 2023 17:23:13 +0000 Subject: [PATCH] db: use a binary seaweedfs_fid --- lib/PoorBooru/Schema/Result/Media.pm | 10 +++++----- migrations/1_up.sql | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PoorBooru/Schema/Result/Media.pm b/lib/PoorBooru/Schema/Result/Media.pm index 245ee4d..7259455 100644 --- a/lib/PoorBooru/Schema/Result/Media.pm +++ b/lib/PoorBooru/Schema/Result/Media.pm @@ -31,9 +31,9 @@ __PACKAGE__->table("media"); =head2 seaweedfs_fid - data_type: 'text' + data_type: 'blob' is_nullable: 0 - size: 33 + size: 32 =head2 filename @@ -53,7 +53,7 @@ __PACKAGE__->add_columns( "media_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "seaweedfs_fid", - { data_type => "text", is_nullable => 0, size => 33 }, + { data_type => "blob", is_nullable => 0, size => 32 }, "filename", { data_type => "text", is_nullable => 0, size => 256 }, "content_type", @@ -100,8 +100,8 @@ Composing rels: L -> tag __PACKAGE__->many_to_many("tags", "media_tags", "tag"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-04 20:47:27 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E7eWNfGOqqI1Kub7Vv/WHQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-05 13:14:18 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gY4mMvaQ+cUpA3gtQc9pjg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/migrations/1_up.sql b/migrations/1_up.sql index 308a822..4c09780 100644 --- a/migrations/1_up.sql +++ b/migrations/1_up.sql @@ -1,6 +1,6 @@ CREATE TABLE media( media_id INTEGER PRIMARY KEY, - seaweedfs_fid TEXT (33) NOT NULL, + seaweedfs_fid BLOB (32) NOT NULL, filename TEXT (256) NOT NULL, content_type TEXT (256) );