Browse Source

Bug 23355: (RM follow-up) Make DB update idempotent

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Martin Renvoize 3 years ago
parent
commit
be3c868169
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 16
      installer/data/mysql/updatedatabase.pl

16
installer/data/mysql/updatedatabase.pl

@ -21274,14 +21274,14 @@ if( CheckVersion( $DBversion ) ) {
$DBversion = '19.12.00.054';
if( CheckVersion( $DBversion ) ) {
$dbh->do(qq{
CREATE TABLE desks ( -- desks available in a library
desk_id int(11) NOT NULL auto_increment, -- unique identifier added by Koha
desk_name varchar(100) NOT NULL default '', -- name of the desk
branchcode varchar(10) NOT NULL, -- library the desk is located at
PRIMARY KEY (desk_id),
KEY `fk_desks_branchcode` (branchcode),
CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `desks` ( -- desks available in a library
`desk_id` int(11) NOT NULL auto_increment, -- unique identifier added by Koha
`desk_name` varchar(100) NOT NULL default '', -- name of the desk
`branchcode` varchar(10) NOT NULL, -- library the desk is located at
PRIMARY KEY (`desk_id`),
KEY `fk_desks_branchcode` (`branchcode`),
CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
});
NewVersion( $DBversion, 13881, "Add desk management");

Loading…
Cancel
Save