Bugzilla – Attachment 124807 Details for
Bug 28959
virtualshelves.category is really a boolean
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28959: Move category => public
Bug-28959-Move-category--public.patch (text/plain), 2.93 KB, created by
Joonas Kylmälä
on 2021-09-12 12:00:59 UTC
(
hide
)
Description:
Bug 28959: Move category => public
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-09-12 12:00:59 UTC
Size:
2.93 KB
patch
obsolete
>From eb7a6e70889056b97e0a644dd2e660c6ac59c5d1 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 7 Sep 2021 08:06:59 -0300 >Subject: [PATCH] Bug 28959: Move category => public >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > .../data/mysql/atomicupdate/bug_28959.pl | 30 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 31 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_28959.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_28959.pl b/installer/data/mysql/atomicupdate/bug_28959.pl >new file mode 100755 >index 0000000000..f3061d99bf >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_28959.pl >@@ -0,0 +1,30 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "28959", >+ description => "virtualshelves.category is really a boolean", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh) = @$args{qw(dbh)}; >+ >+ unless( column_exists( 'virtualshelves', 'public' ) ) { >+ # Add column >+ $dbh->do(q{ >+ ALTER TABLE virtualshelves >+ ADD COLUMN `public` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'If the list is public' >+ AFTER `owner`; >+ }); >+ # Set public lists >+ $dbh->do(q{ >+ UPDATE virtualshelves >+ SET public = 1 >+ WHERE category = 2; >+ }); >+ # Drop old column >+ $dbh->do(q{ >+ ALTER TABLE virtualshelves >+ DROP COLUMN `category`; >+ }); >+ } >+ }, >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 02cf864ddd..86bd4a152c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5271,7 +5271,7 @@ CREATE TABLE `virtualshelves` ( > `shelfnumber` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier assigned by Koha', > `shelfname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'name of the list', > `owner` int(11) DEFAULT NULL COMMENT 'foreign key linking to the borrowers table (using borrowernumber) for the creator of this list (changed from varchar(80) to int)', >- `category` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'type of list (private [1], public [2])', >+ `public` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'If the list is public', > `sortfield` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT 'title' COMMENT 'the field this list is sorted on', > `lastmodified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date and time the list was last modified', > `created_on` datetime NOT NULL COMMENT 'creation time', >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28959
:
124619
|
124620
|
124621
|
124622
|
124623
|
124624
|
124625
|
124663
|
124788
|
124799
|
124800
|
124801
|
124802
|
124803
|
124807
|
124808
|
124809
|
124810
|
124811
|
127046
|
127047
|
127048
|
127049
|
127050
|
127059
|
127060
|
127062
|
127142
|
127206
|
128036