From dcf207170bab05861f1a17ffc450851511c19fa2 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 18 Jul 2018 16:55:56 +0000 Subject: [PATCH] Bug 19524: DBRev 18.06.006 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- Koha/Schema/Result/PatronList.pm | 12 ++++++++++-- installer/data/mysql/atomicupdate/bug_19524.sql | 1 - installer/data/mysql/updatedatabase.pl | 7 +++++++ 4 files changed, 18 insertions(+), 4 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_19524.sql diff --git a/Koha.pm b/Koha.pm index 0c7e91d66a..2d7b9cf387 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "18.06.00.005"; +$VERSION = "18.06.00.006"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/PatronList.pm b/Koha/Schema/Result/PatronList.pm index 3864f130a3..f755f85585 100644 --- a/Koha/Schema/Result/PatronList.pm +++ b/Koha/Schema/Result/PatronList.pm @@ -41,6 +41,12 @@ __PACKAGE__->table("patron_lists"); is_foreign_key: 1 is_nullable: 0 +=head2 shared + + data_type: 'tinyint' + default_value: 0 + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -50,6 +56,8 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 0, size => 255 }, "owner", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "shared", + { data_type => "tinyint", default_value => 0, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -97,8 +105,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 21:34:14 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iWNlXRM+XvkJMlnu4F0xKw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-18 16:54:33 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ulv0BHLlcWdeLgD6qPxmUQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_19524.sql b/installer/data/mysql/atomicupdate/bug_19524.sql deleted file mode 100644 index 3e30d59e26..0000000000 --- a/installer/data/mysql/atomicupdate/bug_19524.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE patron_lists ADD COLUMN shared tinyint(1) default 0 AFTER owner; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e43f2a8fba..1167c8408c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16136,6 +16136,13 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 12395 - Save order line's creator)\n"; } +$DBversion = '18.06.00.006'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "ALTER IGNORE TABLE patron_lists ADD COLUMN shared tinyint(1) default 0 AFTER owner;" ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19524 - Share patron lists between staff)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5