From 359324553f639ff83395a84bbb8bbb9d69cf2b79 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Fri, 6 Nov 2020 14:49:20 -0300 Subject: [PATCH] Bug 23019: (follow-up) set table name to import_batch_profiles --- installer/data/mysql/atomicupdate/bug-23019.perl | 10 +++++----- installer/data/mysql/kohastructure.sql | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug-23019.perl b/installer/data/mysql/atomicupdate/bug-23019.perl index 48b3fc263e..6facbd422a 100644 --- a/installer/data/mysql/atomicupdate/bug-23019.perl +++ b/installer/data/mysql/atomicupdate/bug-23019.perl @@ -4,9 +4,9 @@ if( CheckVersion( $DBversion ) ) { # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); # or perform some test and warn - if( !TableExists( 'import_batches_profile' ) ) { + if( !TableExists( 'import_batch_profiles' ) ) { $dbh->do(q{ - CREATE TABLE `import_batches_profile` ( -- profile for batches of marc records to be imported + CREATE TABLE `import_batch_profiles` ( -- profile for batches of marc records to be imported `id` int(11) NOT NULL auto_increment, -- unique identifier and primary key `name` varchar(100) NOT NULL, -- name of this profile `matcher_id` int(11) default NULL, -- the id of the match rule used (matchpoints.matcher_id) @@ -20,7 +20,7 @@ if( CheckVersion( $DBversion ) ) { `format` varchar(50) default NULL, -- marc format `comments` LONGTEXT, -- any comments added when the file was uploaded PRIMARY KEY (`id`), - UNIQUE KEY `u_import_batches_profile__name` (`name`) + UNIQUE KEY `u_import_batch_profiles__name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); } @@ -31,10 +31,10 @@ if( CheckVersion( $DBversion ) ) { }); $dbh->do(q{ - ALTER TABLE import_batches ADD CONSTRAINT `import_batches_ibfk_1` FOREIGN KEY (`profile_id`) REFERENCES `import_batches_profile` (`id`) ON DELETE SET NULL ON UPDATE SET NULL + ALTER TABLE import_batches ADD CONSTRAINT `import_batches_ibfk_1` FOREIGN KEY (`profile_id`) REFERENCES `import_batch_profiles` (`id`) ON DELETE SET NULL ON UPDATE SET NULL }); } # Always end with this (adjust the bug info) - NewVersion( $DBversion, 23019, "Add import_batches_profile table and profile_id column in import_batches"); + NewVersion( $DBversion, 23019, "Add import_batch_profiles table and profile_id column in import_batches"); } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 73b754ef3c..a613573aed 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -701,11 +701,11 @@ CREATE TABLE `export_format` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Used for CSV export'; -- --- Table structure for table `import_batches_profile` +-- Table structure for table `import_batch_profiles` -- -DROP TABLE IF EXISTS `import_batches_profile`; -CREATE TABLE `import_batches_profile` ( -- profile for batches of marc records to be imported +DROP TABLE IF EXISTS `import_batch_profiles`; +CREATE TABLE `import_batch_profiles` ( -- profile for batches of marc records to be imported `id` int(11) NOT NULL auto_increment, -- unique identifier and primary key `name` varchar(100) NOT NULL, -- name of this profile `matcher_id` int(11) default NULL, -- the id of the match rule used (matchpoints.matcher_id) @@ -719,7 +719,7 @@ CREATE TABLE `import_batches_profile` ( -- profile for batches of marc records t `format` varchar(50) default NULL, -- marc format `comments` LONGTEXT, -- any comments added when the file was uploaded PRIMARY KEY (`id`), - UNIQUE KEY `u_import_batches_profile__name` (`name`) + UNIQUE KEY `u_import_batch_profiles__name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -747,7 +747,7 @@ CREATE TABLE `import_batches` ( -- information about batches of marc records tha PRIMARY KEY (`import_batch_id`), KEY `branchcode` (`branchcode`), CONSTRAINT `import_batches_ibfk_1` FOREIGN KEY (`profile_id`) - REFERENCES `import_batches_profile` (`id`) ON DELETE SET NULL ON UPDATE SET NULL + REFERENCES `import_batch_profiles` (`id`) ON DELETE SET NULL ON UPDATE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- 2.25.0