=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>
Version of the source package
-=head2 maintainer_id
+=head2 maintainer
data_type: 'integer'
is_foreign_key: 1
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"ver",
{ data_type => "debversion", is_nullable => 0 },
- "maintainer_id",
+ "maintainer",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"upload_date",
{
"Debbugs::DB::Result::SrcVer",
{ id => "based_on" },
{
- is_deferrable => 1,
+ is_deferrable => 0,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
__PACKAGE__->has_many(
"bin_vers",
"Debbugs::DB::Result::BinVer",
- { "foreign.src_ver_id" => "self.id" },
+ { "foreign.src_ver" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"bug_vers",
"Debbugs::DB::Result::BugVer",
- { "foreign.src_ver_id" => "self.id" },
+ { "foreign.src_ver" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->belongs_to(
"maintainer",
"Debbugs::DB::Result::Maintainer",
- { id => "maintainer_id" },
+ { id => "maintainer" },
{
- is_deferrable => 1,
+ is_deferrable => 0,
join_type => "LEFT",
- on_delete => "CASCADE",
+ on_delete => "SET NULL",
on_update => "CASCADE",
},
);
"src_pkg",
"Debbugs::DB::Result::SrcPkg",
{ id => "src_pkg" },
- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+ { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 src_vers
);
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-25 18:43:53
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I9bHyZBAJim7KZNk9Yd6Vw
-
-
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gY5LidUaQeuJ5AnN06CfKQ
+
+
+sub sqlt_deploy_hook {
+ my ($self, $sqlt_table) = @_;
+ $sqlt_table->schema->
+ add_procedure(name => 'src_ver_to_src_pkg',
+ sql => <<'EOF',
+CREATE OR REPLACE FUNCTION src_ver_to_src_pkg(src_ver INT) RETURNS INT
+ AS $src_ver_to_src_pkg$
+ DECLARE
+ src_pkg int;
+ BEGIN
+ SELECT sv.src_pkg INTO STRICT src_pkg
+ FROM src_ver sv WHERE sv.id=src_ver;
+ RETURN src_pkg;
+ END
+ $src_ver_to_src_pkg$ LANGUAGE plpgsql;
+EOF
+ );
+}
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;