Browse Source

Bug 11425: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
3.18.x
Tomás Cohen Arazi 8 years ago
parent
commit
a86e69c86b
  1. 19
      Koha/Schema/Result/AuthorisedValue.pm
  2. 112
      Koha/Schema/Result/ItemsSearchField.pm

19
Koha/Schema/Result/AuthorisedValue.pm

@ -107,9 +107,24 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 items_search_fields
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N6Q7Y4sHL03X170zJ3APUA
Type: has_many
Related object: L<Koha::Schema::Result::ItemsSearchField>
=cut
__PACKAGE__->has_many(
"items_search_fields",
"Koha::Schema::Result::ItemsSearchField",
{ "foreign.authorised_values_category" => "self.category" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-04 19:23:41
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aaIEvlA6wPG2o0Zx2JGk6A
# You can replace this text with custom content, and it will be preserved on regeneration

112
Koha/Schema/Result/ItemsSearchField.pm

@ -0,0 +1,112 @@
use utf8;
package Koha::Schema::Result::ItemsSearchField;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Koha::Schema::Result::ItemsSearchField
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<items_search_fields>
=cut
__PACKAGE__->table("items_search_fields");
=head1 ACCESSORS
=head2 name
data_type: 'varchar'
is_nullable: 0
size: 255
=head2 label
data_type: 'varchar'
is_nullable: 0
size: 255
=head2 tagfield
data_type: 'char'
is_nullable: 0
size: 3
=head2 tagsubfield
data_type: 'char'
is_nullable: 1
size: 1
=head2 authorised_values_category
data_type: 'varchar'
is_foreign_key: 1
is_nullable: 1
size: 16
=cut
__PACKAGE__->add_columns(
"name",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"label",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"tagfield",
{ data_type => "char", is_nullable => 0, size => 3 },
"tagsubfield",
{ data_type => "char", is_nullable => 1, size => 1 },
"authorised_values_category",
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 },
);
=head1 PRIMARY KEY
=over 4
=item * L</name>
=back
=cut
__PACKAGE__->set_primary_key("name");
=head1 RELATIONS
=head2 authorised_values_category
Type: belongs_to
Related object: L<Koha::Schema::Result::AuthorisedValue>
=cut
__PACKAGE__->belongs_to(
"authorised_values_category",
"Koha::Schema::Result::AuthorisedValue",
{ category => "authorised_values_category" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "CASCADE",
},
);
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-04 19:23:41
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4zpzfz1VNYNVM5M/btiPOA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
Loading…
Cancel
Save