Bugzilla – Attachment 130744 Details for
Bug 18618
Mana - Add reading suggestions (crontab and scripts for Koha)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18618: Update database
Bug-18618-Update-database.patch (text/plain), 4.33 KB, created by
Marion Durand
on 2022-02-17 13:28:11 UTC
(
hide
)
Description:
Bug 18618: Update database
Filename:
MIME Type:
Creator:
Marion Durand
Created:
2022-02-17 13:28:11 UTC
Size:
4.33 KB
patch
obsolete
>From 4df775f4f9ce92a629bf5611be9f9e8946c1316a Mon Sep 17 00:00:00 2001 >From: Marion Durand <marion.durand@biblibre.com> >Date: Tue, 18 Jan 2022 15:39:03 +0100 >Subject: [PATCH] Bug 18618: Update database > >create the atomicupdate file >--- > .../bug_18618-add_table_reading_pairs.pl | 28 +++++++++++++++++++ > .../mana_add_table_reading_pairs.sql | 16 ----------- > installer/data/mysql/kohastructure.sql | 20 +++++++++++++ > 3 files changed, 48 insertions(+), 16 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_18618-add_table_reading_pairs.pl > delete mode 100644 installer/data/mysql/atomicupdate/mana_add_table_reading_pairs.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_18618-add_table_reading_pairs.pl b/installer/data/mysql/atomicupdate/bug_18618-add_table_reading_pairs.pl >new file mode 100644 >index 0000000000..f3860607a3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18618-add_table_reading_pairs.pl >@@ -0,0 +1,28 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "18618", >+ description => "Add new table reading_suggestions", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ # Creating a column by suggestion is a design choice made to maximise speed >+ $dbh->do(q{ >+ CREATE TABLE IF NOT EXISTS `reading_suggestion` ( >+ `biblionumber` int(11) NOT NULL, >+ `biblionumber1` int(11) NOT NULL, >+ `biblionumber2` int(11) DEFAULT NULL, >+ `biblionumber3` int(11) DEFAULT NULL, >+ `biblionumber4` int(11) DEFAULT NULL, >+ `biblionumber5` int(11) DEFAULT NULL, >+ `biblionumber6` int(11) DEFAULT NULL, >+ `biblionumber7` int(11) DEFAULT NULL, >+ `biblionumber8` int(11) DEFAULT NULL, >+ `biblionumber9` int(11) DEFAULT NULL, >+ `biblionumber10` int(11) DEFAULT NULL, >+ `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), >+ PRIMARY KEY (`biblionumber`) >+ ) >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/atomicupdate/mana_add_table_reading_pairs.sql b/installer/data/mysql/atomicupdate/mana_add_table_reading_pairs.sql >deleted file mode 100644 >index eea656d0e5..0000000000 >--- a/installer/data/mysql/atomicupdate/mana_add_table_reading_pairs.sql >+++ /dev/null >@@ -1,16 +0,0 @@ >--- biblionumber1 not null otherwise the data is useless >-CREATE TABLE `reading_suggestion` ( >- `biblionumber` int(11) NOT NULL, >- `biblionumber1` int(11) NOT NULL, >- `biblionumber2` int(11) DEFAULT NULL, >- `biblionumber3` int(11) DEFAULT NULL, >- `biblionumber4` int(11) DEFAULT NULL, >- `biblionumber5` int(11) DEFAULT NULL, >- `biblionumber6` int(11) DEFAULT NULL, >- `biblionumber7` int(11) DEFAULT NULL, >- `biblionumber8` int(11) DEFAULT NULL, >- `biblionumber9` int(11) DEFAULT NULL, >- `biblionumber10` int(11) DEFAULT NULL, >- `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, >- PRIMARY KEY (`biblionumber`) >-); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 0aab2ff94e..24cc12f158 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5361,6 +5361,26 @@ CREATE TABLE `zebraqueue` ( > /*!40101 SET character_set_client = @saved_cs_client */; > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > >+DROP TABLE IF EXISTS `reading_suggestion`; >+/*!40101 SET @saved_cs_client = @@character_set_client */; >+/*!40101 SET character_set_client = utf8 */; >+CREATE TABLE `reading_suggestion` ( >+ `biblionumber` int(11) NOT NULL, >+ `biblionumber1` int(11) NOT NULL, >+ `biblionumber2` int(11) DEFAULT NULL, >+ `biblionumber3` int(11) DEFAULT NULL, >+ `biblionumber4` int(11) DEFAULT NULL, >+ `biblionumber5` int(11) DEFAULT NULL, >+ `biblionumber6` int(11) DEFAULT NULL, >+ `biblionumber7` int(11) DEFAULT NULL, >+ `biblionumber8` int(11) DEFAULT NULL, >+ `biblionumber9` int(11) DEFAULT NULL, >+ `biblionumber10` int(11) DEFAULT NULL, >+ `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), >+ PRIMARY KEY (`biblionumber`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+/*!40101 SET character_set_client = @saved_cs_client */; >+ > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; > /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; >-- >2.17.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 18618
:
63496
|
63497
|
64531
|
64960
|
65066
|
65067
|
65068
|
65069
|
65070
|
130706
|
130707
|
130708
|
130709
|
130710
|
130711
|
130712
|
130713
|
130714
|
130715
|
130735
|
130736
|
130737
|
130738
|
130739
|
130740
|
130741
|
130742
|
130743
|
130744
|
132690
|
132691