-- -----------------------------------------------------
-- Create table `#__sr_invoices`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `#__sr_invoices` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `invoice_date` DATETIME NULL ,
  `filename` VARCHAR(255) NULL ,
  `html` LONGTEXT NULL ,
  `sent_on` DATETIME NULL ,
  `invoice_number` INT(11) NULL ,
  `created_date` DATETIME NULL ,
  `created_by` INT(11) NULL ,
  `modified_date` DATETIME NULL ,
  `modified_by` INT(11) NULL ,
  `reservation_id` INT(11) UNSIGNED NOT NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `fk_sr_invoices_sr_reservations1_idx` (`reservation_id` ASC) ,
  CONSTRAINT `fk_sr_invoices_sr_reservations1`
  FOREIGN KEY (`reservation_id` )
  REFERENCES `#__sr_reservations` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
 ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

