Bugzilla – Attachment 55024 Details for
Bug 17216
Add a new table to store authorized value categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17216: DBIC Schema changes
SIGNED-OFF-Bug-17216-DBIC-Schema-changes.patch (text/plain), 4.85 KB, created by
Owen Leonard
on 2016-08-30 14:36:58 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17216: DBIC Schema changes
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-08-30 14:36:58 UTC
Size:
4.85 KB
patch
obsolete
>From a32bbfc828b84ac707c18e2bdc99a01d34df2b3f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 29 Aug 2016 14:05:51 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 17216: DBIC Schema changes >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/Schema/Result/AuthorisedValue.pm | 19 +------ > Koha/Schema/Result/AuthorisedValueCategory.pm | 74 +++++++++++++++++++++++++++ > Koha/Schema/Result/ItemsSearchField.pm | 14 ++--- > 3 files changed, 83 insertions(+), 24 deletions(-) > create mode 100644 Koha/Schema/Result/AuthorisedValueCategory.pm > >diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm >index 4818378..d1f6af6 100644 >--- a/Koha/Schema/Result/AuthorisedValue.pm >+++ b/Koha/Schema/Result/AuthorisedValue.pm >@@ -107,24 +107,9 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 items_search_fields > >-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 @ 2015-02-05 15:20:11 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GS7UBpk66HAhBptwrpKR7Q >+# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-29 11:50:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VtpTwYpCMG3VVmsrQspdxw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/AuthorisedValueCategory.pm b/Koha/Schema/Result/AuthorisedValueCategory.pm >new file mode 100644 >index 0000000..c5de266 >--- /dev/null >+++ b/Koha/Schema/Result/AuthorisedValueCategory.pm >@@ -0,0 +1,74 @@ >+use utf8; >+package Koha::Schema::Result::AuthorisedValueCategory; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AuthorisedValueCategory >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<authorised_value_categories> >+ >+=cut >+ >+__PACKAGE__->table("authorised_value_categories"); >+ >+=head1 ACCESSORS >+ >+=head2 category_name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 80 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "category_name", >+ { data_type => "varchar", is_nullable => 0, size => 80 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</category_name> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("category_name"); >+ >+=head1 RELATIONS >+ >+=head2 items_search_fields >+ >+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_name" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-29 11:50:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fF91wGF5/xHvp8JX5fAAtw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/ItemsSearchField.pm b/Koha/Schema/Result/ItemsSearchField.pm >index 3b6e6be..cd76971 100644 >--- a/Koha/Schema/Result/ItemsSearchField.pm >+++ b/Koha/Schema/Result/ItemsSearchField.pm >@@ -52,7 +52,7 @@ __PACKAGE__->table("items_search_fields"); > data_type: 'varchar' > is_foreign_key: 1 > is_nullable: 1 >- size: 32 >+ size: 80 > > =cut > >@@ -66,7 +66,7 @@ __PACKAGE__->add_columns( > "tagsubfield", > { data_type => "char", is_nullable => 1, size => 1 }, > "authorised_values_category", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 }, >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 }, > ); > > =head1 PRIMARY KEY >@@ -87,14 +87,14 @@ __PACKAGE__->set_primary_key("name"); > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::AuthorisedValue> >+Related object: L<Koha::Schema::Result::AuthorisedValueCategory> > > =cut > > __PACKAGE__->belongs_to( > "authorised_values_category", >- "Koha::Schema::Result::AuthorisedValue", >- { category => "authorised_values_category" }, >+ "Koha::Schema::Result::AuthorisedValueCategory", >+ { category_name => "authorised_values_category" }, > { > is_deferrable => 1, > join_type => "LEFT", >@@ -104,8 +104,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-05 15:20:11 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oHoTxnECC/702vwFO4vdqw >+# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-29 11:50:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5iB4gfxlZLHw2fqwoK/Wtg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17216
:
54979
|
54980
|
54981
|
54982
|
54983
|
54984
|
54985
|
54987
|
54988
|
54989
|
54990
|
54991
|
54992
|
54993
|
55003
|
55004
|
55005
|
55008
|
55009
|
55010
|
55011
|
55021
|
55022
|
55023
|
55024
|
55025
|
55026
|
55027
|
55028
|
55029
|
55030
|
55031
|
55032
|
55047
|
55207
|
55208
|
55209
|
55210
|
55211
|
55212
|
55213
|
55214
|
55215
|
55216
|
55217
|
55218
|
55365
|
55366
|
55367
|
55368
|
55369
|
55370
|
55371
|
55372
|
55373
|
55374
|
55375
|
55376
|
55692
|
55693
|
55835
|
55840
|
56202
|
56203
|
56204
|
56205
|
56206
|
56207
|
56208
|
56209
|
56210
|
56211
|
56212
|
56213
|
56214
|
56215
|
56216
|
56217
|
56619
|
57729