db: revert deb082f46c
Change media search options to sort by media_id to compensate.
This commit is contained in:
parent
f2ee7e3db8
commit
1ac5d07821
@ -33,8 +33,7 @@ CREATE TABLE IF NOT EXISTS media(
|
|||||||
media_id INTEGER PRIMARY KEY,
|
media_id INTEGER PRIMARY KEY,
|
||||||
content BLOB (10485760) NOT NULL,
|
content BLOB (10485760) NOT NULL,
|
||||||
filename TEXT (255) NOT NULL,
|
filename TEXT (255) NOT NULL,
|
||||||
content_type TEXT (255),
|
content_type TEXT (255)
|
||||||
upload_date INTEGER
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS tags(
|
CREATE TABLE IF NOT EXISTS tags(
|
||||||
|
@ -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 $NUMERIC_ID_RE = qr/^[1-9][0-9]*$/;
|
||||||
|
|
||||||
my $MEDIA_SEARCH_OPTS = {
|
my $MEDIA_SEARCH_OPTS = {
|
||||||
order_by => { -desc => "upload_date" },
|
order_by => { -desc => "media_id" },
|
||||||
rows => 20,
|
rows => 20,
|
||||||
};
|
};
|
||||||
my $TAGS_COUNT_VIEW_SEARCH_OPTS = {
|
my $TAGS_COUNT_VIEW_SEARCH_OPTS = {
|
||||||
|
@ -47,11 +47,6 @@ __PACKAGE__->table("media");
|
|||||||
is_nullable: 1
|
is_nullable: 1
|
||||||
size: 255
|
size: 255
|
||||||
|
|
||||||
=head2 upload_date
|
|
||||||
|
|
||||||
data_type: 'integer'
|
|
||||||
is_nullable: 1
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
__PACKAGE__->add_columns(
|
__PACKAGE__->add_columns(
|
||||||
@ -63,8 +58,6 @@ __PACKAGE__->add_columns(
|
|||||||
{ data_type => "text", is_nullable => 0, size => 255 },
|
{ data_type => "text", is_nullable => 0, size => 255 },
|
||||||
"content_type",
|
"content_type",
|
||||||
{ data_type => "text", is_nullable => 1, size => 255 },
|
{ data_type => "text", is_nullable => 1, size => 255 },
|
||||||
"upload_date",
|
|
||||||
{ data_type => "integer", is_nullable => 1 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
=head1 PRIMARY KEY
|
=head1 PRIMARY KEY
|
||||||
@ -107,8 +100,8 @@ Composing rels: L</media_tags> -> tag
|
|||||||
__PACKAGE__->many_to_many("tags", "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
|
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 09:09:31
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:161J2QWJ+cTNXlIdiUBPEw
|
# 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
|
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||||
|
Loading…
Reference in New Issue
Block a user