Bugzilla – Attachment 173956 Details for
Bug 32773
Have the ability to have more than 1 Fast Add framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32773: schema update [DO NOT PUSH]
Bug-32773-schema-update-DO-NOT-PUSH.patch (text/plain), 3.61 KB, created by
Brendan Lawlor
on 2024-11-05 00:57:26 UTC
(
hide
)
Description:
Bug 32773: schema update [DO NOT PUSH]
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-11-05 00:57:26 UTC
Size:
3.61 KB
patch
obsolete
>From 814108dea16cb9a06ceb50ebdc420f32c108b828 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Wed, 30 Oct 2024 18:58:53 +0000 >Subject: [PATCH] Bug 32773: schema update [DO NOT PUSH] > >--- > Koha/Schema/Result/BiblioFramework.pm | 32 +++++++++++++------ > .../data/mysql/atomicupdate/bug_32773.pl | 15 +++++---- > 2 files changed, 32 insertions(+), 15 deletions(-) > >diff --git a/Koha/Schema/Result/BiblioFramework.pm b/Koha/Schema/Result/BiblioFramework.pm >index 15755315d2..60075d8fb9 100644 >--- a/Koha/Schema/Result/BiblioFramework.pm >+++ b/Koha/Schema/Result/BiblioFramework.pm >@@ -1,4 +1,5 @@ > use utf8; >+ > package Koha::Schema::Result::BiblioFramework; > > # Created by DBIx::Class::Schema::Loader >@@ -41,13 +42,23 @@ the unique code assigned to the framework > > the description/name given to the framework > >+=head2 is_fast_add >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+the ability to be used as a Fast Add framework >+ > =cut > > __PACKAGE__->add_columns( >- "frameworkcode", >- { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, >- "frameworktext", >- { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >+ "frameworkcode", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, >+ "frameworktext", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >+ "is_fast_add", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > ); > > =head1 PRIMARY KEY >@@ -62,9 +73,8 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("frameworkcode"); > >- >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YdCNaeY5v1WcfcDuA6xE0w >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-10-30 18:56:51 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GTnC4ZNUn+hFvXTjubfBXg > > # FIXME This should not be needed, we need to add the FK at DB level > # It cannot be done now because the default framework (frameworkcode=='') >@@ -72,8 +82,12 @@ __PACKAGE__->set_primary_key("frameworkcode"); > __PACKAGE__->has_many( > "marc_tag_structure", > "Koha::Schema::Result::MarcTagStructure", >- { "foreign.frameworkcode" => "self.frameworkcode"}, >- { cascade_copy => 0, cascade_delete => 0 }, >+ { "foreign.frameworkcode" => "self.frameworkcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+__PACKAGE__->add_columns( >+ '+is_fast_add' => { is_boolean => 1 }, > ); > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/installer/data/mysql/atomicupdate/bug_32773.pl b/installer/data/mysql/atomicupdate/bug_32773.pl >index c2752ef832..eea1631b15 100755 >--- a/installer/data/mysql/atomicupdate/bug_32773.pl >+++ b/installer/data/mysql/atomicupdate/bug_32773.pl >@@ -9,17 +9,20 @@ return { > my ( $dbh, $out ) = @$args{qw(dbh out)}; > > try { >- $dbh->do(q{ >+ $dbh->do( >+ q{ > ALTER TABLE biblio_framework > ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0 > AFTER frameworktext; >- }); >+ } >+ ); > say $out "Added column 'biblio_framework.is_fast_add'"; >- $dbh->do(q{ >+ $dbh->do( >+ q{ > UPDATE biblio_framework SET is_fast_add = 1 where frameworkcode = 'FA'; >- }); >- } >- catch { >+ } >+ ); >+ } catch { > say_failure( $out, "Database modification failed with errors: $_" ); > }; > }, >-- >2.39.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 32773
:
173401
|
173417
|
173878
|
173879
|
173880
|
173881
|
173882
|
173883
|
173954
|
173955
|
173956
|
173957
|
173958
|
173959
|
173960
|
173961
|
174028
|
174029
|
174030
|
174031
|
174032
|
174033
|
174034
|
174035