-- alembic revision 5fba58ed286f

ALTER TABLE `send_items_candidates`
    ADD INDEX `idx-send_items_candidates-id` (_cache_id, id);

CREATE TABLE `send_items_candidate_items` (
  `_cache_id` varchar(128) COLLATE utf8_bin NOT NULL,
  `key` bigint(20) NOT NULL AUTO_INCREMENT,
  `send_items_candidate_id` bigint(20) NOT NULL,
  `ticket_item_id` varchar(64) COLLATE utf8_bin NOT NULL,
  `item_order_mode_id` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`key`,`_cache_id`),
  KEY `fk-send_items_candidate_items-send_items_candidates` (`_cache_id`,`send_items_candidate_id`),
  KEY `idx-send_items_candidate_items-ticket_item_id` (`_cache_id`,`ticket_item_id`),
  CONSTRAINT `fk-send_items_candidate_items-send_items_candidates` FOREIGN KEY (`_cache_id`, `send_items_candidate_id`)
    REFERENCES `send_items_candidates` (`_cache_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
