]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugUserTag.pm
6d83c63aac94b8d88794dbae1cbb41bdf747bf43
[debbugs.git] / Debbugs / DB / Result / BugUserTag.pm
1 use utf8;
2 package Debbugs::DB::Result::BugUserTag;
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::BugUserTag - Bug <-> user tag 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_user_tag>
33
34 =cut
35
36 __PACKAGE__->table("bug_user_tag");
37
38 =head1 ACCESSORS
39
40 =head2 bug
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 0
45
46 Bug id (matches bug)
47
48 =head2 user_tag
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 0
53
54 =cut
55
56 __PACKAGE__->add_columns(
57   "bug",
58   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
59   "user_tag",
60   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
61 );
62
63 =head1 UNIQUE CONSTRAINTS
64
65 =head2 C<bug_user_tag_bug_tag>
66
67 =over 4
68
69 =item * L</bug>
70
71 =item * L</user_tag>
72
73 =back
74
75 =cut
76
77 __PACKAGE__->add_unique_constraint("bug_user_tag_bug_tag", ["bug", "user_tag"]);
78
79 =head1 RELATIONS
80
81 =head2 bug
82
83 Type: belongs_to
84
85 Related object: L<Debbugs::DB::Result::Bug>
86
87 =cut
88
89 __PACKAGE__->belongs_to(
90   "bug",
91   "Debbugs::DB::Result::Bug",
92   { id => "bug" },
93   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
94 );
95
96 =head2 user_tag
97
98 Type: belongs_to
99
100 Related object: L<Debbugs::DB::Result::UserTag>
101
102 =cut
103
104 __PACKAGE__->belongs_to(
105   "user_tag",
106   "Debbugs::DB::Result::UserTag",
107   { id => "user_tag" },
108   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
109 );
110
111
112 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
113 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jZngUCQ1eBBcfXd/jWCKGA
114
115
116 sub sqlt_deploy_hook {
117     my ($self, $sqlt_table) = @_;
118     $sqlt_table->add_index(name => 'bug_user_tag_tag',
119                            fields => [qw(user_tag)],
120                           );
121 }
122
123 1;