Bug 13535: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-10-08 16:17:42 +02:00
parent 48f9692edd
commit f686ff9d42
2 changed files with 43 additions and 5 deletions

View file

@ -33,6 +33,7 @@ __PACKAGE__->table("alert");
data_type: 'integer'
default_value: 0
is_foreign_key: 1
is_nullable: 0
=head2 type
@ -55,7 +56,12 @@ __PACKAGE__->add_columns(
"alertid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"borrowernumber",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
{
data_type => "integer",
default_value => 0,
is_foreign_key => 1,
is_nullable => 0,
},
"type",
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
"externalid",
@ -74,9 +80,26 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("alertid");
=head1 RELATIONS
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O4b7dlkDRkE6WLPKI5AO+A
=head2 borrowernumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"borrowernumber",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-10-08 14:17:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jWeIEKGNHlVEBUGBuUXsug
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -722,6 +722,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 alerts
Type: has_many
Related object: L<Koha::Schema::Result::Alert>
=cut
__PACKAGE__->has_many(
"alerts",
"Koha::Schema::Result::Alert",
{ "foreign.borrowernumber" => "self.borrowernumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 api_keys
Type: has_many
@ -1668,8 +1683,8 @@ Composing rels: L</aqorder_users> -> ordernumber
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-20 10:54:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pH5cKJCrjwfiLnk7iCO4tA
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-10-08 14:17:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kzx7ildKCEFF6YDr6MRCrw
__PACKAGE__->add_columns(
'+anonymized' => { is_boolean => 1 },