create TABLE REGISTRATION_REGIME (
  ID_INTERNAL int(11) NOT NULL auto_increment,
  WHEN_CREATED datetime NOT NULL default '0000-00-00 00:00:00',
  REGIME_TYPE varchar(255) NOT NULL,
  KEY_REGISTRATION INT(11) NOT NULL,
  KEY_EXECUTION_YEAR INT(11) NOT NULL,
  KEY_ROOT_DOMAIN_OBJECT INT(11) NOT NULL DEFAULT '1',
  primary key(ID_INTERNAL),
  unique key KEY_REGISTRATION_EXECUTION_YEAR (KEY_REGISTRATION, KEY_EXECUTION_YEAR),
  index (KEY_REGISTRATION),
  index (KEY_EXECUTION_YEAR),
  index (KEY_ROOT_DOMAIN_OBJECT)
)engine=InnoDB;
