Bug 23355: (QA follow-up) Add a modal confirm to the cashup action
[koha-equinox.git] / installer / data / mysql / atomicupdate / bug_23355.perl
1 $DBversion = 'XXX';    # will be replaced by the RM
2 if ( CheckVersion($DBversion) ) {
3
4     $dbh->do(qq{
5         CREATE TABLE  IF NOT EXISTS `cash_register_actions` (
6           `id` int(11) NOT NULL auto_increment, -- unique identifier for each account register action
7           `code` varchar(24) NOT NULL, -- action code denoting the type of action recorded (enum),
8           `register_id` int(11) NOT NULL, -- id of cash_register this action belongs to,
9           `manager_id` int(11) NOT NULL, -- staff member performing the action
10           `amount` decimal(28,6) DEFAULT NULL, -- amount recorded in action (signed)
11           `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
12           PRIMARY KEY (`id`),
13           CONSTRAINT `cash_register_actions_manager` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
14           CONSTRAINT `cash_register_actions_register` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
15         ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
16     });
17
18     SetVersion($DBversion);
19     print "Upgrade to $DBversion done (Bug 23355 - Add cash_register_actions table)\n";
20 }