]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/MessageRef.pm
update to new schema which includes many_to_many relationships
[debbugs.git] / Debbugs / DB / Result / MessageRef.pm
1 use utf8;
2 package Debbugs::DB::Result::MessageRef;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Debbugs::DB::Result::MessageRef - Message references
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 COMPONENTS LOADED
19
20 =over 4
21
22 =item * L<DBIx::Class::InflateColumn::DateTime>
23
24 =item * L<DBIx::Class::TimeStamp>
25
26 =back
27
28 =cut
29
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
31
32 =head1 TABLE: C<message_refs>
33
34 =cut
35
36 __PACKAGE__->table("message_refs");
37
38 =head1 ACCESSORS
39
40 =head2 message
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 0
45
46 Message id (matches message)
47
48 =head2 refs
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 0
53
54 Reference id (matches message)
55
56 =head2 inferred
57
58   data_type: 'boolean'
59   default_value: false
60   is_nullable: 1
61
62 TRUE if this message reference was reconstructed; primarily of use for messages which lack In-Reply-To: or References: headers
63
64 =head2 primary_ref
65
66   data_type: 'boolean'
67   default_value: false
68   is_nullable: 1
69
70 TRUE if this message->ref came from In-Reply-To: or similar.
71
72 =cut
73
74 __PACKAGE__->add_columns(
75   "message",
76   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77   "refs",
78   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
79   "inferred",
80   { data_type => "boolean", default_value => \"false", is_nullable => 1 },
81   "primary_ref",
82   { data_type => "boolean", default_value => \"false", is_nullable => 1 },
83 );
84
85 =head1 UNIQUE CONSTRAINTS
86
87 =head2 C<message_refs_message_refs_idx>
88
89 =over 4
90
91 =item * L</message>
92
93 =item * L</refs>
94
95 =back
96
97 =cut
98
99 __PACKAGE__->add_unique_constraint("message_refs_message_refs_idx", ["message", "refs"]);
100
101 =head1 RELATIONS
102
103 =head2 message
104
105 Type: belongs_to
106
107 Related object: L<Debbugs::DB::Result::Message>
108
109 =cut
110
111 __PACKAGE__->belongs_to(
112   "message",
113   "Debbugs::DB::Result::Message",
114   { id => "message" },
115   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
116 );
117
118 =head2 ref
119
120 Type: belongs_to
121
122 Related object: L<Debbugs::DB::Result::Message>
123
124 =cut
125
126 __PACKAGE__->belongs_to(
127   "ref",
128   "Debbugs::DB::Result::Message",
129   { id => "refs" },
130   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
131 );
132
133
134 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
135 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0YaAP/sB5N2Xr2rAFNK1lg
136
137
138 # You can replace this text with custom code or comments, and it will be preserved on regeneration
139 1;