Bugzilla – Attachment 145645 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: Digital signs - db changes
Bug-8628-Digital-signs---db-changes.patch (text/plain), 10.37 KB, created by
Aleisha Amohia
on 2023-01-25 02:52:22 UTC
(
hide
)
Description:
Bug 8628: Digital signs - db changes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-01-25 02:52:22 UTC
Size:
10.37 KB
patch
obsolete
>From 2338840a556b3675f8ec63b64335c489de7a565e Mon Sep 17 00:00:00 2001 >From: Martin Stenberg <martin@xinxidi.net> >Date: Fri, 18 Sep 2015 14:30:39 +0200 >Subject: [PATCH] Bug 8628: Digital signs - db changes > >- Adding edit_digital_signs permission for managing digital signs >- Adding OPACDigitalSigns, OPACDigitalSignsCSS and >OPACDigitalSignsSwatches system preferences >- Adding signs, sign_streams and signs_to_streams tables >- Updating sysprefs.sql and kohastructure.sql > >Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> >--- > .../bug_8628-digital-signs-permissions.perl | 7 ++++ > .../bug_8628-digital-signs-sysprefs.perl | 11 ++++++ > .../mysql/atomicupdate/bug_8628-digital-signs.perl | 37 +++++++++++++++++ > installer/data/mysql/kohastructure.sql | 46 ++++++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 3 ++ > 5 files changed, 104 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_8628-digital-signs-permissions.perl > create mode 100644 installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.perl > create mode 100644 installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-permissions.perl b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-permissions.perl >new file mode 100644 >index 00000000000..1d17026b19e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-permissions.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (13, 'edit_digital_signs', 'Create and edit digital signs for the OPAC') }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 8628 - adding permission for managing digital signs)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.perl b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.perl >new file mode 100644 >index 00000000000..38c1c5d2911 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.perl >@@ -0,0 +1,11 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES >+ ('OPACDigitalSigns',0,NULL,'Turn digital signs in the OPAC on or off.','YesNo'), >+ ('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), >+ ('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free') >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 8628 - Adding OPACDigitalSigns, OPACDigitalSignsCSS and OPACDigitalSignsSwatches system preferences)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl b/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl >new file mode 100644 >index 00000000000..54e24c141a4 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl >@@ -0,0 +1,37 @@ >+$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 }); >+ >+ $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 }); >+ >+ 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 59607073cac..cdf59298974 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5992,6 +5992,52 @@ CREATE TABLE `zebraqueue` ( > KEY `zebraqueue_lookup` (`server`,`biblio_auth_number`,`operation`,`done`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; >+ >+-- >+-- Table structure for table 'sign_streams' >+-- >+ >+DROP TABLE IF EXISTS sign_streams; >+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 COLLATE=utf8_unicode_ci; >+ >+-- >+-- Table structure for table 'signs' >+-- >+ >+DROP TABLE IF EXISTS signs; >+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 clicks 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 COLLATE=utf8_unicode_ci; >+ >+-- >+-- Table structure for table 'signs_to_streams' >+-- >+ >+DROP TABLE IF EXISTS signs_to_streams; >+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 COLLATE=utf8_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index beebd27a6fd..fd1a41e2d7a 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -441,6 +441,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), > ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), > ('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), >+('OPACDigitalSigns',0,NULL, 'Turn digital signs in the OPAC on or off.','YesNo'), >+('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), >+('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'), > ('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'), > ('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'), > ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'), >-- >2.11.0
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