Lines 2717-2726
CREATE TABLE `account_offsets` (
Link Here
|
2717 |
`type` varchar(16) NOT NULL, -- The type of offset this is |
2717 |
`type` varchar(16) NOT NULL, -- The type of offset this is |
2718 |
`amount` decimal(26,6) NOT NULL, -- The amount of the change |
2718 |
`amount` decimal(26,6) NOT NULL, -- The amount of the change |
2719 |
`created_on` timestamp NOT NULL default CURRENT_TIMESTAMP, |
2719 |
`created_on` timestamp NOT NULL default CURRENT_TIMESTAMP, |
|
|
2720 |
`transaction_library` varchar(10) default NULL, -- library where the offset was made |
2720 |
PRIMARY KEY (`id`), |
2721 |
PRIMARY KEY (`id`), |
2721 |
CONSTRAINT `account_offsets_ibfk_p` FOREIGN KEY (`credit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, |
2722 |
CONSTRAINT `account_offsets_ibfk_p` FOREIGN KEY (`credit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, |
2722 |
CONSTRAINT `account_offsets_ibfk_f` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, |
2723 |
CONSTRAINT `account_offsets_ibfk_f` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE, |
2723 |
CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE |
2724 |
CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
2725 |
CONSTRAINT `account_offsets_ibfk_l` FOREIGN KEY (`transaction_library`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE |
2724 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2726 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2725 |
|
2727 |
|
2726 |
-- |
2728 |
-- |
2727 |
- |
|
|