db: add upload_date field to media table
This commit is contained in:
parent
63368ba06e
commit
deb082f46c
@ -33,7 +33,8 @@ 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(
|
||||||
|
@ -47,6 +47,11 @@ __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(
|
||||||
@ -58,6 +63,8 @@ __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
|
||||||
@ -100,8 +107,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 09:09:31
|
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 16:42:33
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X0A6CSw6yWOYvxhMNRoS0g
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:161J2QWJ+cTNXlIdiUBPEw
|
||||||
|
|
||||||
|
|
||||||
# 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