Bugzilla – Attachment 194162 Details for
Bug 35104
We should warn when attempting to save MARC records that contain characters invalid in XML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35104: Automated Schema Update
0ca3840.patch (text/plain), 4.29 KB, created by
Martin Renvoize (ashimema)
on 2026-02-27 19:24:06 UTC
(
hide
)
Description:
Bug 35104: Automated Schema Update
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-02-27 19:24:06 UTC
Size:
4.29 KB
patch
obsolete
>From 0ca3840b79fa304600778cdea7d7e2c4a6500868 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 27 Feb 2026 12:56:33 +0000 >Subject: [PATCH] Bug 35104: Automated Schema Update > >--- > Koha/Schema/Result/BiblioMetadata.pm | 26 +++-- > Koha/Schema/Result/BiblioMetadataError.pm | 117 ++++++++++++++++++++++ > 2 files changed, 134 insertions(+), 9 deletions(-) > create mode 100644 Koha/Schema/Result/BiblioMetadataError.pm > >diff --git a/Koha/Schema/Result/BiblioMetadata.pm b/Koha/Schema/Result/BiblioMetadata.pm >index 0689a112c46..54a75e0a428 100644 >--- a/Koha/Schema/Result/BiblioMetadata.pm >+++ b/Koha/Schema/Result/BiblioMetadata.pm >@@ -52,11 +52,6 @@ __PACKAGE__->table("biblio_metadata"); > data_type: 'longtext' > is_nullable: 0 > >-=head2 nonxml_stripped >- >- data_type: 'mediumtext' >- is_nullable: 1 >- > =head2 timestamp > > data_type: 'timestamp' >@@ -85,8 +80,6 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 0, size => 16 }, > "metadata", > { data_type => "longtext", is_nullable => 0 }, >- "nonxml_stripped", >- { data_type => "mediumtext", is_nullable => 1 }, > "timestamp", > { > data_type => "timestamp", >@@ -133,6 +126,21 @@ __PACKAGE__->add_unique_constraint( > > =head1 RELATIONS > >+=head2 biblio_metadata_errors >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::BiblioMetadataError> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "biblio_metadata_errors", >+ "Koha::Schema::Result::BiblioMetadataError", >+ { "foreign.metadata_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 biblionumber > > Type: belongs_to >@@ -169,8 +177,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-26 15:22:11 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B7CmpnimfPOqg17zOWRddg >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-27 12:56:18 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NChAW/EUnwVNQoNOa1eNVw > > =head2 koha_object_class > >diff --git a/Koha/Schema/Result/BiblioMetadataError.pm b/Koha/Schema/Result/BiblioMetadataError.pm >new file mode 100644 >index 00000000000..0acf8c5f2ab >--- /dev/null >+++ b/Koha/Schema/Result/BiblioMetadataError.pm >@@ -0,0 +1,117 @@ >+use utf8; >+package Koha::Schema::Result::BiblioMetadataError; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::BiblioMetadataError >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<biblio_metadata_errors> >+ >+=cut >+ >+__PACKAGE__->table("biblio_metadata_errors"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 metadata_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+FK to biblio_metadata.id >+ >+=head2 error_type >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 64 >+ >+Error type identifier, e.g. nonxml_stripped >+ >+=head2 message >+ >+ data_type: 'mediumtext' >+ is_nullable: 1 >+ >+Error message details >+ >+=head2 created_on >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "metadata_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "error_type", >+ { data_type => "varchar", is_nullable => 0, size => 64 }, >+ "message", >+ { data_type => "mediumtext", is_nullable => 1 }, >+ "created_on", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 metadata >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::BiblioMetadata> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "metadata", >+ "Koha::Schema::Result::BiblioMetadata", >+ { id => "metadata_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-27 12:56:18 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9EDJRN99cOP8lmceBh8GpQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.53.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 35104
:
157625
|
157627
|
157628
|
157642
|
159615
|
159620
|
159621
|
159630
|
159810
|
159811
|
159812
|
159813
|
166431
|
173145
|
173146
|
176820
|
176821
|
176850
|
176851
|
176852
|
176860
|
193985
|
193986
|
193987
|
193988
|
193989
|
193990
|
193991
|
193992
|
193993
|
193994
|
193995
|
193996
|
193997
|
193998
|
193999
|
194000
|
194001
|
194004
|
194005
|
194006
|
194007
|
194008
|
194009
|
194010
|
194011
|
194012
|
194013
|
194152
|
194153
|
194154
|
194155
|
194156
|
194157
|
194158
|
194159
|
194160
|
194161
| 194162 |
194163
|
194164
|
194165
|
194166
|
194167
|
194168
|
194169
|
194170
|
194171
|
194172