]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugMessage.pm
handle affects properly and upgrade schema
[debbugs.git] / Debbugs / DB / Result / BugMessage.pm
1 use utf8;
2 package Debbugs::DB::Result::BugMessage;
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::BugMessage
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<bug_message>
33
34 =cut
35
36 __PACKAGE__->table("bug_message");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'bug_message_id_seq'
46
47 =head2 bug
48
49   data_type: 'integer'
50   is_foreign_key: 1
51   is_nullable: 0
52
53 Bug id (matches bug)
54
55 =head2 message
56
57   data_type: 'integer'
58   is_foreign_key: 1
59   is_nullable: 0
60
61 Message id (matches message)
62
63 =head2 message_number
64
65   data_type: 'integer'
66   is_nullable: 0
67
68 Message number in the bug log
69
70 =head2 bug_log_offset
71
72   data_type: 'integer'
73   is_nullable: 1
74
75 Byte offset in the bug log
76
77 =head2 offset_valid
78
79   data_type: 'timestamp with time zone'
80   is_nullable: 1
81
82 Time offset was valid
83
84 =cut
85
86 __PACKAGE__->add_columns(
87   "id",
88   {
89     data_type         => "integer",
90     is_auto_increment => 1,
91     is_nullable       => 0,
92     sequence          => "bug_message_id_seq",
93   },
94   "bug",
95   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
96   "message",
97   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
98   "message_number",
99   { data_type => "integer", is_nullable => 0 },
100   "bug_log_offset",
101   { data_type => "integer", is_nullable => 1 },
102   "offset_valid",
103   { data_type => "timestamp with time zone", is_nullable => 1 },
104 );
105
106 =head1 PRIMARY KEY
107
108 =over 4
109
110 =item * L</id>
111
112 =back
113
114 =cut
115
116 __PACKAGE__->set_primary_key("id");
117
118 =head1 UNIQUE CONSTRAINTS
119
120 =head2 C<bug_message_bug_message_idx>
121
122 =over 4
123
124 =item * L</bug>
125
126 =item * L</message>
127
128 =back
129
130 =cut
131
132 __PACKAGE__->add_unique_constraint("bug_message_bug_message_idx", ["bug", "message"]);
133
134 =head1 RELATIONS
135
136 =head2 bug
137
138 Type: belongs_to
139
140 Related object: L<Debbugs::DB::Result::Bug>
141
142 =cut
143
144 __PACKAGE__->belongs_to(
145   "bug",
146   "Debbugs::DB::Result::Bug",
147   { id => "bug" },
148   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
149 );
150
151 =head2 message
152
153 Type: belongs_to
154
155 Related object: L<Debbugs::DB::Result::Message>
156
157 =cut
158
159 __PACKAGE__->belongs_to(
160   "message",
161   "Debbugs::DB::Result::Message",
162   { id => "message" },
163   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
164 );
165
166
167 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
168 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gof8IcnKupbpDmbU39kx6A
169
170
171 # You can replace this text with custom code or comments, and it will be preserved on regeneration
172 1;