Bugzilla – Attachment 99614 Details for
Bug 8628
Add digital signs to the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8628: (follow-up) Use utf8mb4 and TableExists in atomic update
Bug-8628-follow-up-Use-utf8mb4-and-TableExists-in-.patch (text/plain), 10.29 KB, created by
Aleisha Amohia
on 2020-02-25 22:32:26 UTC
(
hide
)
Description:
Bug 8628: (follow-up) Use utf8mb4 and TableExists in atomic update
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2020-02-25 22:32:26 UTC
Size:
10.29 KB
patch
obsolete
>From 52048137e978ece76d395258bf4815e94a751d0f Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 25 Feb 2020 22:31:38 +0000 >Subject: [PATCH] Bug 8628: (follow-up) Use utf8mb4 and TableExists in atomic > update > >--- > .../mysql/atomicupdate/bug_8628-digital-signs.perl | 70 ++++++++++++--------- > installer/data/mysql/kohastructure.sql | 6 +- > tools/.nfs00000000028807d100000006 | Bin 12288 -> 0 bytes > 3 files changed, 43 insertions(+), 33 deletions(-) > delete mode 100644 tools/.nfs00000000028807d100000006 > >diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl b/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl >index 54e24c1..5e68958 100644 >--- a/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl >+++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl >@@ -1,36 +1,46 @@ > $DBversion = 'XXX'; > if( CheckVersion( $DBversion ) ) { >- $dbh->do(q{DROP TABLE IF EXISTS sign_streams }); >- $dbh->do(q{DROP TABLE IF EXISTS signs }); >- $dbh->do(q{CREATE TABLE sign_streams ( >- sign_stream_id int(11) NOT NULL auto_increment, -- primary key, used to identify streams >- saved_sql_id int(11) NOT NULL, -- foreign key from the saved_sql table >- name varchar(64), -- name/title of the sign >- PRIMARY KEY (sign_stream_id), >- CONSTRAINT sign_streams_ibfk_1 FOREIGN KEY (saved_sql_id) REFERENCES saved_sql (id) ON DELETE CASCADE >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 }); >- $dbh->do(q{CREATE TABLE signs ( >- sign_id int(11) NOT NULL auto_increment, -- primary key, used to identify signs >- name varchar(64), -- name/title of the deck >- webapp int(1) NOT NULL DEFAULT 0, -- display as web app or normal page >- transition char(16) NOT NULL DEFAULT 'none', -- transition to use between pages, must be one of the transitions defined by jQuery Mobile (see their docs) >- swatch char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements >- idleafter int(11) NOT NULL default 0, -- seconds to wait before automatic page turning cicks in >- pagedelay int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record >- reloadafter int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages >- PRIMARY KEY (sign_id) >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 }); >+ if( TableExists('sign_streams') ){ >+ $dbh->do(q{ ALTER TABLE sign_streams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci }); >+ } else { >+ $dbh->do(q{ CREATE TABLE sign_streams ( >+ sign_stream_id int(11) NOT NULL auto_increment, -- primary key, used to identify streams >+ saved_sql_id int(11) NOT NULL, -- foreign key from the saved_sql table >+ name varchar(64), -- name/title of the sign >+ PRIMARY KEY (sign_stream_id), >+ CONSTRAINT sign_streams_ibfk_1 FOREIGN KEY (saved_sql_id) REFERENCES saved_sql (id) ON DELETE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4 }); >+ } > >- $dbh->do(q{DROP TABLE IF EXISTS signs_to_streams }); >- $dbh->do(q{CREATE TABLE signs_to_streams ( >- sign_to_stream_id int(11) NOT NULL auto_increment, -- primary key, used to identify connections between signs and streams (the same stream can be attached to a sign more than once, with different parameters) >- sign_stream_id int(11) NOT NULL, -- foreign key from the decks sign_streams table >- sign_id int(11) NOT NULL, -- foreign key from the signs table >- params varchar(255) NOT NULL DEFAULT '', -- list of parameters for the SQL associated with the sign_stream >- PRIMARY KEY (sign_to_stream_id), >- CONSTRAINT signs_to_streams_ibfk_1 FOREIGN KEY (sign_stream_id) REFERENCES sign_streams (sign_stream_id) ON DELETE CASCADE, >- CONSTRAINT signs_to_streams_ibfk_2 FOREIGN KEY (sign_id) REFERENCES signs (sign_id) ON DELETE CASCADE >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 }); >+ if( TableExists('signs') ){ >+ $dbh->do(q{ ALTER TABLE signs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci }); >+ } else { >+ $dbh->do(q{ CREATE TABLE signs ( >+ sign_id int(11) NOT NULL auto_increment, -- primary key, used to identify signs >+ name varchar(64), -- name/title of the deck >+ webapp int(1) NOT NULL DEFAULT 0, -- display as web app or normal page >+ transition char(16) NOT NULL DEFAULT 'none', -- transition to use between pages, must be one of the transitions defined by jQuery Mobile (see their docs) >+ swatch char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements >+ idleafter int(11) NOT NULL default 0, -- seconds to wait before automatic page turning cicks in >+ pagedelay int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record >+ reloadafter int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages >+ PRIMARY KEY (sign_id) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); >+ } >+ >+ if( TableExists('signs_to_streams') ){ >+ $dbh->do(q{ ALTER TABLE signs_to_streams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci }); >+ } else { >+ $dbh->do(q{ CREATE TABLE signs_to_streams ( >+ sign_to_stream_id int(11) NOT NULL auto_increment, -- primary key, used to identify connections between signs and streams (the same stream can be attached to a sign more than once, with different parameters) >+ sign_stream_id int(11) NOT NULL, -- foreign key from the decks sign_streams table >+ sign_id int(11) NOT NULL, -- foreign key from the signs table >+ params varchar(255) NOT NULL DEFAULT '', -- list of parameters for the SQL associated with the sign_stream >+ PRIMARY KEY (sign_to_stream_id), >+ CONSTRAINT signs_to_streams_ibfk_1 FOREIGN KEY (sign_stream_id) REFERENCES sign_streams (sign_stream_id) ON DELETE CASCADE, >+ CONSTRAINT signs_to_streams_ibfk_2 FOREIGN KEY (sign_id) REFERENCES signs (sign_id) ON DELETE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); >+ } > > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 8628 - add signs, sign_streams and signs_to_streams tables)\n"; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 0b609c2..c53f058 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4426,7 +4426,7 @@ CREATE TABLE sign_streams ( > `name` varchar(64), -- name/title of the sign > PRIMARY KEY (`sign_stream_id`), > CONSTRAINT `sign_streams_ibfk_1` FOREIGN KEY (`saved_sql_id`) REFERENCES `saved_sql` (`id`) ON DELETE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- > -- Table structure for table 'signs' >@@ -4443,7 +4443,7 @@ CREATE TABLE signs ( > `pagedelay` int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record > `reloadafter` int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages > PRIMARY KEY (`sign_id`) >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- > -- Table structure for table 'signs_to_streams' >@@ -4458,7 +4458,7 @@ CREATE TABLE signs_to_streams ( > PRIMARY KEY (`sign_to_stream_id`), > CONSTRAINT `signs_to_streams_ibfk_1` FOREIGN KEY (`sign_stream_id`) REFERENCES `sign_streams` (`sign_stream_id`) ON DELETE CASCADE, > CONSTRAINT `signs_to_streams_ibfk_2` FOREIGN KEY (`sign_id`) REFERENCES `signs` (`sign_id`) ON DELETE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; >diff --git a/tools/.nfs00000000028807d100000006 b/tools/.nfs00000000028807d100000006 >deleted file mode 100644 >index a73a1f3c28fa6f94e65ac85bda5e34ff28f148c6..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 12288 >zcmeI2&u<$=6vwAMAn~IVm4D#nhg1hS-jo(WZ4${uNovRs%W<e8QLM3d>>YJ?XEQr% >zV}-z#Q%@X`sKf<M{0AU$;fgqL199R45+L9V-`T8V7t|bjqSCDN&3b0uynXNUW>$_o >z-IX^RJM?np2E+9nW50hC-g$|AaPj*m85{C}=CQFO=U#VJz<n|7s&~#cWA7CXJv*Tn >zs#thNsW3hLyBw%URFd#~A8ynUa0DKez$JG5#cL~e_QL!eJ%8okQ60H?j({WJ2si?c >zfFs}tI0BA<Bk&j!Fv$h>KH|Pu#9k@x7yflGn(pQZI0BA<Bj5-)0*-(q;0QPZj({WJ >z2si?dAp!0)_9=erfA=W_kKg|%|NsAXnXzA?Z=r9Xd(i996VQ*(GWG*>AL>Di&|jAr >z`vdwMI)W1DZRifP1>J;}pueAC>=)=~=sV~`=pOVIbQ8J){rNOwUqhckpFsDakD(?s >z56wZBp`Q@*SJ0Qx7m&^27;={*;0QPZj({WJ2si?c!2gqg%1n}(PGF+2Gm<92CzEsn >zfy1OarNyI6=y91AdrIAv0w0Wsl8_s*ymmUXhOd-0Mz|6Y`!XIFK1gkoR@Z28rjOaa >zqTN$bBw~}!+D!V&Y~~pW*E}jQ7L6b9MXNLrrqfedY&zX>2hZ%JhMO!ctst5i>xoy) >zcmoGstJRhmN-;{8*HXcCFX)6al1BKYW8z7o)lm30s1-U{T3*ZjPZK=JQ?P0HqMHru >zhvLGFYh^ZR^+O=g;wY0E-f|GflpnISuCKmul}@I{JTpP8%$d1;_;l2a6ESgX?--qz >zvB8O8Vdkf1d6j1DU{+L)O?oGF>%=^=F0H5k9Q-vCr^l9IX<BU*K2(E&K!LMV=(7bu >zOGPQp-1FG)Sd&s-h10-RDHbDI-)ev*#vZIhE$>>tQLVP^$~hW&4=JrTwcN`W?X+D7 >z#G<v;fD44aoSFVBgvF4%-%(i3akbhMIz-n3ah!Y}kX`V3G&PcaLK(`G3PG>hJy7+$ >z(P&f|#92k@ffvf2h*OcSRWSQdWt0Xg3w;XsP>>cqA??!P)KkfrRG&;BXlwU?wnQv6 >z52=}T;exhL-LM6CdH68(m8M8(ft6;s3{(5iosHJ|t@>`e{#s+Z(LN-YY&P1v8~gjT >zx!0mPHS4W*WBp*e-lFC~tGTzoQK5aLgHSO2cB6f3@1RZf-9x%vZ?)j*u$B|RMkX;7 >zaUQe8_Lj(G#I-$lZgat8yLU*Y<jd4(+0C$HNS;mz6qcw7xFKoaE)1zF2vzQ9VVPi= >zr&_}BSY?`2Vx)?fh{t2HuMtf{yl2p5GqlV$H6q?ueS-kd!VdSjol+x#VomMo`h;?U >zv<x8d0ecu(PjDWk6Qgrj^OO=>oHRgE-SJGeeH%+!#8R^fP>;u`_7sCn8cW{G>*dS- >l7#(@W?Etv?G87gYUSq~aVlh^*{N}tY)m~S|UV;V5{s9J?0Ve<e > >-- >2.1.4
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 8628
:
42703
|
42704
|
45968
|
45969
|
58602
|
58603
|
58604
|
58605
|
62338
|
64249
|
66246
|
66247
|
66248
|
66249
|
66250
|
77025
|
77026
|
77027
|
77028
|
77141
|
77142
|
77143
|
77144
|
77145
|
78709
|
80248
|
80249
|
80250
|
80252
|
82896
|
82897
|
82898
|
82899
|
82900
|
82901
|
83312
|
88821
|
88822
|
88823
|
88824
|
88825
|
88826
|
93054
|
93055
|
93056
|
93057
|
93058
|
93059
|
93066
|
93067
|
93068
|
93069
|
93070
|
93071
|
99608
|
99609
|
99610
|
99611
|
99612
|
99613
|
99614
|
99615
|
99616
|
99617
|
99618
|
99619
|
99620
|
99621
|
99622
|
99623
|
99624
|
99717
|
99718
|
99801
|
118472
|
118473
|
118474
|
118475
|
118476
|
118477
|
118478
|
118479
|
118480
|
119455
|
131223
|
131224
|
145645
|
145646
|
145647
|
145648
|
145649
|
145650
|
145651
|
145652
|
145653
|
145654
|
147000
|
147001
|
147002
|
147003
|
147004
|
147005
|
147006
|
147007
|
147008
|
147009
|
147010