fix foreign key name in blast_db_blast_db_group table schema.
[cxgn-corelibs.git] / lib / SGN / Schema / UnigeneBuild.pm
blob35635b003fe87e013495330074e8e8edc58e4a96
1 package SGN::Schema::UnigeneBuild;
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6 use strict;
7 use warnings;
9 use base 'DBIx::Class::Core';
12 =head1 NAME
14 SGN::Schema::UnigeneBuild
16 =cut
18 __PACKAGE__->table("unigene_build");
20 =head1 ACCESSORS
22 =head2 unigene_build_id
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27 sequence: 'unigene_build_unigene_build_id_seq'
29 =head2 source_data_group_id
31 data_type: 'integer'
32 is_nullable: 1
34 =head2 organism_group_id
36 data_type: 'integer'
37 is_foreign_key: 1
38 is_nullable: 1
40 =head2 build_nr
42 data_type: 'integer'
43 default_value: 0
44 is_nullable: 0
46 =head2 build_date
48 data_type: 'date'
49 default_value: current_timestamp
50 is_nullable: 1
51 original: {default_value => \"now()"}
53 =head2 method_id
55 data_type: 'integer'
56 is_nullable: 1
58 =head2 status
60 data_type: 'char'
61 is_nullable: 1
62 size: 1
64 =head2 comment
66 data_type: 'text'
67 is_nullable: 1
69 =head2 superseding_build_id
71 data_type: 'integer'
72 is_foreign_key: 1
73 is_nullable: 1
75 =head2 next_build_id
77 data_type: 'integer'
78 is_foreign_key: 1
79 is_nullable: 1
81 =head2 latest_build_id
83 data_type: 'integer'
84 is_foreign_key: 1
85 is_nullable: 1
87 =head2 blast_db_id
89 data_type: 'integer'
90 is_foreign_key: 1
91 is_nullable: 1
93 =cut
95 __PACKAGE__->add_columns(
96 "unigene_build_id",
98 data_type => "integer",
99 is_auto_increment => 1,
100 is_nullable => 0,
101 sequence => "unigene_build_unigene_build_id_seq",
103 "source_data_group_id",
104 { data_type => "integer", is_nullable => 1 },
105 "organism_group_id",
106 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
107 "build_nr",
108 { data_type => "integer", default_value => 0, is_nullable => 0 },
109 "build_date",
111 data_type => "date",
112 default_value => \"current_timestamp",
113 is_nullable => 1,
114 original => { default_value => \"now()" },
116 "method_id",
117 { data_type => "integer", is_nullable => 1 },
118 "status",
119 { data_type => "char", is_nullable => 1, size => 1 },
120 "comment",
121 { data_type => "text", is_nullable => 1 },
122 "superseding_build_id",
123 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
124 "next_build_id",
125 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
126 "latest_build_id",
127 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128 "blast_db_id",
129 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
131 __PACKAGE__->set_primary_key("unigene_build_id");
133 =head1 RELATIONS
135 =head2 unigenes
137 Type: has_many
139 Related object: L<SGN::Schema::Unigene>
141 =cut
143 __PACKAGE__->has_many(
144 "unigenes",
145 "SGN::Schema::Unigene",
146 { "foreign.unigene_build_id" => "self.unigene_build_id" },
147 { cascade_copy => 0, cascade_delete => 0 },
150 =head2 superseding_build
152 Type: belongs_to
154 Related object: L<SGN::Schema::UnigeneBuild>
156 =cut
158 __PACKAGE__->belongs_to(
159 "superseding_build",
160 "SGN::Schema::UnigeneBuild",
161 { unigene_build_id => "superseding_build_id" },
163 is_deferrable => 1,
164 join_type => "LEFT",
165 on_delete => "CASCADE",
166 on_update => "CASCADE",
170 =head2 unigene_build_superseding_builds
172 Type: has_many
174 Related object: L<SGN::Schema::UnigeneBuild>
176 =cut
178 __PACKAGE__->has_many(
179 "unigene_build_superseding_builds",
180 "SGN::Schema::UnigeneBuild",
181 { "foreign.superseding_build_id" => "self.unigene_build_id" },
182 { cascade_copy => 0, cascade_delete => 0 },
185 =head2 organism_group
187 Type: belongs_to
189 Related object: L<SGN::Schema::Group>
191 =cut
193 __PACKAGE__->belongs_to(
194 "organism_group",
195 "SGN::Schema::Group",
196 { group_id => "organism_group_id" },
198 is_deferrable => 1,
199 join_type => "LEFT",
200 on_delete => "CASCADE",
201 on_update => "CASCADE",
205 =head2 next_build
207 Type: belongs_to
209 Related object: L<SGN::Schema::UnigeneBuild>
211 =cut
213 __PACKAGE__->belongs_to(
214 "next_build",
215 "SGN::Schema::UnigeneBuild",
216 { unigene_build_id => "next_build_id" },
218 is_deferrable => 1,
219 join_type => "LEFT",
220 on_delete => "CASCADE",
221 on_update => "CASCADE",
225 =head2 unigene_build_next_builds
227 Type: has_many
229 Related object: L<SGN::Schema::UnigeneBuild>
231 =cut
233 __PACKAGE__->has_many(
234 "unigene_build_next_builds",
235 "SGN::Schema::UnigeneBuild",
236 { "foreign.next_build_id" => "self.unigene_build_id" },
237 { cascade_copy => 0, cascade_delete => 0 },
240 =head2 latest_build
242 Type: belongs_to
244 Related object: L<SGN::Schema::UnigeneBuild>
246 =cut
248 __PACKAGE__->belongs_to(
249 "latest_build",
250 "SGN::Schema::UnigeneBuild",
251 { unigene_build_id => "latest_build_id" },
253 is_deferrable => 1,
254 join_type => "LEFT",
255 on_delete => "CASCADE",
256 on_update => "CASCADE",
260 =head2 unigene_build_latest_builds
262 Type: has_many
264 Related object: L<SGN::Schema::UnigeneBuild>
266 =cut
268 __PACKAGE__->has_many(
269 "unigene_build_latest_builds",
270 "SGN::Schema::UnigeneBuild",
271 { "foreign.latest_build_id" => "self.unigene_build_id" },
272 { cascade_copy => 0, cascade_delete => 0 },
275 =head2 blast_db
277 Type: belongs_to
279 Related object: L<SGN::Schema::BlastDb>
281 =cut
283 __PACKAGE__->belongs_to(
284 "blast_db",
285 "SGN::Schema::BlastDb",
286 { blast_db_id => "blast_db_id" },
288 is_deferrable => 1,
289 join_type => "LEFT",
290 on_delete => "CASCADE",
291 on_update => "CASCADE",
296 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:35:39
297 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EsKIExQ2mGfjNs4pxg8qfw
300 # You can replace this text with custom content, and it will be preserved on regeneration