-- Alembic Revision db875614d5cf

CREATE TABLE `payment_processors` (
  `_cache_id` varchar(128) COLLATE utf8_bin NOT NULL,
  `id` varchar(64) COLLATE utf8_bin NOT NULL,
  `name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`_cache_id`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE `merchants` (
  `_cache_id` varchar(128) COLLATE utf8_bin NOT NULL,
   `id` varchar(64) COLLATE utf8_bin NOT NULL,
   `name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
   `merchant_id` varchar(64) COLLATE utf8_bin DEFAULT NULL,
   `payment_processor_id` varchar(64) collate utf8_bin NOT null,
   PRIMARY KEY (`_cache_id`, `id`),
    CONSTRAINT `fk_merchants_payment_processor` FOREIGN KEY (`_cache_id`, `payment_processor_id`)
        REFERENCES `payment_processors` (`_cache_id`, `id`) on delete cascade on update cascade
) engine=InnoDB default charset=utf8 collate=utf8_bin;
