# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
-$VERSION = "19.12.00.083";
+$VERSION = "19.12.00.084";
sub version {
return $VERSION;
+++ /dev/null
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
- unless ( TableExists('advanced_editor_macros') ) {
- $dbh->do(q|
- CREATE TABLE advanced_editor_macros (
- id INT(11) NOT NULL AUTO_INCREMENT,
- name varchar(80) NOT NULL,
- macro longtext NULL,
- borrowernumber INT(11) default NULL,
- shared TINYINT(1) default 0,
- PRIMARY KEY (id),
- CONSTRAINT borrower_macro_fk FOREIGN KEY ( borrowernumber ) REFERENCES borrowers ( borrowernumber ) ON UPDATE CASCADE ON DELETE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;|
- );
- }
- $dbh->do(q|
- INSERT IGNORE INTO permissions (module_bit, code, description)
- VALUES (9, 'create_shared_macros', 'Create public macros')
- |);
- $dbh->do(q|
- INSERT IGNORE INTO permissions (module_bit, code, description)
- VALUES (9, 'delete_shared_macros', 'Delete public macros')
- |);
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 17682 - Add macros db table and permissions)\n";
-}
WHERE category_name IN ('branches', 'itemtypes', 'cn_source')
|);
- # Always end with this (adjust the bug info)
NewVersion( $DBversion, 17355, "Add is_system to authorised_value_categories table");
}
+$DBversion = '19.12.00.084';
+if( CheckVersion( $DBversion ) ) {
+ unless ( TableExists('advanced_editor_macros') ) {
+ $dbh->do(q|
+ CREATE TABLE advanced_editor_macros (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ name varchar(80) NOT NULL,
+ macro longtext NULL,
+ borrowernumber INT(11) default NULL,
+ shared TINYINT(1) default 0,
+ PRIMARY KEY (id),
+ CONSTRAINT borrower_macro_fk FOREIGN KEY ( borrowernumber ) REFERENCES borrowers ( borrowernumber ) ON UPDATE CASCADE ON DELETE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;|
+ );
+ }
+ $dbh->do(q|
+ INSERT IGNORE INTO permissions (module_bit, code, description)
+ VALUES (9, 'create_shared_macros', 'Create public macros')
+ |);
+ $dbh->do(q|
+ INSERT IGNORE INTO permissions (module_bit, code, description)
+ VALUES (9, 'delete_shared_macros', 'Delete public macros')
+ |);
+
+ NewVersion( $DBversion, 17682, "Add macros db table and permissions");
+}
+
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';