Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
DB Support PendingBlog Tags
- Loading branch information
Showing
4 changed files
with
180 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
use utf8; | ||
package BlogDB::DB::Result::PendingBlogTagMap; | ||
|
||
# Created by DBIx::Class::Schema::Loader | ||
# DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
|
||
=head1 NAME | ||
BlogDB::DB::Result::PendingBlogTagMap | ||
=cut | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use base 'DBIx::Class::Core'; | ||
|
||
=head1 COMPONENTS LOADED | ||
=over 4 | ||
=item * L<DBIx::Class::InflateColumn::DateTime> | ||
=item * L<DBIx::Class::InflateColumn::Serializer> | ||
=back | ||
=cut | ||
|
||
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer"); | ||
|
||
=head1 TABLE: C<pending_blog_tag_map> | ||
=cut | ||
|
||
__PACKAGE__->table("pending_blog_tag_map"); | ||
|
||
=head1 ACCESSORS | ||
=head2 id | ||
data_type: 'integer' | ||
is_auto_increment: 1 | ||
is_nullable: 0 | ||
sequence: 'pending_blog_tag_map_id_seq' | ||
=head2 blog_id | ||
data_type: 'integer' | ||
is_foreign_key: 1 | ||
is_nullable: 0 | ||
=head2 tag_id | ||
data_type: 'integer' | ||
is_foreign_key: 1 | ||
is_nullable: 0 | ||
=head2 created_at | ||
data_type: 'timestamp with time zone' | ||
default_value: current_timestamp | ||
is_nullable: 0 | ||
=cut | ||
|
||
__PACKAGE__->add_columns( | ||
"id", | ||
{ | ||
data_type => "integer", | ||
is_auto_increment => 1, | ||
is_nullable => 0, | ||
sequence => "pending_blog_tag_map_id_seq", | ||
}, | ||
"blog_id", | ||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, | ||
"tag_id", | ||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, | ||
"created_at", | ||
{ | ||
data_type => "timestamp with time zone", | ||
default_value => \"current_timestamp", | ||
is_nullable => 0, | ||
}, | ||
); | ||
|
||
=head1 PRIMARY KEY | ||
=over 4 | ||
=item * L</id> | ||
=back | ||
=cut | ||
|
||
__PACKAGE__->set_primary_key("id"); | ||
|
||
=head1 RELATIONS | ||
=head2 blog | ||
Type: belongs_to | ||
Related object: L<BlogDB::DB::Result::PendingBlog> | ||
=cut | ||
|
||
__PACKAGE__->belongs_to( | ||
"blog", | ||
"BlogDB::DB::Result::PendingBlog", | ||
{ id => "blog_id" }, | ||
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, | ||
); | ||
|
||
=head2 tag | ||
Type: belongs_to | ||
Related object: L<BlogDB::DB::Result::Tag> | ||
=cut | ||
|
||
__PACKAGE__->belongs_to( | ||
"tag", | ||
"BlogDB::DB::Result::Tag", | ||
{ id => "tag_id" }, | ||
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, | ||
); | ||
|
||
|
||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-21 05:50:00 | ||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+UAP0nhOyxxBAhXrW6c/xg | ||
|
||
|
||
# You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters