Change media search options to sort by media_id to compensate.
This commit is contained in:
Lucas 2023-02-19 11:28:13 +00:00
parent f2ee7e3db8
commit 1ac5d07821
3 changed files with 4 additions and 12 deletions

View File

@ -33,8 +33,7 @@ CREATE TABLE IF NOT EXISTS media(
media_id INTEGER PRIMARY KEY,
content BLOB (10485760) NOT NULL,
filename TEXT (255) NOT NULL,
content_type TEXT (255),
upload_date INTEGER
content_type TEXT (255)
);
CREATE TABLE IF NOT EXISTS tags(

View File

@ -24,7 +24,7 @@ my $TAG_NAME_RE = qr/^[0-9]*[A-Z_a-z][0-9A-Z_a-z]*$/;
my $NUMERIC_ID_RE = qr/^[1-9][0-9]*$/;
my $MEDIA_SEARCH_OPTS = {
order_by => { -desc => "upload_date" },
order_by => { -desc => "media_id" },
rows => 20,
};
my $TAGS_COUNT_VIEW_SEARCH_OPTS = {

View File

@ -47,11 +47,6 @@ __PACKAGE__->table("media");
is_nullable: 1
size: 255
=head2 upload_date
data_type: 'integer'
is_nullable: 1
=cut
__PACKAGE__->add_columns(
@ -63,8 +58,6 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 0, size => 255 },
"content_type",
{ data_type => "text", is_nullable => 1, size => 255 },
"upload_date",
{ data_type => "integer", is_nullable => 1 },
);
=head1 PRIMARY KEY
@ -107,8 +100,8 @@ Composing rels: L</media_tags> -> tag
__PACKAGE__->many_to_many("tags", "media_tags", "tag");
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 16:42:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:161J2QWJ+cTNXlIdiUBPEw
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 09:09:31
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X0A6CSw6yWOYvxhMNRoS0g
# You can replace this text with custom code or comments, and it will be preserved on regeneration