Bugzilla – Attachment 100645 Details for
Bug 24860
Add ability to place item group level holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug-24860-Update-existing-Schema-files-DO-NOT-PUSH.patch (text/plain), 6.53 KB, created by
Kyle M Hall (khall)
on 2020-03-12 15:58:24 UTC
(
hide
)
Description:
Bug 24860: Update existing Schema files [DO NOT PUSH]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-03-12 15:58:24 UTC
Size:
6.53 KB
patch
obsolete
>From f336ec4d5240a43264088fed3cd1d778ce8ac855 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 24 Feb 2020 06:27:38 -0500 >Subject: [PATCH] Bug 24860: Update existing Schema files [DO NOT PUSH] > >--- > Koha/Schema/Result/OldReserve.pm | 32 +++++++++++++++++++-- > Koha/Schema/Result/Reserve.pm | 32 +++++++++++++++++++-- > Koha/Schema/Result/Volume.pm | 48 ++++++++++++++++++++++++++++---- > Koha/Schema/Result/VolumeItem.pm | 20 +++++++++++-- > 4 files changed, 120 insertions(+), 12 deletions(-) > >diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm >index de9fc6cb27..2aa718a905 100644 >--- a/Koha/Schema/Result/OldReserve.pm >+++ b/Koha/Schema/Result/OldReserve.pm >@@ -46,6 +46,12 @@ __PACKAGE__->table("old_reserves"); > is_foreign_key: 1 > is_nullable: 1 > >+=head2 volume_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ > =head2 branchcode > > data_type: 'varchar' >@@ -154,6 +160,8 @@ __PACKAGE__->add_columns( > { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "biblionumber", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "volume_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "branchcode", > { data_type => "varchar", is_nullable => 1, size => 10 }, > "notificationdate", >@@ -296,9 +304,29 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 volume >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Volume> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "volume", >+ "Koha::Schema::Result::Volume", >+ { id => "volume_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "SET NULL", >+ }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-28 13:18:28 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/m1/cy2asQAQbNqcb/45Ug > > sub koha_object_class { > 'Koha::Old::Hold'; >diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm >index 3a56d68e21..4cf5752fa0 100644 >--- a/Koha/Schema/Result/Reserve.pm >+++ b/Koha/Schema/Result/Reserve.pm >@@ -49,6 +49,12 @@ __PACKAGE__->table("reserves"); > is_foreign_key: 1 > is_nullable: 0 > >+=head2 volume_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ > =head2 branchcode > > data_type: 'varchar' >@@ -168,6 +174,8 @@ __PACKAGE__->add_columns( > is_foreign_key => 1, > is_nullable => 0, > }, >+ "volume_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "branchcode", > { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > "notificationdate", >@@ -335,9 +343,29 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 volume >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Volume> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "volume", >+ "Koha::Schema::Result::Volume", >+ { id => "volume_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:48 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pc5zh5iFbdwko5KS51Y9Uw >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-24 11:26:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZH4g79tek2appBHwdFLn5g > > __PACKAGE__->belongs_to( > "item", >diff --git a/Koha/Schema/Result/Volume.pm b/Koha/Schema/Result/Volume.pm >index 30388d165d..64be1fc2ec 100644 >--- a/Koha/Schema/Result/Volume.pm >+++ b/Koha/Schema/Result/Volume.pm >@@ -36,6 +36,12 @@ __PACKAGE__->table("volumes"); > is_foreign_key: 1 > is_nullable: 0 > >+=head2 display_order >+ >+ data_type: 'integer' >+ default_value: 0 >+ is_nullable: 0 >+ > =head2 description > > data_type: 'mediumtext' >@@ -45,8 +51,7 @@ __PACKAGE__->table("volumes"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: '0000-00-00 00:00:00' >- is_nullable: 0 >+ is_nullable: 1 > > =head2 updated_on > >@@ -67,14 +72,15 @@ __PACKAGE__->add_columns( > is_foreign_key => 1, > is_nullable => 0, > }, >+ "display_order", >+ { data_type => "integer", default_value => 0, is_nullable => 0 }, > "description", > { data_type => "mediumtext", is_nullable => 1 }, > "created_on", > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => "0000-00-00 00:00:00", >- is_nullable => 0, >+ is_nullable => 1, > }, > "updated_on", > { >@@ -114,6 +120,36 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >+=head2 old_reserves >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::OldReserve> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "old_reserves", >+ "Koha::Schema::Result::OldReserve", >+ { "foreign.volume_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 reserves >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Reserve> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "reserves", >+ "Koha::Schema::Result::Reserve", >+ { "foreign.volume_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 volume_items > > Type: has_many >@@ -130,8 +166,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-04 15:22:18 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cXvLM2TgY18pxE2ZJBMouw >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-28 14:28:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qg1AhIgW7n2Ws8rAwdFSpw > > sub koha_objects_class { > 'Koha::Biblio::Volumes'; >diff --git a/Koha/Schema/Result/VolumeItem.pm b/Koha/Schema/Result/VolumeItem.pm >index 3ce549209b..d3bb8c8327 100644 >--- a/Koha/Schema/Result/VolumeItem.pm >+++ b/Koha/Schema/Result/VolumeItem.pm >@@ -76,6 +76,22 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("id"); > >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<volume_id> >+ >+=over 4 >+ >+=item * L</volume_id> >+ >+=item * L</itemnumber> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("volume_id", ["volume_id", "itemnumber"]); >+ > =head1 RELATIONS > > =head2 itemnumber >@@ -109,8 +125,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-03 18:25:20 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i6YHB4Jq+79kVVYmuurzIQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-24 11:26:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kKgCjlgDCv3FgqYffaAyng > > sub koha_object_class { > 'Koha::Biblio::Volume::Item'; >-- >2.21.1 (Apple Git-122.3)
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 24860
:
100644
|
100645
|
100646
|
100647
|
100648
|
100649
|
100650
|
100651
|
101744
|
101745
|
101746
|
101747
|
101748
|
101749
|
101750
|
101751
|
101827
|
101828
|
101829
|
101830
|
101831
|
101832
|
101833
|
101834
|
101835
|
102230
|
102231
|
102232
|
102233
|
102234
|
102235
|
102236
|
102237
|
102238
|
102239
|
102240
|
102241
|
102242
|
102243
|
102244
|
102245
|
102246
|
102247
|
106589
|
106590
|
106591
|
106592
|
106593
|
106594
|
106595
|
106596
|
106597
|
106682
|
106683
|
106684
|
106685
|
106686
|
106687
|
106688
|
106689
|
106690
|
106742
|
106743
|
106744
|
106745
|
106746
|
106747
|
106748
|
106749
|
106750
|
108458
|
108459
|
108460
|
108461
|
108462
|
108463
|
108464
|
108465
|
108466
|
109097
|
109098
|
109099
|
109100
|
109101
|
109102
|
109103
|
109104
|
109105
|
109171
|
109172
|
109173
|
109174
|
109175
|
109176
|
109177
|
109178
|
109179
|
113616
|
113617
|
113618
|
113619
|
113620
|
113621
|
113622
|
113623
|
113624
|
135922
|
135923
|
135924
|
135925
|
135926
|
135927
|
135928
|
135929
|
135930
|
138221
|
138222
|
138224
|
138225
|
138226
|
138227
|
138228
|
138229
|
138230
|
141214
|
141215
|
141735
|
141736
|
141737
|
141738
|
141739
|
141740
|
141741
|
141742
|
141743
|
141744
|
141745
|
141746
|
141747
|
141748
|
141749
|
141750
|
142413
|
142414
|
142415
|
142416
|
142417
|
142418
|
142419
|
142420
|
142421
|
142422
|
142423
|
142424
|
142425
|
142426
|
142427
|
142428
|
142429
|
142430
|
142827
|
142955
|
142956
|
142957
|
142958
|
142959
|
142960
|
142961
|
142962
|
142963
|
142964
|
142965
|
142966
|
142967
|
142968
|
142969
|
142970
|
142971
|
142972
|
142973
|
142974
|
142975
|
142992
|
142993
|
142994
|
142995
|
142996
|
142997
|
142998
|
142999
|
143000
|
143001
|
143002
|
143003
|
143004
|
143005
|
143006
|
143007
|
143008
|
143009
|
143010
|
143011