]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/Maintainer.pm
d8c04ec8660c94ae5294e383090bee24c3394abd
[debbugs.git] / Debbugs / DB / Result / Maintainer.pm
1 use utf8;
2 package Debbugs::DB::Result::Maintainer;
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::Maintainer - Package maintainer names
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<maintainer>
33
34 =cut
35
36 __PACKAGE__->table("maintainer");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'maintainer_id_seq'
46
47 Package maintainer id
48
49 =head2 name
50
51   data_type: 'text'
52   is_nullable: 0
53
54 Name of package maintainer
55
56 =head2 correspondent
57
58   data_type: 'integer'
59   is_foreign_key: 1
60   is_nullable: 0
61
62 Correspondent ID
63
64 =head2 created
65
66   data_type: 'timestamp with time zone'
67   default_value: current_timestamp
68   is_nullable: 0
69   original: {default_value => \"now()"}
70
71 Time maintainer record created
72
73 =head2 modified
74
75   data_type: 'timestamp with time zone'
76   default_value: current_timestamp
77   is_nullable: 0
78   original: {default_value => \"now()"}
79
80 Time maintainer record modified
81
82 =cut
83
84 __PACKAGE__->add_columns(
85   "id",
86   {
87     data_type         => "integer",
88     is_auto_increment => 1,
89     is_nullable       => 0,
90     sequence          => "maintainer_id_seq",
91   },
92   "name",
93   { data_type => "text", is_nullable => 0 },
94   "correspondent",
95   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
96   "created",
97   {
98     data_type     => "timestamp with time zone",
99     default_value => \"current_timestamp",
100     is_nullable   => 0,
101     original      => { default_value => \"now()" },
102   },
103   "modified",
104   {
105     data_type     => "timestamp with time zone",
106     default_value => \"current_timestamp",
107     is_nullable   => 0,
108     original      => { default_value => \"now()" },
109   },
110 );
111
112 =head1 PRIMARY KEY
113
114 =over 4
115
116 =item * L</id>
117
118 =back
119
120 =cut
121
122 __PACKAGE__->set_primary_key("id");
123
124 =head1 UNIQUE CONSTRAINTS
125
126 =head2 C<maintainer_name_idx>
127
128 =over 4
129
130 =item * L</name>
131
132 =back
133
134 =cut
135
136 __PACKAGE__->add_unique_constraint("maintainer_name_idx", ["name"]);
137
138 =head1 RELATIONS
139
140 =head2 correspondent
141
142 Type: belongs_to
143
144 Related object: L<Debbugs::DB::Result::Correspondent>
145
146 =cut
147
148 __PACKAGE__->belongs_to(
149   "correspondent",
150   "Debbugs::DB::Result::Correspondent",
151   { id => "correspondent" },
152   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
153 );
154
155 =head2 src_vers
156
157 Type: has_many
158
159 Related object: L<Debbugs::DB::Result::SrcVer>
160
161 =cut
162
163 __PACKAGE__->has_many(
164   "src_vers",
165   "Debbugs::DB::Result::SrcVer",
166   { "foreign.maintainer" => "self.id" },
167   { cascade_copy => 0, cascade_delete => 0 },
168 );
169
170
171 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
172 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rkpgeXltH2wiC1Us7FIijw
173
174 sub sqlt_deploy_hook {
175     my ($self, $sqlt_table) = @_;
176     $sqlt_table->add_index(name => 'maintainer_idx_correspondent',
177                            fields => [qw(correspondent)],
178                           );
179 }
180
181 1;