2 package Debbugs::DB::Result::MessageCorrespondent;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::MessageCorrespondent - Linkage between correspondent and message
16 use base 'DBIx::Class::Core';
18 =head1 COMPONENTS LOADED
22 =item * L<DBIx::Class::InflateColumn::DateTime>
24 =item * L<DBIx::Class::TimeStamp>
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
32 =head1 TABLE: C<message_correspondent>
36 __PACKAGE__->table("message_correspondent");
46 Message id (matches message)
54 Correspondent (matches correspondent)
56 =head2 correspondent_type
60 extra: {custom_type_name => "message_correspondent_type",list => ["to","from","envfrom","cc","recv"]}
63 Type of correspondent (to, from, envfrom, cc, etc.)
67 __PACKAGE__->add_columns(
69 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
71 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
75 default_value => "to",
77 custom_type_name => "message_correspondent_type",
78 list => ["to", "from", "envfrom", "cc", "recv"],
84 =head1 UNIQUE CONSTRAINTS
86 =head2 C<message_correspondent_message_correspondent_correspondent_t_idx>
92 =item * L</correspondent>
94 =item * L</correspondent_type>
100 __PACKAGE__->add_unique_constraint(
101 "message_correspondent_message_correspondent_correspondent_t_idx",
102 ["message", "correspondent", "correspondent_type"],
111 Related object: L<Debbugs::DB::Result::Correspondent>
115 __PACKAGE__->belongs_to(
117 "Debbugs::DB::Result::Correspondent",
118 { id => "correspondent" },
119 { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
126 Related object: L<Debbugs::DB::Result::Message>
130 __PACKAGE__->belongs_to(
132 "Debbugs::DB::Result::Message",
134 { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
138 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-07 19:03:32
139 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kIhya7skj4ZNM3DkC+gAPw
142 sub sqlt_deploy_hook {
143 my ($self, $sqlt_table) = @_;
144 for my $idx (qw(correspondent message)) {
145 $sqlt_table->add_index(name => 'message_correspondent_idx'.$idx,