Bugzilla – Attachment 68431 Details for
Bug 18606
Move rotating collections code to Koha::Object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18606: Schema changes
Bug-18606-Schema-changes.patch (text/plain), 4.67 KB, created by
Josef Moravec
on 2017-10-23 18:18:42 UTC
(
hide
)
Description:
Bug 18606: Schema changes
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-10-23 18:18:42 UTC
Size:
4.67 KB
patch
obsolete
>From 394d95d144aa58865b33d619753a12df352851eb Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 15 May 2017 11:41:00 +0000 >Subject: [PATCH] Bug 18606: Schema changes > >--- > Koha/Schema/Result/Collection.pm | 19 +++++++++-- > Koha/Schema/Result/CollectionsTracking.pm | 54 +++++++++++++++++++++++++++---- > Koha/Schema/Result/Item.pm | 19 +++++++++-- > 3 files changed, 81 insertions(+), 11 deletions(-) > >diff --git a/Koha/Schema/Result/Collection.pm b/Koha/Schema/Result/Collection.pm >index 38353ea3dc..c4f2259ce5 100644 >--- a/Koha/Schema/Result/Collection.pm >+++ b/Koha/Schema/Result/Collection.pm >@@ -116,9 +116,24 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 collections_trackings > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-06 15:26:36 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gb7EYny5ULsZw8rYQQ/hjA >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::CollectionsTracking> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "collections_trackings", >+ "Koha::Schema::Result::CollectionsTracking", >+ { "foreign.colId" => "self.colId" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-05-15 11:37:03 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nMkFfhk7kPuhbW70EE3pgg > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/CollectionsTracking.pm b/Koha/Schema/Result/CollectionsTracking.pm >index 4a55cbdf37..086d0d9468 100644 >--- a/Koha/Schema/Result/CollectionsTracking.pm >+++ b/Koha/Schema/Result/CollectionsTracking.pm >@@ -34,6 +34,7 @@ __PACKAGE__->table("collections_tracking"); > accessor: 'col_id' > data_type: 'integer' > default_value: 0 >+ is_foreign_key: 1 > is_nullable: 0 > > collections.colId >@@ -42,6 +43,7 @@ collections.colId > > data_type: 'integer' > default_value: 0 >+ is_foreign_key: 1 > is_nullable: 0 > > items.itemnumber >@@ -53,13 +55,19 @@ __PACKAGE__->add_columns( > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "colId", > { >- accessor => "col_id", >- data_type => "integer", >- default_value => 0, >- is_nullable => 0, >+ accessor => "col_id", >+ data_type => "integer", >+ default_value => 0, >+ is_foreign_key => 1, >+ is_nullable => 0, > }, > "itemnumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >+ { >+ data_type => "integer", >+ default_value => 0, >+ is_foreign_key => 1, >+ is_nullable => 0, >+ }, > ); > > =head1 PRIMARY KEY >@@ -74,9 +82,41 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("collections_tracking_id"); > >+=head1 RELATIONS >+ >+=head2 col >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Collection> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "col", >+ "Koha::Schema::Result::Collection", >+ { colId => "colId" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 itemnumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Item> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "itemnumber", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "itemnumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s8ZFSmMJt313bz3XdlhITQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-05-15 11:37:03 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f69L8B7r/Rvyn0AZQbrJcw > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index ce85bd7b72..7f43d35e1a 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -499,6 +499,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 collections_trackings >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::CollectionsTracking> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "collections_trackings", >+ "Koha::Schema::Result::CollectionsTracking", >+ { "foreign.itemnumber" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 course_item > > Type: might_have >@@ -675,8 +690,8 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vf1sBZrpUo0Cvi896fjNuA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-05-15 11:37:03 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OUa2zlinnT3CbZgH/yGNPA > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >-- >2.11.0
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 18606
:
63508
|
63509
|
63510
|
63511
|
63512
|
63513
|
63514
|
63515
|
63516
|
63517
|
63518
|
63519
|
63520
|
63521
|
63522
|
63523
|
63524
|
63525
|
63526
|
63527
|
63528
|
66227
|
66228
|
66229
|
66230
|
66231
|
66232
|
66233
|
66234
|
66235
|
66236
|
66237
|
66238
|
66239
|
66240
|
66241
|
66286
|
66287
|
66288
|
66289
|
66290
|
66291
|
66292
|
66293
|
66294
|
66295
|
66296
|
66297
|
66298
|
66299
|
66300
|
67734
|
67735
|
67736
|
67737
|
67738
|
67739
|
67740
|
67741
|
67742
|
67743
|
67744
|
67745
|
67746
|
67747
|
67748
|
67749
|
68428
|
68429
|
68430
|
68431
|
68432
|
68433
|
68434
|
68435
|
68436
|
68437
|
68438
|
68439
|
68440
|
68441
|
68442
|
68443
|
69709
|
69710
|
69711
|
69712
|
69713
|
69714
|
69715
|
69716
|
69717
|
69718
|
69719
|
69720
|
69721
|
69722
|
69723
|
69759
|
72416
|
72417
|
72418
|
72419
|
72420
|
72421
|
72422
|
72423
|
72424
|
72425
|
72426
|
72427
|
72428
|
72429
|
72430
|
72431
|
72572
|
72573
|
72574
|
72575
|
72576
|
72577
|
72578
|
72579
|
72580
|
72581
|
72582
|
72583
|
72584
|
72585
|
72586
|
72587
|
72816
|
79141
|
79142
|
79143
|
79144
|
79145
|
79146
|
79147
|
79148
|
79149
|
79150
|
79151
|
79152
|
79153
|
79154
|
79155
|
79156
|
79157
|
79158
|
79161