# This version must be incremented any time the schema changes so that
# DBIx::Class::DeploymentHandler can do its work
-our $VERSION=5;
+our $VERSION=6;
# You can replace this text with custom code or comments, and it will be preserved on regeneration
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzTzZbPkilT8WMhXoZv9xw
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(var bin_pkg src_ver)) {
+ $sqlt_table->add_index(name => 'bin_ver_'.$idx.'_id_idx',
+ fields => [$idx]);
+ }
+ $sqlt_table->add_index(name => 'bin_ver_src_ver_id_arch_idx',
+ fields => [qw(src_ver arch)]
+ );
+}
+
1;
__PACKAGE__->many_to_many(affects_srcpackages => 'bug_affects_srcpackages','src_pkg');
__PACKAGE__->many_to_many(messages => 'bug_messages','message');
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ # CREATE INDEX bug_idx_owner ON bug(owner);
+ # CREATE INDEX bug_idx_submitter ON bug(submitter);
+ # CREATE INDEX bug_idx_done ON bug(done);
+ # CREATE INDEX bug_idx_forwarded ON bug(forwarded);
+ # CREATE INDEX bug_idx_last_modified ON bug(last_modified);
+ # CREATE INDEX bug_idx_severity ON bug(severity);
+ # CREATE INDEX bug_idx_creation ON bug(creation);
+ # CREATE INDEX bug_idx_log_modified ON bug(log_modified);
+ for my $idx (qw(owner submitter done forwarded last_modified),
+ qw(severity creation log_modified),
+ ) {
+ $sqlt_table->add_index(name => 'bug_idx'.$idx,
+ fields => [$idx]);
+ }
+}
+
sub set_related_packages {
my ($self,$relationship,$pkgs,$pkg_cache) = @_;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wL+pwSCfWe/mMQOjziKSeg
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'bug_binpackage_bin_pkg_idx',
+ fields => [qw(bin_pkg)],
+ );
+}
+
1;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rkt0XlA4r2YFX0KnUZmS6A
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(bug blocks)) {
+ $sqlt_table->add_index(name => 'bug_blocks_'.$idx.'_idx',
+ fields => [$idx]);
+ }
+}
+
1;
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HdGeCb1Fh2cU08+TTQVi/Q
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(bug merged)) {
+ $sqlt_table->add_index(name => 'bug_merged_'.$idx.'_idx',
+ fields => [$idx]);
+ }
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BRbN9C6P/wvWWmSmjNGjLA
-
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'bug_message_idx_bug_message_number',
+ fields => [qw(bug message_number)],
+ );
+}
1;
=cut
__PACKAGE__->table("bug_package");
-__PACKAGE__->result_source_instance->view_definition(" SELECT b.bug,\n b.bin_pkg AS pkg_id,\n 'binary'::text AS pkg_type,\n bp.pkg AS package\n FROM (bug_binpackage b\n JOIN bin_pkg bp ON ((bp.id = b.bin_pkg)))\nUNION\n SELECT s.bug,\n s.src_pkg AS pkg_id,\n 'source'::text AS pkg_type,\n sp.pkg AS package\n FROM (bug_srcpackage s\n JOIN src_pkg sp ON ((sp.id = s.src_pkg)))");
+__PACKAGE__->result_source_instance->view_definition(" SELECT b.bug,\n b.bin_pkg AS pkg_id,\n 'binary'::text AS pkg_type,\n bp.pkg AS package\n FROM (bug_binpackage b\n JOIN bin_pkg bp ON ((bp.id = b.bin_pkg)))\nUNION\n SELECT s.bug,\n s.src_pkg AS pkg_id,\n 'source'::text AS pkg_type,\n sp.pkg AS package\n FROM (bug_srcpackage s\n JOIN src_pkg sp ON ((sp.id = s.src_pkg)))\nUNION\n SELECT b.bug,\n b.bin_pkg AS pkg_id,\n 'binary_affects'::text AS pkg_type,\n bp.pkg AS package\n FROM (bug_affects_binpackage b\n JOIN bin_pkg bp ON ((bp.id = b.bin_pkg)))\nUNION\n SELECT s.bug,\n s.src_pkg AS pkg_id,\n 'source_affects'::text AS pkg_type,\n sp.pkg AS package\n FROM (bug_affects_srcpackage s\n JOIN src_pkg sp ON ((sp.id = s.src_pkg)))");
=head1 ACCESSORS
);
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+zeVIVZOYSZjTkD+1N2sdw
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-04-13 11:30:02
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Nrl+KO8b94gK5GcCkdNcw
__PACKAGE__->result_source_instance->view_definition(<<EOF);
SELECT b.bug,b.bin_pkg,'binary',bp.pkg FROM bug_binpackage b JOIN bin_pkg bp ON bp.id=b.bin_pkg UNION
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SduyMaGHABDrX19Cxg4fg
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'bug_srcpackage_src_pkg_idx',
+ fields => [qw(src_pkg)],
+ );
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yyHP5f8zAxn/AdjOCr8WAg
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'bug_tag_tag',
+ fields => [qw(tag)],
+ );
+}
+
1;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jZngUCQ1eBBcfXd/jWCKGA
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'bug_user_tag_tag',
+ fields => [qw(user_tag)],
+ );
+}
+
1;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cvdjFL2o+rBg2PfcintuNA
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(src_pkg src_ver)) {
+ $sqlt_table->add_index(name => 'bug_ver_'.$idx.'_id_idx',
+ fields => [$idx]);
+ }
+ $sqlt_table->add_index(name => 'bug_ver_src_pkg_id_src_ver_id_idx',
+ fields => [qw(src_pkg src_var)],
+ );
+}
1;
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Ac8mrDV2IsE/11YsYoqQQ
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(correspondent message)) {
+ $sqlt_table->add_index(name => 'message_correspondent_idx'.$idx,
+ fields => [$idx]);
+ }
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rkpgeXltH2wiC1Us7FIijw
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'maintainer_idx_correspondent',
+ fields => [qw(correspondent)],
+ );
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
__PACKAGE__->many_to_many(references => 'message_refs_message','message');
__PACKAGE__->many_to_many(referenced_by => 'message_refs_refs','message');
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(msgid subject)) {
+ $sqlt_table->add_index(name => 'message_'.$idx.'_idx',
+ fields => [$idx]);
+ }
+}
+
1;
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0YaAP/sB5N2Xr2rAFNK1lg
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ for my $idx (qw(refs message)) {
+ $sqlt_table->add_index(name => 'message_refs_idx_'.$idx,
+ fields => [$idx]);
+ }
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nI4ZqWa6IW7LgWuG7S1Gog
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'severity_ordering_idx',
+ fields => [qw(ordering)],
+ );
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j8LGu4eUfNUNxM/jkHUG2A
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'src_pkg_pkg',
+ fields => 'pkg',
+ );
+}
1;
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-09-24 14:51:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZPmTBeTue62dG2NdQdPrQg
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->add_index(name => 'user_tag_correspondent',
+ fields => [qw(correspondent)],
+ );
+}
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
INSERT INTO column_comments VALUES ('bug_srcpackage','bug','Bug id (matches bug)');
INSERT INTO column_comments VALUES ('bug_srcpackage','src_pkg','Source package id (matches src_pkg)');
-CREATE VIEW bug_package (bug,pkg_id,pkg_type,package) AS
- SELECT b.bug,b.bin_pkg,'binary',bp.pkg FROM bug_binpackage b JOIN bin_pkg bp ON bp.id=b.bin_pkg UNION
- SELECT s.bug,s.src_pkg,'source',sp.pkg FROM bug_srcpackage s JOIN src_pkg sp ON sp.id=s.src_pkg;
-
CREATE TABLE bug_affects_binpackage (
bug INT NOT NULL REFERENCES bug,
bin_pkg INT NOT NULL REFERENCES bin_pkg ON UPDATE CASCADE ON DELETE CASCADE
INSERT INTO column_comments VALUES ('bug_affects_srcpackage','bug','Bug id (matches bug)');
INSERT INTO column_comments VALUES ('bug_affects_srcpackage','src_pkg','Source package id (matches src_pkg)');
+CREATE VIEW bug_package (bug,pkg_id,pkg_type,package) AS
+ SELECT b.bug,b.bin_pkg,'binary',bp.pkg FROM bug_binpackage b JOIN bin_pkg bp ON bp.id=b.bin_pkg UNION
+ SELECT s.bug,s.src_pkg,'source',sp.pkg FROM bug_srcpackage s JOIN src_pkg sp ON sp.id=s.src_pkg UNION
+ SELECT b.bug,b.bin_pkg,'binary_affects',bp.pkg FROM bug_affects_binpackage b JOIN bin_pkg bp ON bp.id=b.bin_pkg UNION
+ SELECT s.bug,s.src_pkg,'source_affects',sp.pkg FROM bug_affects_srcpackage s JOIN src_pkg sp ON sp.id=s.src_pkg;
+
CREATE VIEW binary_versions (src_pkg, src_ver, bin_pkg, arch, bin_ver) AS
SELECT sp.pkg AS src_pkg, sv.ver AS src_ver, bp.pkg AS bin_pkg, a.arch AS arch, b.ver AS bin_ver,
svb.ver AS src_ver_based_on, spb.pkg AS src_pkg_based_on
CREATE INDEX bug_status_cache_idx_status ON bug_status_cache(status);
CREATE INDEX bug_status_cache_idx_arch ON bug_status_cache(arch);
CREATE INDEX bug_status_cache_idx_suite ON bug_status_cache(suite);
+CREATE INDEX bug_status_cache_idx_asof ON bug_status_cache(asof);
INSERT INTO table_comments VALUES ('bug_status_cache','Bug Status Cache');
INSERT INTO column_comments VALUES ('bug_status_cache','bug','Bug number (matches bug)');
INSERT INTO column_comments VALUES ('bug_status_cache','suite','Suite id (matches suite)');