]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugBinpackage.pm
handle affects properly and upgrade schema
[debbugs.git] / Debbugs / DB / Result / BugBinpackage.pm
1 use utf8;
2 package Debbugs::DB::Result::BugBinpackage;
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::BugBinpackage - Bug <-> binary package mapping
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_binpackage>
33
34 =cut
35
36 __PACKAGE__->table("bug_binpackage");
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_binpackage_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 bin_pkg
56
57   data_type: 'integer'
58   is_foreign_key: 1
59   is_nullable: 0
60
61 Binary package id (matches bin_pkg)
62
63 =cut
64
65 __PACKAGE__->add_columns(
66   "id",
67   {
68     data_type         => "integer",
69     is_auto_increment => 1,
70     is_nullable       => 0,
71     sequence          => "bug_binpackage_id_seq",
72   },
73   "bug",
74   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
75   "bin_pkg",
76   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77 );
78
79 =head1 PRIMARY KEY
80
81 =over 4
82
83 =item * L</id>
84
85 =back
86
87 =cut
88
89 __PACKAGE__->set_primary_key("id");
90
91 =head1 UNIQUE CONSTRAINTS
92
93 =head2 C<bug_binpackage_id_pkg>
94
95 =over 4
96
97 =item * L</bug>
98
99 =item * L</bin_pkg>
100
101 =back
102
103 =cut
104
105 __PACKAGE__->add_unique_constraint("bug_binpackage_id_pkg", ["bug", "bin_pkg"]);
106
107 =head1 RELATIONS
108
109 =head2 bin_pkg
110
111 Type: belongs_to
112
113 Related object: L<Debbugs::DB::Result::BinPkg>
114
115 =cut
116
117 __PACKAGE__->belongs_to(
118   "bin_pkg",
119   "Debbugs::DB::Result::BinPkg",
120   { id => "bin_pkg" },
121   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
122 );
123
124 =head2 bug
125
126 Type: belongs_to
127
128 Related object: L<Debbugs::DB::Result::Bug>
129
130 =cut
131
132 __PACKAGE__->belongs_to(
133   "bug",
134   "Debbugs::DB::Result::Bug",
135   { id => "bug" },
136   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
137 );
138
139
140 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
141 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FZAi6kX8ICe/ZJI0JEqZLg
142
143
144 # You can replace this text with custom code or comments, and it will be preserved on regeneration
145 1;