Lines 2618-2623
CREATE TABLE `accountlines` (
Link Here
|
2618 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
2618 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
2619 |
`note` MEDIUMTEXT NULL default NULL, |
2619 |
`note` MEDIUMTEXT NULL default NULL, |
2620 |
`manager_id` int(11) NULL DEFAULT NULL, |
2620 |
`manager_id` int(11) NULL DEFAULT NULL, |
|
|
2621 |
`register_id` int(11) NULL DEFAULT NULL, |
2621 |
`interface` VARCHAR(16) NOT NULL, |
2622 |
`interface` VARCHAR(16) NOT NULL, |
2622 |
`branchcode` VARCHAR( 10 ) NULL DEFAULT NULL, -- the branchcode of the library where a payment was made, a manual invoice created, etc. |
2623 |
`branchcode` VARCHAR( 10 ) NULL DEFAULT NULL, -- the branchcode of the library where a payment was made, a manual invoice created, etc. |
2623 |
PRIMARY KEY (`accountlines_id`), |
2624 |
PRIMARY KEY (`accountlines_id`), |
Lines 2629-2635
CREATE TABLE `accountlines` (
Link Here
|
2629 |
CONSTRAINT `accountlines_ibfk_borrowers` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2630 |
CONSTRAINT `accountlines_ibfk_borrowers` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2630 |
CONSTRAINT `accountlines_ibfk_items` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2631 |
CONSTRAINT `accountlines_ibfk_items` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2631 |
CONSTRAINT `accountlines_ibfk_borrowers_2` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2632 |
CONSTRAINT `accountlines_ibfk_borrowers_2` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2632 |
CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE |
2633 |
CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2634 |
CONSTRAINT `accountlines_ibfk_registers` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE |
2633 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2635 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2634 |
|
2636 |
|
2635 |
-- |
2637 |
-- |
Lines 2661-2666
CREATE TABLE `account_offsets` (
Link Here
|
2661 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2663 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2662 |
|
2664 |
|
2663 |
-- |
2665 |
-- |
|
|
2666 |
-- Table structure for table `cash_registers` |
2667 |
-- |
2668 |
|
2669 |
DROP TABLE IF EXISTS `cash_registers`; |
2670 |
CREATE TABLE `cash_registers` ( |
2671 |
`id` int(11) NOT NULL auto_increment, -- unique identifier for each account register |
2672 |
`name` varchar(24) NOT NULL, -- the user friendly identifier for each account register |
2673 |
`description` longtext NOT NULL, -- the user friendly description for each account register |
2674 |
`branch` varchar(10) NOT NULL, -- the foreign key the library this account register belongs |
2675 |
`branch_default` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote that this till is the branch default |
2676 |
`starting_float` decimal(28, 6), -- the starting float this account register should be assigned |
2677 |
`archived` tinyint(1) NOT NULL DEFAULT 0, -- boolean flag to denote if this till is archived or not |
2678 |
PRIMARY KEY (`id`), |
2679 |
UNIQUE KEY `name` (`name`,`branch`), |
2680 |
CONSTRAINT cash_registers_branch FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE CASCADE |
2681 |
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; |
2682 |
|
2683 |
-- |
2664 |
-- Table structure for table `action_logs` |
2684 |
-- Table structure for table `action_logs` |
2665 |
-- |
2685 |
-- |
2666 |
|
2686 |
|
2667 |
- |
|
|