X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FDB%2FResult%2FBugStatusCache.pm;fp=Debbugs%2FDB%2FResult%2FBugStatusCache.pm;h=0000000000000000000000000000000000000000;hb=1e6633a3780f4fd53fc4303852e84d13cdad2dc6;hp=26b850e721683c7c0381041671d1abd6e0a335d9;hpb=466f7faff129a5699c7674f59900a92aa256175d;p=debbugs.git diff --git a/Debbugs/DB/Result/BugStatusCache.pm b/Debbugs/DB/Result/BugStatusCache.pm deleted file mode 100644 index 26b850e..0000000 --- a/Debbugs/DB/Result/BugStatusCache.pm +++ /dev/null @@ -1,220 +0,0 @@ -use utf8; -package Debbugs::DB::Result::BugStatusCache; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -=head1 NAME - -Debbugs::DB::Result::BugStatusCache - Bug Status Cache - -=cut - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - -=head1 COMPONENTS LOADED - -=over 4 - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp"); - -=head1 TABLE: C - -=cut - -__PACKAGE__->table("bug_status_cache"); - -=head1 ACCESSORS - -=head2 bug - - data_type: 'integer' - is_foreign_key: 1 - is_nullable: 0 - -Bug number (matches bug) - -=head2 suite - - data_type: 'integer' - is_foreign_key: 1 - is_nullable: 1 - -Suite id (matches suite) - -=head2 arch - - data_type: 'integer' - is_foreign_key: 1 - is_nullable: 1 - -Architecture id (matches arch) - -=head2 status - - data_type: 'enum' - extra: {custom_type_name => "bug_status_type",list => ["absent","found","fixed","undef"]} - is_nullable: 0 - -Status (bug status) - -=head2 modified - - data_type: 'timestamp with time zone' - default_value: current_timestamp - is_nullable: 0 - original: {default_value => \"now()"} - -Time that this status was last modified - -=head2 asof - - data_type: 'timestamp with time zone' - default_value: current_timestamp - is_nullable: 0 - original: {default_value => \"now()"} - -Time that this status was last calculated - -=cut - -__PACKAGE__->add_columns( - "bug", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, - "suite", - { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, - "arch", - { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, - "status", - { - data_type => "enum", - extra => { - custom_type_name => "bug_status_type", - list => ["absent", "found", "fixed", "undef"], - }, - is_nullable => 0, - }, - "modified", - { - data_type => "timestamp with time zone", - default_value => \"current_timestamp", - is_nullable => 0, - original => { default_value => \"now()" }, - }, - "asof", - { - data_type => "timestamp with time zone", - default_value => \"current_timestamp", - is_nullable => 0, - original => { default_value => \"now()" }, - }, -); - -=head1 UNIQUE CONSTRAINTS - -=head2 C - -=over 4 - -=item * L - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->add_unique_constraint( - "bug_status_cache_bug_suite_arch_idx", - ["bug", "suite", "arch"], -); - -=head1 RELATIONS - -=head2 arch - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "arch", - "Debbugs::DB::Result::Arch", - { id => "arch" }, - { - is_deferrable => 0, - join_type => "LEFT", - on_delete => "CASCADE", - on_update => "CASCADE", - }, -); - -=head2 bug - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "bug", - "Debbugs::DB::Result::Bug", - { id => "bug" }, - { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 suite - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "suite", - "Debbugs::DB::Result::Suite", - { id => "suite" }, - { - is_deferrable => 0, - join_type => "LEFT", - on_delete => "CASCADE", - on_update => "CASCADE", - }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-08-07 09:58:56 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RNAken/j2+82FVCyCTnvQw - -sub sqlt_deploy_hook { - my ($self, $sqlt_table) = @_; -# $sqlt_table->add_index(name => 'bug_status_cache_bug_suite_arch_idx', -# fields => ['bug', -# q{COALESCE(suite,0)}, -# q{COALESCE(arch,0)},] -# ); - for my $f (qw(bug status arch suite asof)) { - $sqlt_table->add_index(name => 'bug_status_cache_idx_'.$f, - fields => [$f], - ); - } -} - -1;