From d6614f2b8987de967bb1cfd4e2157c393e3a74e8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 14 Apr 2020 17:02:24 -0300 Subject: [PATCH] Bug 22784: (QA follow-up) booleans should be TINYINT As per the coding guidelines, they should be TINYINT(1). Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Suggestion.pm | 8 ++++---- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm index 91831fdffe..e493474c57 100644 --- a/Koha/Schema/Result/Suggestion.pm +++ b/Koha/Schema/Result/Suggestion.pm @@ -99,7 +99,7 @@ __PACKAGE__->table("suggestions"); =head2 archived - data_type: 'integer' + data_type: 'tinyint' default_value: 0 is_nullable: 0 @@ -259,7 +259,7 @@ __PACKAGE__->add_columns( size => 10, }, "archived", - { data_type => "integer", default_value => 0, is_nullable => 0 }, + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "note", { data_type => "longtext", is_nullable => 1 }, "author", @@ -484,8 +484,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-27 06:55:24 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:shHAnURjxdagQdgu90WQuw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-14 20:04:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BrvQGdgqpODl23IfwbqdUw __PACKAGE__->belongs_to( "suggester", diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 02c086d71d..693ecf1be1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3014,7 +3014,7 @@ CREATE TABLE `suggestions` ( -- purchase suggestions lastmodificationby INT(11) default NULL, -- borrowernumber for the librarian who edit the suggestion for the last time lastmodificationdate date default NULL, -- date of the last modification `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) - `archived` INT(1) NOT NULL DEFAULT 0, -- is the suggestion archived? + `archived` TINYINT(1) NOT NULL DEFAULT 0, -- is the suggestion archived? `note` LONGTEXT, -- note entered on the suggestion `author` varchar(80) default NULL, -- author of the suggested item `title` varchar(255) default NULL, -- title of the suggested item diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4590eadc01..45ec67c068 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21546,7 +21546,7 @@ $DBversion = '19.12.00.069'; if( CheckVersion( $DBversion ) ) { if( !column_exists( 'suggestions', 'archived' ) ) { $dbh->do(q| - ALTER TABLE suggestions ADD COLUMN archived INT(1) NOT NULL DEFAULT 0 AFTER `STATUS`; + ALTER TABLE suggestions ADD COLUMN archived TINYINT(1) NOT NULL DEFAULT 0 AFTER `STATUS`; |); } -- 2.26.0