Bugzilla – Attachment 55216 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]
Bug 17216: Update DBIC schema for MSS
Bug-17216-Update-DBIC-schema-for-MSS.patch (text/plain), 3.24 KB, created by
Jonathan Druart
on 2016-09-06 07:18:48 UTC
(
hide
)
Description:
Bug 17216: Update DBIC schema for MSS
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-06 07:18:48 UTC
Size:
3.24 KB
patch
obsolete
>From 99c8944c444c7f28fce5407a9b005d80db351e36 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 30 Aug 2016 12:02:15 +0100 >Subject: [PATCH] Bug 17216: Update DBIC schema for MSS > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/Schema/Result/AuthorisedValueCategory.pm | 19 ++++++++++++++-- > Koha/Schema/Result/MarcSubfieldStructure.pm | 31 +++++++++++++++++++++++---- > 2 files changed, 44 insertions(+), 6 deletions(-) > >diff --git a/Koha/Schema/Result/AuthorisedValueCategory.pm b/Koha/Schema/Result/AuthorisedValueCategory.pm >index 596db14..7778ec2 100644 >--- a/Koha/Schema/Result/AuthorisedValueCategory.pm >+++ b/Koha/Schema/Result/AuthorisedValueCategory.pm >@@ -81,9 +81,24 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 marc_subfield_structures > >-# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:54:19 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T8LzWM/O8zSGpRhTZbzvJA >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::MarcSubfieldStructure> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "marc_subfield_structures", >+ "Koha::Schema::Result::MarcSubfieldStructure", >+ { "foreign.authorised_value" => "self.category_name" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:59:31 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6vToj9pUcIv8Jio38rNE4g > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/MarcSubfieldStructure.pm b/Koha/Schema/Result/MarcSubfieldStructure.pm >index 3054d8d..b7ebf1b 100644 >--- a/Koha/Schema/Result/MarcSubfieldStructure.pm >+++ b/Koha/Schema/Result/MarcSubfieldStructure.pm >@@ -77,8 +77,9 @@ __PACKAGE__->table("marc_subfield_structure"); > =head2 authorised_value > > data_type: 'varchar' >+ is_foreign_key: 1 > is_nullable: 1 >- size: 20 >+ size: 32 > > =head2 authtypecode > >@@ -152,7 +153,7 @@ __PACKAGE__->add_columns( > "tab", > { data_type => "tinyint", is_nullable => 1 }, > "authorised_value", >- { data_type => "varchar", is_nullable => 1, size => 20 }, >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 }, > "authtypecode", > { data_type => "varchar", is_nullable => 1, size => 20 }, > "value_builder", >@@ -189,9 +190,31 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("frameworkcode", "tagfield", "tagsubfield"); > >+=head1 RELATIONS >+ >+=head2 authorised_value >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AuthorisedValueCategory> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "authorised_value", >+ "Koha::Schema::Result::AuthorisedValueCategory", >+ { category_name => "authorised_value" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4JgqkPKFNSQ90hTeeb30ow >+# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:59:32 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/gnyZuGje+sg82HfxMLI0g > > > # You can replace this text with custom content, and it will be preserved on regeneration >-- >2.8.1
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