=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<arch>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:P0rjB+6uN8ddIxIvVN6OFg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9pDiZg68Odz66DpCB9GpsA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bin_associations>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:23:58
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zEtAfQAP6UdXRqAF3PaBGA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T7Jms1yHoqpzOdL4mnmBOA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bin_pkg>
{ cascade_copy => 0, cascade_delete => 0 },
);
+=head2 bug_affects_binpackages
+
+Type: has_many
+
+Related object: L<Debbugs::DB::Result::BugAffectsBinpackage>
+
+=cut
+
+__PACKAGE__->has_many(
+ "bug_affects_binpackages",
+ "Debbugs::DB::Result::BugAffectsBinpackage",
+ { "foreign.bin_pkg" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
=head2 bug_binpackages
Type: has_many
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k32MQX4vbBhX4m9+EqR7ww
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:My1zg7yJ4SSXL78poec5ag
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bin_ver>
__PACKAGE__->set_primary_key("id");
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<bin_ver_bin_pkg_id_arch_idx>
+
+=over 4
+
+=item * L</bin_pkg>
+
+=item * L</arch>
+
+=item * L</ver>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("bin_ver_bin_pkg_id_arch_idx", ["bin_pkg", "arch", "ver"]);
+
+=head2 C<bin_ver_src_ver_id_arch_idx>
+
+=over 4
+
+=item * L</src_ver>
+
+=item * L</arch>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("bin_ver_src_ver_id_arch_idx", ["src_ver", "arch"]);
+
=head1 RELATIONS
=head2 arch
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rPiyH454ztK18EaqQD45/w
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jie49PiJahtnqmfkKQYtcw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
+__PACKAGE__->table_class("DBIx::Class::ResultSource::View");
=head1 TABLE: C<binary_versions>
);
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PiJglTBqLYRIi63gvGWIDQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fH11OTb1r9SS1Ps9tM6WPQ
+__PACKAGE__->result_source_instance->view_definition(<<EOF);
+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
+FROM bin_ver b JOIN arch a ON b.arch = a.id
+ JOIN bin_pkg bp ON b.bin_pkg = bp.id
+ JOIN src_ver sv ON b.src_ver = sv.id
+ JOIN src_pkg sp ON sv.src_pkg = sp.id
+ LEFT OUTER JOIN src_ver svb ON sv.based_on = svb.id
+ LEFT OUTER JOIN src_pkg spb ON spb.id = svb.src_pkg;
+EOF
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug>
=head1 RELATIONS
+=head2 bug_affects_binpackages
+
+Type: has_many
+
+Related object: L<Debbugs::DB::Result::BugAffectsBinpackage>
+
+=cut
+
+__PACKAGE__->has_many(
+ "bug_affects_binpackages",
+ "Debbugs::DB::Result::BugAffectsBinpackage",
+ { "foreign.bug" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 bug_affects_srcpackages
+
+Type: has_many
+
+Related object: L<Debbugs::DB::Result::BugAffectsSrcpackage>
+
+=cut
+
+__PACKAGE__->has_many(
+ "bug_affects_srcpackages",
+ "Debbugs::DB::Result::BugAffectsSrcpackage",
+ { "foreign.bug" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
=head2 bug_binpackages
Type: has_many
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iaePW9PF93j30EB5iY9Bag
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rd0pst8cgR9UPi092sJebw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_binpackage>
"bin_pkg",
"Debbugs::DB::Result::BinPkg",
{ id => "bin_pkg" },
- { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
+ { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 bug
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MEtrsZjULXyH4vcYA0C7Vw
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FZAi6kX8ICe/ZJI0JEqZLg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_blocks>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5IuTgATXoFsL6XBFxDp5wg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# 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
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_merged>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GILRzg9MHEZ4k8h6aJxISA
+# 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
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_message>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-24 20:30:07
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j9PbT+q4tBJhimXl7TQgLg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gof8IcnKupbpDmbU39kx6A
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
+__PACKAGE__->table_class("DBIx::Class::ResultSource::View");
=head1 TABLE: C<bug_package>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0HCzRExM+h0kYmDmvij1pA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ok2J+mjxvBcgdiqigiCBQA
+
+__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
+ SELECT s.bug,s.src_pkg,'source',sp.pkg FROM bug_srcpackage s JOIN src_pkg sp ON sp.id=s.src_pkg;
+EOF
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_srcpackage>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2UJYLvd4tWOUwUFbVvQYvg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rkrGE3oLGWe28oXEFt4UFg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_status_cache>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JJbS0LgqkbWIAEzmSvzSxw
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A4gA20BsSs2R4VKmUCRs/g
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_tag>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yh8eh6BKocWHrBrU5zJwtQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g7sgOcROAtOdRa9vrI5gQg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<bug_ver>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-23 17:31:18
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yTXx9otJq7Ur+tbswRs8mQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# 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
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<correspondent>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-23 17:31:18
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iw5Rey49aurBMhqdnlKaiw
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lFyRZdUZXsbDv0Xc6c4cAQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<correspondent_full_name>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 20:33:17
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cvA70xYSRFfzSAXK1z1QzQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rXiBbe/rMz4dOMgW5ZovWw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<maintainer>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-23 17:31:18
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5E4fT7G2x7wdPfr7SMqgGg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rkpgeXltH2wiC1Us7FIijw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<message>
=head2 msgid
data_type: 'text'
- is_nullable: 1
+ default_value: (empty string)
+ is_nullable: 0
Message id header
=head2 from_complete
data_type: 'text'
- is_nullable: 1
+ default_value: (empty string)
+ is_nullable: 0
Complete from header of message
=head2 from_addr
data_type: 'text'
- is_nullable: 1
+ default_value: (empty string)
+ is_nullable: 0
Address(es) of From: headers
=head2 to_complete
data_type: 'text'
- is_nullable: 1
+ default_value: (empty string)
+ is_nullable: 0
Complete to header of message
=head2 to_addr
data_type: 'text'
- is_nullable: 1
+ default_value: (empty string)
+ is_nullable: 0
Address(es) of To: header
=head2 spam_score
data_type: 'double precision'
- is_nullable: 1
+ default_value: 0
+ is_nullable: 0
Spam score from spamassassin
data_type: 'boolean'
default_value: false
- is_nullable: 1
+ is_nullable: 0
True if this message was spam and should not be shown
sequence => "message_id_seq",
},
"msgid",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "text", default_value => "", is_nullable => 0 },
"from_complete",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "text", default_value => "", is_nullable => 0 },
"from_addr",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "text", default_value => "", is_nullable => 0 },
"to_complete",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "text", default_value => "", is_nullable => 0 },
"to_addr",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "text", default_value => "", is_nullable => 0 },
"subject",
{ data_type => "text", default_value => "", is_nullable => 0 },
"sent_date",
"refs",
{ data_type => "text", default_value => "", is_nullable => 0 },
"spam_score",
- { data_type => "double precision", is_nullable => 1 },
+ { data_type => "double precision", default_value => 0, is_nullable => 0 },
"is_spam",
- { data_type => "boolean", default_value => \"false", is_nullable => 1 },
+ { data_type => "boolean", default_value => \"false", is_nullable => 0 },
);
=head1 PRIMARY KEY
__PACKAGE__->set_primary_key("id");
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<message_msgid_from_complete_to_complete_subject_idx>
+
+=over 4
+
+=item * L</msgid>
+
+=item * L</from_complete>
+
+=item * L</to_complete>
+
+=item * L</subject>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint(
+ "message_msgid_from_complete_to_complete_subject_idx",
+ ["msgid", "from_complete", "to_complete", "subject"],
+);
+
=head1 RELATIONS
=head2 bug_messages
);
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5H4wsTVgTSnpnO1XcbvhHA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Dow6t1MS7ldAy6KBMtBWRQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<message_correspondent>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O+1oiAgBblG5UTsHpF4xRw
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HiQOa7XliOu8PNC8DxQPnQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<message_refs>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oEOZLlhxLd5tyH5IW5KhTA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AYCyNKkqOAjoWVelU0HKrA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<severity>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-23 17:31:18
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xZN34NjFy5iDRay5w6JYVQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nI4ZqWa6IW7LgWuG7S1Gog
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<src_associations>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:23:58
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3Hl8VlcLTNPdCLO6kMVyxQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OArdotyolRaEbHj7Yxio2Q
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<src_pkg>
},
);
+=head2 bug_affects_srcpackages
+
+Type: has_many
+
+Related object: L<Debbugs::DB::Result::BugAffectsSrcpackage>
+
+=cut
+
+__PACKAGE__->has_many(
+ "bug_affects_srcpackages",
+ "Debbugs::DB::Result::BugAffectsSrcpackage",
+ { "foreign.src_pkg" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
=head2 bug_srcpackages
Type: has_many
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-13 09:19:59
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XKxXxExb3rnZZyuA+70mww
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qJt8Dn/9gBxJKauPUCFS7w
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<src_ver>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-21 21:57:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pp9Uh44hbBpvnLdssezZ9Q
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gY5LidUaQeuJ5AnN06CfKQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<suite>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xIVtTLCQc72u8xQOuwQhrQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3csVa5t/HsPdWr0/Nmr7WA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
=item * L<DBIx::Class::InflateColumn::DateTime>
+=item * L<DBIx::Class::TimeStamp>
+
=back
=cut
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
=head1 TABLE: C<tag>
);
-# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5Xx50RAuyQQ3VpS0ypsFEQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HH2aKSj4xl+co6qffSdrrQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
);
GetOptions(\%options,
- 'service|s',
- 'sysconfdir|c',
+ 'service|s=s',
+ 'sysconfdir|c=s',
'install',
'upgrade',
'current_version|current-version',
} elsif ($options{install}) {
if ($options{developer_prepare}) {
$dh->prepare_install;
+ $dh->prepare_deploy;
} else {
$dh->install;
}
} elsif ($options{upgrade}) {
- if ($options{developer_prepare}) {
- $dh->prepare_deploy;
- $dh->prepare_upgrade;
- } else {
- $dh->upgrade;
- }
+ $dh->prepare_upgrade;
+ $dh->upgrade;
}
lib .
<connect_info>
- dsn dbi:Pg:service=snp
+ dsn dbi:Pg:service=debbugs
</connect_info>
<loader_options>
fi;
dbicdump -I. -o dump_directory=. \
- -o components='["InflateColumn::DateTime"]' \
+ -o components='["InflateColumn::DateTime","TimeStamp"]' \
-o preserve_case=1 \
+ -o exclude='qr/^dbix_class_deploymenthandler_versions$/' \
Debbugs::DB dbi:Pg:service=$DEBBUGS_SERVICE '' '';
DROP TABLE bug_status_cache CASCADE;
-DROP VIEW bug_package CASCADE;
+DROP VIEW bug_package CASCADE;
DROP VIEW binary_versions CASCADE;
DROP TABLE bug_tag CASCADE;
DROP TABLE tag CASCADE;
DROP TABLE bug_merged CASCADE;
DROP TABLE bug_srcpackage CASCADE;
DROP TABLE bug_binpackage CASCADE;
+DROP TABLE bug_affects_binpackage CASCADE;
+DROP TABLE bug_affects_srcpackage CASCADE;
DROP TABLE suite CASCADE;
DROP TABLE bin_associations CASCADE;
DROP TABLE src_associations CASCADE;
-- the following two tables are used to provide documentation about
-- the tables and columns for DBIx::Class::Schema::Loader
CREATE TABLE table_comments (
- table_name TEXT UNIQUE NOT NULL,
+ table_name TEXT NOT NULL,
comment_text TEXT NOT NULL
);
+CREATE UNIQUE INDEX table_comments_table_name_idx ON table_comments(table_name);
CREATE TABLE column_comments (
table_name TEXT NOT NULL,
column_name TEXT NOT NULL,
comment_text TEXT NOT NULL
);
-CREATE UNIQUE INDEX ON column_comments(table_name,column_name);
+CREATE UNIQUE INDEX column_comments_table_name_column_name_idx ON column_comments(table_name,column_name);
CREATE TABLE correspondent (
id SERIAL PRIMARY KEY,
addr TEXT NOT NULL
);
-CREATE UNIQUE INDEX ON correspondent(addr);
+CREATE UNIQUE INDEX correspondent_addr_idx ON correspondent(addr);
INSERT INTO table_comments VALUES ('correspondent','Individual who has corresponded with the BTS');
INSERT INTO column_comments VALUES ('correspondent','id','Correspondent ID');
INSERT INTO column_comments VALUES ('correspondent','addr','Correspondent address');
created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
modified TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
);
-CREATE UNIQUE INDEX ON maintainer(name);
-CREATE INDEX ON maintainer(correspondent);
+CREATE UNIQUE INDEX maintainer_name_idx ON maintainer(name);
+CREATE INDEX maintainer_idx_correspondent ON maintainer(correspondent);
INSERT INTO table_comments VALUES ('maintainer','Package maintainer names');
INSERT INTO column_comments VALUES ('maintainer','id','Package maintainer id');
INSERT INTO column_comments VALUES ('maintainer','name','Name of package maintainer');
strong BOOLEAN DEFAULT FALSE,
obsolete BOOLEAN DEFAULT FALSE
);
-CREATE UNIQUE INDEX ON severity(severity);
-CREATE INDEX ON severity(ordering);
+CREATE UNIQUE INDEX severity_severity_idx ON severity(severity);
+CREATE INDEX severity_ordering_idx ON severity(ordering);
INSERT INTO table_comments VALUES ('severity','Bug severity');
INSERT INTO column_comments VALUES ('severity','id','Severity id');
INSERT INTO column_comments VALUES ('severity','severity','Severity name');
submitter_full TEXT NOT NULL DEFAULT '',
unknown_packages TEXT NOT NULL DEfAULT ''
);
-CREATE INDEX ON bug(owner);
-CREATE INDEX ON bug(submitter);
-CREATE INDEX ON bug(done);
-CREATE INDEX ON bug(forwarded);
-CREATE INDEX ON bug(last_modified);
-CREATE INDEX ON bug(severity);
+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);
+
INSERT INTO table_comments VALUES ('bug','Bugs');
INSERT INTO column_comments VALUES ('bug','id','Bug number');
INSERT INTO column_comments VALUES ('bug','creation','Time bug created');
INSERT INTO column_comments VALUES ('bug','submitter','Individual who submitted this bug; empty if there is no submitter');
INSERT INTO column_comments VALUES ('bug','unknown_packages','Package name if the package is not known');
-CREATE INDEX ON bug(creation);
-CREATE INDEX ON bug(log_modified);
-CREATE INDEX ON bug(done);
-CREATE INDEX ON bug(owner);
-CREATE INDEX ON bug(submitter);
-CREATE INDEX ON bug(forwarded);
-
CREATE TABLE bug_blocks (
id SERIAL PRIMARY KEY,
src_pkg INT NOT NULL REFERENCES src_pkg
ON UPDATE CASCADE ON DELETE CASCADE,
- ver public.debversion NOT NULL,
+ ver debversion NOT NULL,
maintainer INT REFERENCES maintainer
ON UPDATE CASCADE ON DELETE SET NULL,
upload_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CREATE INDEX bug_ver_src_pkg_id_idx ON bug_ver(src_pkg);
CREATE INDEX bug_ver_src_pkg_id_src_ver_id_idx ON bug_ver(src_pkg,src_ver);
CREATE INDEX bug_ver_src_ver_id_idx ON bug_ver(src_ver);
-CREATE UNIQUE INDEX ON bug_ver(bug,ver_string,found);
+CREATE UNIQUE INDEX bug_ver_bug_ver_string_found_idx ON bug_ver(bug,ver_string,found);
INSERT INTO table_comments VALUES ('bug_ver','Bug versions');
INSERT INTO column_comments VALUES ('bug_ver','id','Bug version id');
INSERT INTO column_comments VALUES ('bug_ver','bug','Bug number');
CREATE TABLE arch (
id SERIAL PRIMARY KEY,
- arch TEXT NOT NULL UNIQUE
+ arch TEXT NOT NULL
);
+CREATE UNIQUE INDEX arch_arch_key ON arch(arch);
INSERT INTO table_comments VALUES ('arch','Architectures');
INSERT INTO column_comments VALUES ('arch','id','Architecture id');
INSERT INTO column_comments VALUES ('arch','arch','Architecture name');
CREATE TABLE bin_pkg (
id SERIAL PRIMARY KEY,
- pkg TEXT NOT NULL UNIQUE
+ pkg TEXT NOT NULL
);
+CREATE UNIQUE INDEX bin_pkg_pkg_key ON bin_pkg(pkg);
INSERT INTO table_comments VALUES ('bin_pkg','Binary packages');
INSERT INTO column_comments VALUES ('bin_pkg','id','Binary package id');
INSERT INTO column_comments VALUES ('bin_pkg','pkg','Binary package name');
ON UPDATE CASCADE ON DELETE CASCADE,
arch INT NOT NULL REFERENCES arch
ON UPDATE CASCADE ON DELETE CASCADE,
- ver public.debversion NOT NULL
+ ver debversion NOT NULL
);
CREATE INDEX bin_ver_ver_idx ON bin_ver(ver);
-CREATE UNIQUE INDEX bin_ver_bin_pkg_id_arch_idx ON bin_ver(bin_pkg,arch_id,ver);
-CREATE UNIQUE INDEX bin_ver_src_ver_id_arch_idx ON bin_ver(src_ver_id,arch);
+CREATE UNIQUE INDEX bin_ver_bin_pkg_id_arch_idx ON bin_ver(bin_pkg,arch,ver);
+CREATE UNIQUE INDEX bin_ver_src_ver_id_arch_idx ON bin_ver(src_ver,arch);
CREATE INDEX bin_ver_bin_pkg_id_idx ON bin_ver(bin_pkg);
CREATE INDEX bin_ver_src_ver_id_idx ON bin_ver(src_ver);
INSERT INTO table_comments VALUES ('bin_ver','Binary versions');
src_pkg INT NOT NULL REFERENCES src_pkg ON UPDATE CASCADE ON DELETE CASCADE
);
CREATE UNIQUE INDEX bug_srcpackage_id_pkg ON bug_srcpackage(bug,src_pkg);
+CREATE INDEX bug_srcpackage_idx_bug ON bug_srcpackage(bug);
+CREATE INDEX bug_srcpackage_idx_src_pkg ON bug_srcpackage(src_pkg);
+
INSERT INTO table_comments VALUES ('bug_srcpackage','Bug <-> source package mapping');
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 TABLE suite (
id SERIAL PRIMARY KEY,
- suite_name TEXT NOT NULL UNIQUE,
+ suite_name TEXT NOT NULL,
version TEXT,
codename TEXT,
active BOOLEAN DEFAULT TRUE);
-CREATE INDEX ON suite(codename);
-CREATE INDEX ON suite(version);
+CREATE UNIQUE INDEX suite_suite_name_key ON suite(suite_name);
+CREATE INDEX suite_idx_codename ON suite(codename);
+CREATE INDEX suite_idx_version ON suite(version);
INSERT INTO table_comments VALUES ('suite','Debian Release Suite (stable, testing, etc.)');
INSERT INTO column_comments VALUES ('suite','id','Suite id');
INSERT INTO column_comments VALUES ('suite','suite_name','Suite name');
modified TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
asof TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
);
-CREATE UNIQUE INDEX ON bug_status_cache(bug,suite,arch);
-CREATE INDEX ON bug_status_cache(bug);
-CREATE INDEX ON bug_status_cache(status);
+CREATE UNIQUE INDEX bug_status_cache_bug_suite_arch_idx ON bug_status_cache(bug,suite,arch);
+CREATE INDEX bug_status_cache_idx_bug ON bug_status_cache(bug);
+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);
INSERT INTO table_comments VALUES ('bug_status_cache','Source <-> suite associations');
INSERT INTO column_comments VALUES ('bug_status_cache','id','Source <-> suite association id');
INSERT INTO column_comments VALUES ('bug_status_cache','bug','Source <-> suite association id');
CREATE TABLE message (
id SERIAL PRIMARY KEY,
- msgid TEXT,
- from_complete TEXT,
- from_addr TEXT,
- to_complete TEXT,
- to_addr TEXT,
+ msgid TEXT NOT NULL DEFAULT '',
+ from_complete TEXT NOT NULL DEFAULT '',
+ from_addr TEXT NOT NULL DEFAULT '',
+ to_complete TEXT NOT NULL DEFAULT '',
+ to_addr TEXT NOT NULL DEFAULT '',
subject TEXT NOT NULL DEFAULT '',
sent_date TIMESTAMP WITH TIME ZONE,
refs TEXT NOT NULL DEFAULT '',
- spam_score FLOAT,
- is_spam BOOLEAN DEFAULT FALSE
+ spam_score FLOAT NOT NULL DEFAULT 0,
+ is_spam BOOLEAN NOT NULL DEFAULT FALSE
);
INSERT INTO table_comments VALUES ('message','Messages sent to bugs');
INSERT INTO column_comments VALUES ('message','id','Message id');
INSERT INTO column_comments VALUES ('message','refs','Contents of References: header');
INSERT INTO column_comments VALUES ('message','spam_score','Spam score from spamassassin');
INSERT INTO column_comments VALUES ('message','is_spam','True if this message was spam and should not be shown');
-CREATE INDEX ON message(msgid);
+CREATE INDEX message_msgid_idx ON message(msgid);
+CREATE UNIQUE INDEX message_msgid_from_complete_to_complete_subject_idx
+ ON message(msgid,from_complete,to_complete,subject);
+CREATE INDEX message_subject_idx ON message(subject);
CREATE TABLE message_refs (
id SERIAL PRIMARY KEY,
primary_ref BOOLEAN DEFAULT FALSE,
CONSTRAINT message_doesnt_reference_itself CHECK (message <> refs)
);
-CREATE UNIQUE INDEX ON message_refs(message,refs);
-CREATE INDEX ON message_refs(refs);
-CREATE INDEX ON message_refs(message);
+CREATE UNIQUE INDEX message_refs_message_refs_idx ON message_refs(message,refs);
+CREATE INDEX message_refs_idx_refs ON message_refs(refs);
+CREATE INDEX message_refs_idx_message ON message_refs(message);
INSERT INTO table_comments VALUES ('message_refs','Message references');
INSERT INTO column_comments VALUES ('message_refs','message','Message id (matches message)');
INSERT INTO column_comments VALUES ('message_refs','refs','Reference id (matches message)');
full_name TEXT NOT NULL,
last_seen TIMESTAMP NOT NULL DEFAULT NOW()
);
-CREATE UNIQUE INDEX ON correspondent_full_name(correspondent,full_name);
-CREATE INDEX ON correspondent_full_name(full_name);
-CREATE INDEX ON correspondent_full_name(last_seen);
+CREATE UNIQUE INDEX correspondent_full_name_correspondent_full_name_idx
+ ON correspondent_full_name(correspondent,full_name);
+CREATE INDEX correspondent_full_name_idx_full_name ON correspondent_full_name(full_name);
+CREATE INDEX correspondent_full_name_idx_last_seen ON correspondent_full_name(last_seen);
INSERT INTO table_comments VALUES ('correspondent_full_name','Full names of BTS correspondents');
INSERT INTO column_comments VALUES ('correspondent_full_name','id','Correspondent full name id');
INSERT INTO column_comments VALUES ('correspondent_full_name','correpsondent','Correspondent ID (matches correspondent)');
INSERT INTO column_comments VALUES ('message_correspondent','correspondent','Correspondent (matches correspondent)');
INSERT INTO column_comments VALUES ('message_correspondent','correspondent_type','Type of correspondent (to, from, envfrom, cc, etc.)');
-CREATE UNIQUE INDEX ON message_correspondent(message,correspondent,correspondent_type);
-CREATE INDEX ON message_correspondent(correspondent);
-CREATE INDEX ON message_correspondent(message);
+CREATE UNIQUE INDEX message_correspondent_message_correspondent_correspondent_t_idx
+ ON message_correspondent(message,correspondent,correspondent_type);
+CREATE INDEX message_correspondent_idx_correspondent ON message_correspondent(correspondent);
+CREATE INDEX message_correspondent_idx_message ON message_correspondent(message);
CREATE TABLE bug_message (
id SERIAL PRIMARY KEY,
bug_log_offset INT,
offset_valid TIMESTAMP WITH TIME ZONE
);
-CREATE UNIQUE INDEX ON bug_message(bug,message);
-CREATE INDEX ON bug_message(bug,message_number);
+CREATE UNIQUE INDEX bug_message_bug_message_idx ON bug_message(bug,message);
+CREATE INDEX bug_message_idx_bug_message_number ON bug_message(bug,message_number);
INSERT INTO table_comments VALUES ('bug_mesage','Mapping between a bug and a message');
INSERT INTO column_comments VALUES ('bug_message','bug','Bug id (matches bug)');
INSERT INTO column_comments VALUES ('bug_message','message','Message id (matches message)');