5 description => "Add new table item_editor_templates",
8 my ($dbh, $out) = @$args{qw(dbh out)};
10 unless( TableExists( 'item_editor_templates' ) ) {
12 CREATE TABLE `item_editor_templates` (
13 `id` INT(11) NOT NULL auto_increment COMMENT "id for the template",
14 `patron_id` int(11) DEFAULT NULL COMMENT "creator of this template",
15 `name` MEDIUMTEXT NOT NULL COMMENT "template name",
16 `is_shared` TINYINT(1) NOT NULL DEFAULT 0 COMMENT "controls if template is shared",
17 `contents` LONGTEXT NOT NULL COMMENT "json encoded template data",
19 CONSTRAINT `bn` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
20 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
24 INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
25 ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others');