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

(-)a/installer/data/mysql/atomicupdate/bug_23321.perl (+21 lines)
Line 0 Link Here
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
4
    $dbh->do(qq{
5
CREATE TABLE `cash_registers` (
6
  `id` int(11) NOT NULL auto_increment, -- unique identifier for each account register
7
  `name` varchar(24) NOT NULL, -- the user friendly identifier for each account register
8
  `description` longtext NOT NULL, -- the user friendly description for each account register
9
  `branch` varchar(10) NOT NULL, -- the foreign key the library this account register belongs
10
  `branch_default` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote that this till is the branch default
11
  `starting_float` decimal(28, 6), -- the starting float this account register should be assigned
12
  `archived` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote if this till is archived or not
13
  PRIMARY KEY (`id`),
14
  UNIQUE KEY `name` (`name`,`branch`),
15
  CONSTRAINT cash_registers_branch FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE CASCADE
16
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
17
    });
18
19
    SetVersion($DBversion);
20
    print "Upgrade to $DBversion done (Bug 23321 - Add cash_registers table)\n";
21
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +18 lines)
Lines 2655-2660 CREATE TABLE `account_offsets` ( Link Here
2655
  CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE
2655
  CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE
2656
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2656
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2657
2657
2658
--
2659
-- Table structure for table `cash_registers`
2660
--
2661
2662
DROP TABLE IF EXISTS `cash_registers`;
2663
CREATE TABLE `cash_registers` (
2664
  `id` int(11) NOT NULL auto_increment, -- unique identifier for each account register
2665
  `name` varchar(24) NOT NULL, -- the user friendly identifier for each account register
2666
  `description` longtext NOT NULL, -- the user friendly description for each account register
2667
  `branch` varchar(10) NOT NULL, -- the foreign key the library this account register belongs
2668
  `branch_default` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote that this till is the branch default
2669
  `starting_float` decimal(28, 6), -- the starting float this account register should be assigned
2670
  `archived` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote if this till is archived or not
2671
  PRIMARY KEY (`id`),
2672
  UNIQUE KEY `name` (`name`,`branch`),
2673
  CONSTRAINT cash_registers_branch FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE CASCADE
2674
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
2675
2658
--
2676
--
2659
-- Table structure for table `action_logs`
2677
-- Table structure for table `action_logs`
2660
--
2678
--
2661
- 

Return to bug 23321