Bugzilla – Attachment 25331 Details for
Bug 7567
News by Library: refactor, enhance, and fix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7567 - Schema update for opac_news
Bug-7567---Schema-update-for-opacnews.patch (text/plain), 2.72 KB, created by
Mark Tompsett
on 2014-02-17 03:46:43 UTC
(
hide
)
Description:
Bug 7567 - Schema update for opac_news
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-02-17 03:46:43 UTC
Size:
2.72 KB
patch
obsolete
>From d135dccba8dc911b0a3b48694e05aed14dc94952 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 16 Feb 2014 22:40:28 -0500 >Subject: [PATCH] Bug 7567 - Schema update for opac_news > >This was generated by: >Reset hard to master. >Restore old DB >Apply the patches for 7567 >./installer/data/mysql/updatedatabase.pl >./misc/devel/update_dbix_class_files.pl -db_name=... -db_user=... -db_passwd=... >git add Koha/Schema/Results/OpacNews.pm > >This should provide the necessary changes to the schema files for >Koha 3.16 and forward. >--- > Koha/Schema/Result/OpacNews.pm | 46 +++++++++++++++++++++++++++------------- > 1 file changed, 31 insertions(+), 15 deletions(-) > >diff --git a/Koha/Schema/Result/OpacNews.pm b/Koha/Schema/Result/OpacNews.pm >index a3be8e8..a59792f 100644 >--- a/Koha/Schema/Result/OpacNews.pm >+++ b/Koha/Schema/Result/OpacNews.pm >@@ -1,21 +1,17 @@ >-use utf8; > package Koha::Schema::Result::OpacNews; > > # Created by DBIx::Class::Schema::Loader > # DO NOT MODIFY THE FIRST PART OF THIS FILE > >-=head1 NAME >- >-Koha::Schema::Result::OpacNews >- >-=cut >- > use strict; > use warnings; > > use base 'DBIx::Class::Core'; > >-=head1 TABLE: C<opac_news> >+ >+=head1 NAME >+ >+Koha::Schema::Result::OpacNews > > =cut > >@@ -30,6 +26,13 @@ __PACKAGE__->table("opac_news"); > is_auto_increment: 1 > is_nullable: 0 > >+=head2 branchcode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ > =head2 title > > data_type: 'varchar' >@@ -78,6 +81,8 @@ __PACKAGE__->add_columns( > is_auto_increment => 1, > is_nullable => 0, > }, >+ "branchcode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > "title", > { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 }, > "new", >@@ -96,22 +101,33 @@ __PACKAGE__->add_columns( > "number", > { data_type => "integer", is_nullable => 1 }, > ); >+__PACKAGE__->set_primary_key("idnew"); > >-=head1 PRIMARY KEY >+=head1 RELATIONS > >-=over 4 >+=head2 branchcode > >-=item * L</idnew> >+Type: belongs_to > >-=back >+Related object: L<Koha::Schema::Result::Branch> > > =cut > >-__PACKAGE__->set_primary_key("idnew"); >+__PACKAGE__->belongs_to( >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ 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:0tkil0XyRwcT+abM2XoADw >+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2014-02-16 22:39:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fY5jhUWaod31rJ9mx4xYyw > > > # You can replace this text with custom content, and it will be preserved on regeneration >-- >1.7.9.5
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 7567
:
22863
|
22917
|
22920
|
23350
|
23351
|
23352
|
23362
|
23368
|
23378
|
23383
|
23386
|
23474
|
23475
|
23501
|
23544
|
23547
|
23552
|
23553
|
23554
|
23559
|
23664
|
23703
|
23704
|
23705
|
25316
|
25317
|
25318
|
25319
|
25320
|
25321
|
25322
|
25323
|
25324
|
25325
|
25331
|
25332
|
25333
|
26510
|
26511
|
26590
|
26591
|
26592
|
26593
|
26594
|
26595
|
26596
|
26597
|
26598
|
26599
|
26600
|
26601
|
26602
|
26603
|
26604
|
26605
|
26606
|
26607
|
26608
|
26609
|
26610
|
26611
|
26612
|
26631
|
26632
|
26633
|
26634
|
26635
|
26636
|
26637
|
26638
|
26639
|
26640
|
26641
|
26642
|
26643
|
26644
|
26647