diff --git a/bin/create-dbix-class-schemas b/bin/create-dbix-class-schemas index 0f4faf1..d04d9b3 100755 --- a/bin/create-dbix-class-schemas +++ b/bin/create-dbix-class-schemas @@ -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( diff --git a/lib/PoorBooru/API/V0.pm b/lib/PoorBooru/API/V0.pm index 5eea422..2113355 100644 --- a/lib/PoorBooru/API/V0.pm +++ b/lib/PoorBooru/API/V0.pm @@ -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 = { diff --git a/lib/PoorBooru/Schema/Result/Media.pm b/lib/PoorBooru/Schema/Result/Media.pm index a355ab1..94c7a02 100644 --- a/lib/PoorBooru/Schema/Result/Media.pm +++ b/lib/PoorBooru/Schema/Result/Media.pm @@ -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 -> 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