-- Alembic Revision: 325de501b4d5

CREATE TABLE `barcodes` (
  `key` bigint(20) NOT NULL AUTO_INCREMENT,
  `menu_item_id` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `price_level_key` bigint(20) DEFAULT NULL,
  `id` varchar(64) COLLATE utf8_bin NOT NULL,
  `code` varchar(128) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`key`),
  KEY `idx_barcodes_price_level` (`price_level_key`),
  KEY `idx_barcodes_menu_item_id` (`menu_item_id`),
  CONSTRAINT `fk_barcodes_menu_item` FOREIGN KEY (`menu_item_id`) REFERENCES `menu_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_barcodes_price_level` FOREIGN KEY (`price_level_key`) REFERENCES `price_levels` (`key`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
