Browse Source

Bug 16735: DBIC Schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 4 years ago
parent
commit
a364bb15a7
  1. 29
      Koha/Schema/Result/Branch.pm
  2. 36
      Koha/Schema/Result/LibraryGroup.pm

29
Koha/Schema/Result/Branch.pm

@ -308,21 +308,6 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 branchrelations
Type: has_many
Related object: L<Koha::Schema::Result::Branchrelation>
=cut
__PACKAGE__->has_many(
"branchrelations",
"Koha::Schema::Result::Branchrelation",
{ "foreign.branchcode" => "self.branchcode" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 branchtransfers_frombranches
Type: has_many
@ -623,19 +608,9 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 categorycodes
Type: many_to_many
Composing rels: L</branchrelations> -> categorycode
=cut
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-05 14:04:50
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Q87CSY+yexoxL37pfm3kgg
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-05 14:08:18
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g+WicMjGntjAgcKrbn4IdQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration

36
Koha/Schema/Result/LibraryGroup.pm

@ -55,15 +55,16 @@ __PACKAGE__->table("library_groups");
=head2 created_on
data_type: 'datetime'
data_type: 'timestamp'
datetime_undef_if_invalid: 1
is_nullable: 0
is_nullable: 1
=head2 updated_on
data_type: 'datetime'
data_type: 'timestamp'
datetime_undef_if_invalid: 1
is_nullable: 1
default_value: current_timestamp
is_nullable: 0
=cut
@ -80,15 +81,16 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"created_on",
{
data_type => "datetime",
data_type => "timestamp",
datetime_undef_if_invalid => 1,
is_nullable => 0,
is_nullable => 1,
},
"updated_on",
{
data_type => "datetime",
data_type => "timestamp",
datetime_undef_if_invalid => 1,
is_nullable => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
);
@ -104,6 +106,20 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("id");
=head1 UNIQUE CONSTRAINTS
=head2 C<title>
=over 4
=item * L</title>
=back
=cut
__PACKAGE__->add_unique_constraint("title", ["title"]);
=head1 RELATIONS
=head2 branchcode
@ -162,8 +178,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-05 14:04:50
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p4hmm+ciFgPOGlAMvNB6Yw
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-09 16:27:08
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JN93utlgFEyQhE9BMx1QQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration

Loading…
Cancel
Save