CREATE TABLE `acc_payments` (
  `ap_id` int(11) NOT NULL,
  `ap_type` int(11) NOT NULL,
  `ap_ref_id` int(11) NOT NULL,
  `ap_account` int(11) NOT NULL,
  `ap_amount` decimal(11,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `acc_payments`
  ADD PRIMARY KEY (`ap_id`);
ALTER TABLE `acc_payments`
  MODIFY `ap_id` int(11) NOT NULL AUTO_INCREMENT;
