View | Details | Raw Unified | Return to bug 14233
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_14233.perl (+20 lines)
Line 0 Link Here
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
4
    if ( !column_exists( 'letter', 'id' ) ) {
5
        $dbh->do(q{ALTER TABLE letter DROP PRIMARY KEY});
6
        $dbh->do(
7
q{ALTER TABLE letter ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST}
8
        );
9
        $dbh->do(
10
q{ALTER TABLE letter ADD UNIQUE KEY letter_uniq_1 (`module`,`code`,`branchcode`,`message_transport_type`,`lang`)}
11
        );
12
    }
13
14
    $dbh->do(q{
15
        INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
16
        VALUES ('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo')
17
    });
18
19
    NewVersion( $DBversion, 14233, "Add id field to letter table" );
20
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 3260-3265 DROP TABLE IF EXISTS `letter`; Link Here
3260
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3260
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3261
/*!40101 SET character_set_client = utf8 */;
3261
/*!40101 SET character_set_client = utf8 */;
3262
CREATE TABLE `letter` (
3262
CREATE TABLE `letter` (
3263
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key identifier',
3263
  `module` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Koha module that triggers this notice or slip',
3264
  `module` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Koha module that triggers this notice or slip',
3264
  `code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'unique identifier for this notice or slip',
3265
  `code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'unique identifier for this notice or slip',
3265
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch this notice or slip is used at (branches.branchcode)',
3266
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch this notice or slip is used at (branches.branchcode)',
Lines 3270-3276 CREATE TABLE `letter` ( Link Here
3270
  `message_transport_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'email' COMMENT 'transport type for this notice',
3271
  `message_transport_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'email' COMMENT 'transport type for this notice',
3271
  `lang` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'lang of the notice',
3272
  `lang` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'lang of the notice',
3272
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'last modification',
3273
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'last modification',
3273
  PRIMARY KEY (`module`,`code`,`branchcode`,`message_transport_type`,`lang`),
3274
  PRIMARY KEY (`id`),
3275
  UNIQUE KEY `letter_uniq_1` (`module`,`code`,`branchcode`,`message_transport_type`,`lang`),
3274
  KEY `message_transport_type_fk` (`message_transport_type`),
3276
  KEY `message_transport_type_fk` (`message_transport_type`),
3275
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
3277
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
3276
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3278
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 353-358 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
353
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
353
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
354
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
354
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
355
('NoticeCSS','',NULL,'Notices CSS url.','free'),
355
('NoticeCSS','',NULL,'Notices CSS url.','free'),
356
('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo'),
356
('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'),
357
('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'),
357
('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content.  Requires Novelist Profile and Password','YesNo'),
358
('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content.  Requires Novelist Profile and Password','YesNo'),
358
('NovelistSelectPassword','',NULL,'Novelist select user Password','free'),
359
('NovelistSelectPassword','',NULL,'Novelist select user Password','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (-1 / +6 lines)
Lines 90-95 Logging: Link Here
90
                  1: Log
90
                  1: Log
91
                  0: "Don't log"
91
                  0: "Don't log"
92
            - " successful authentications."
92
            - " successful authentications."
93
        -
94
            - pref: NoticesLog
95
              choices:
96
                  on: Log
97
                  off: "Don't log"
98
            - " changes to notice templates."
93
99
94
    Debugging:
100
    Debugging:
95
        -
101
        -
96
- 

Return to bug 14233