Bug 17170: DBRev 22.06.00.067
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 21 Oct 2022 14:19:39 +0000 (11:19 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 21 Oct 2022 14:19:39 +0000 (11:19 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
installer/data/mysql/atomicupdate/bug_17170.pl [deleted file]
installer/data/mysql/db_revs/220600067.pl [new file with mode: 0755]

diff --git a/Koha.pm b/Koha.pm
index 5c0c997..49d405e 100644 (file)
--- 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 = "22.06.00.066";
+$VERSION = "22.06.00.067";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_17170.pl b/installer/data/mysql/atomicupdate/bug_17170.pl
deleted file mode 100755 (executable)
index 70b9d1f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-use Modern::Perl;
-
-return {
-    bug_number => "17170",
-    description => "Add permission for creating saved search filters",
-    up => sub {
-        my ($args) = @_;
-        my ($dbh, $out) = @$args{qw(dbh out)};
-        $dbh->do(q{
-            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
-            (3, 'manage_search_filters', 'Manage custom search filters');
-        });
-        say $out "Added manage_search_filters permission";
-        unless( TableExists( 'search_filters' ) ){
-            $dbh->do(q{
-                CREATE TABLE `search_filters` (
-                `search_filter_id` int(11) NOT NULL AUTO_INCREMENT,
-                `name` varchar(255) NOT NULL COMMENT 'filter name',
-                `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part',
-                `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part',
-                `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC',
-                `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client',
-                PRIMARY KEY (`search_filter_id`)
-                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-            });
-            say $out "Added search_filters table";
-        } else {
-            say $out "search_filters table already created";
-        }
-        $dbh->do(q{
-            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
-            ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo')
-        });
-        say $out "Added SavedSearchFilters system preference";
-    },
-}
diff --git a/installer/data/mysql/db_revs/220600067.pl b/installer/data/mysql/db_revs/220600067.pl
new file mode 100755 (executable)
index 0000000..70b9d1f
--- /dev/null
@@ -0,0 +1,36 @@
+use Modern::Perl;
+
+return {
+    bug_number => "17170",
+    description => "Add permission for creating saved search filters",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        $dbh->do(q{
+            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
+            (3, 'manage_search_filters', 'Manage custom search filters');
+        });
+        say $out "Added manage_search_filters permission";
+        unless( TableExists( 'search_filters' ) ){
+            $dbh->do(q{
+                CREATE TABLE `search_filters` (
+                `search_filter_id` int(11) NOT NULL AUTO_INCREMENT,
+                `name` varchar(255) NOT NULL COMMENT 'filter name',
+                `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part',
+                `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part',
+                `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC',
+                `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client',
+                PRIMARY KEY (`search_filter_id`)
+                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+            });
+            say $out "Added search_filters table";
+        } else {
+            say $out "search_filters table already created";
+        }
+        $dbh->do(q{
+            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
+            ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo')
+        });
+        say $out "Added SavedSearchFilters system preference";
+    },
+}