Bug 23207: (QA follow-up) Add COMMENT to new column
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 21 Apr 2021 19:17:25 +0000 (16:17 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 22 Apr 2021 09:11:05 +0000 (11:11 +0200)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
JD amended patch: FIX syntax error.(swap COMMENT and AFTER)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_23027.perl
installer/data/mysql/kohastructure.sql

index 5e7a578..4494ae6 100644 (file)
@@ -1,9 +1,10 @@
 $DBversion = 'XXX'; # will be replaced by the RM
 if( CheckVersion( $DBversion ) ) {
     if( !column_exists( 'itemtypes', 'automatic_checkin' ) ) {
-       $dbh->do(q{
-           ALTER TABLE itemtypes ADD COLUMN `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 AFTER `searchcategory` -- 1 if automatic checkin is enabled for items of this type
-       });
+        $dbh->do(q{
+            ALTER TABLE itemtypes
+                ADD COLUMN `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type' AFTER `searchcategory`
+        });
     }
 
     # Always end with this (adjust the bug info)
index 06e16e0..18fe28c 100644 (file)
@@ -3133,7 +3133,7 @@ CREATE TABLE `itemtypes` (
   `sip_media_type` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SIP2 protocol media type for this itemtype',
   `hideinopac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Hide the item type from the search options in OPAC',
   `searchcategory` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Group this item type with others with the same value on OPAC search options',
-  `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0, -- 1 if automatic checkin is enabled for items of this type
+  `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type',
   PRIMARY KEY (`itemtype`),
   UNIQUE KEY `itemtype` (`itemtype`),
   KEY `itemtypes_ibfk_1` (`parent_type`),