CREATE TABLE IF NOT EXISTS `#__sr_experience_invoices` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_date` datetime DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `html` longtext,
  `sent_on` datetime DEFAULT NULL,
  `invoice_number` int(11) DEFAULT NULL,
  `created_date` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `modified_date` datetime DEFAULT NULL,
  `modified_by` int(11) DEFAULT NULL,
  `reservation_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `invoice_number_UNIQUE` (`invoice_number`),
  KEY `fk_sr_experience_invoices_sr_reservations_idx` (`reservation_id`),
  CONSTRAINT `fk_sr_experience_invoices_sr_reservations`
  FOREIGN KEY (`reservation_id`)
  REFERENCES `#__sr_experience_reservations` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;