create table PAYMENT_CODE_MAPPING (
  ID_INTERNAL int(11) NOT NULL auto_increment,
  KEY_ROOT_DOMAIN_OBJECT int(11),
  KEY_EXECUTION_INTERVAL int(11),
  KEY_OLD_PAYMENT_CODE int(11),
  KEY_NEW_PAYMENT_CODE int(11),
  primary key (ID_INTERNAL),
  unique (KEY_EXECUTION_INTERVAL, KEY_OLD_PAYMENT_CODE, KEY_NEW_PAYMENT_CODE),
  index (KEY_ROOT_DOMAIN_OBJECT),
  index (KEY_EXECUTION_INTERVAL),
  index (KEY_OLD_PAYMENT_CODE),
  index (KEY_NEW_PAYMENT_CODE)
) type=InnoDB ;

