Bug 14957: DBIC changes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
66157286ad
commit
59e0473051
|
|
@ -1,110 +0,0 @@
|
|||
use utf8;
|
||||
package Koha::Schema::Result::MarcMergeRule;
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader
|
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Koha::Schema::Result::MarcMergeRule
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
=head1 TABLE: C<marc_merge_rules>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->table("marc_merge_rules");
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 tag
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 module
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 127
|
||||
|
||||
=head2 filter
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 add
|
||||
|
||||
data_type: 'tinyint'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 append
|
||||
|
||||
data_type: 'tinyint'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 remove
|
||||
|
||||
data_type: 'tinyint'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 delete
|
||||
|
||||
accessor: undef
|
||||
data_type: 'tinyint'
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
|
||||
"tag",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"module",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 127 },
|
||||
"filter",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"add",
|
||||
{ data_type => "tinyint", is_nullable => 0 },
|
||||
"append",
|
||||
{ data_type => "tinyint", is_nullable => 0 },
|
||||
"remove",
|
||||
{ data_type => "tinyint", is_nullable => 0 },
|
||||
"delete",
|
||||
{ accessor => undef, data_type => "tinyint", is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-10 16:31:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jdTzjEX0dUsXzK7LtlOS9w
|
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
1;
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
use utf8;
|
||||
package Koha::Schema::Result::MarcOverlayRule;
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader
|
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Koha::Schema::Result::MarcOverlayRule
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
=head1 TABLE: C<marc_overlay_rules>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->table("marc_overlay_rules");
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 tag
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 module
|
||||
|
||||
data_type: 'varchar'
|
||||
is_foreign_key: 1
|
||||
is_nullable: 0
|
||||
size: 127
|
||||
|
||||
=head2 filter
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 add
|
||||
|
||||
data_type: 'tinyint'
|
||||
default_value: 0
|
||||
is_nullable: 0
|
||||
|
||||
=head2 append
|
||||
|
||||
data_type: 'tinyint'
|
||||
default_value: 0
|
||||
is_nullable: 0
|
||||
|
||||
=head2 remove
|
||||
|
||||
data_type: 'tinyint'
|
||||
default_value: 0
|
||||
is_nullable: 0
|
||||
|
||||
=head2 delete
|
||||
|
||||
accessor: undef
|
||||
data_type: 'tinyint'
|
||||
default_value: 0
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
|
||||
"tag",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"module",
|
||||
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 127 },
|
||||
"filter",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"add",
|
||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||
"append",
|
||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||
"remove",
|
||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||
"delete",
|
||||
{
|
||||
accessor => undef,
|
||||
data_type => "tinyint",
|
||||
default_value => 0,
|
||||
is_nullable => 0,
|
||||
},
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
=head1 RELATIONS
|
||||
|
||||
=head2 module
|
||||
|
||||
Type: belongs_to
|
||||
|
||||
Related object: L<Koha::Schema::Result::MarcOverlayRulesModule>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"module",
|
||||
"Koha::Schema::Result::MarcOverlayRulesModule",
|
||||
{ name => "module" },
|
||||
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-03-26 17:56:31
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zSQHbrkBihPcEkzjW1M2bg
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
'+add' => { is_boolean => 1 },
|
||||
'+append' => { is_boolean => 1 },
|
||||
'+remove' => { is_boolean => 1 },
|
||||
'+delete' => { is_boolean => 1 }
|
||||
);
|
||||
|
||||
1;
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
use utf8;
|
||||
package Koha::Schema::Result::MarcOverlayRulesModule;
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader
|
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Koha::Schema::Result::MarcOverlayRulesModule
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
=head1 TABLE: C<marc_overlay_rules_modules>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->table("marc_overlay_rules_modules");
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 name
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 127
|
||||
|
||||
=head2 description
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 1
|
||||
size: 255
|
||||
|
||||
=head2 specificity
|
||||
|
||||
data_type: 'integer'
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"name",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 127 },
|
||||
"description",
|
||||
{ data_type => "varchar", is_nullable => 1, size => 255 },
|
||||
"specificity",
|
||||
{ data_type => "integer", is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</name>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->set_primary_key("name");
|
||||
|
||||
=head1 UNIQUE CONSTRAINTS
|
||||
|
||||
=head2 C<specificity>
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</specificity>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_unique_constraint("specificity", ["specificity"]);
|
||||
|
||||
=head1 RELATIONS
|
||||
|
||||
=head2 marc_overlay_rules
|
||||
|
||||
Type: has_many
|
||||
|
||||
Related object: L<Koha::Schema::Result::MarcOverlayRule>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"marc_overlay_rules",
|
||||
"Koha::Schema::Result::MarcOverlayRule",
|
||||
{ "foreign.module" => "self.name" },
|
||||
{ cascade_copy => 0, cascade_delete => 0 },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-03-26 17:50:29
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NcP7xFRa7qXyck6wIQg/YQ
|
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
1;
|
||||
Loading…
Reference in New Issue