CREATE TABLE IF NOT EXISTS `PaymentBill` (
  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  amount DECIMAL(9,2) UNSIGNED,
  date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

ALTER TABLE `PaymentBill` AUTO_INCREMENT=120;

CREATE TABLE IF NOT EXISTS `PaymentBillHasInvoiceNew` (
  paymentBillId INT(10) UNSIGNED NOT NULL,
  invoiceNewId INT(10) UNSIGNED NOT NULL,
  CONSTRAINT fk_paymentBillId_paymentBill
  FOREIGN KEY (`paymentBillId`) REFERENCES `PaymentBill`( `id` )
    on delete no action on update no action,
  CONSTRAINT fk_paymentBillId_invoiceNewId
  FOREIGN KEY (`invoiceNewId`) REFERENCES Document(`id`)
    on delete no action on update no action
)