CREATE TABLE `SERVICE_STATE` (
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_ROOT_DOMAIN_OBJECT` int(11) NOT NULL default '1',
  `STATE` VARCHAR(255) default NULL,
  `CREATION_ENTITY` text,
  `CREATION_ENTITY_DATE` date default NULL,
  `UPDATE_ENTITY` text,
  `UPDATE_ENTITY_DATE` datetime default NULL,
  PRIMARY KEY  (`ID_INTERNAL`),
  KEY `KEY_ROOT_DOMAIN_OBJECT` (`KEY_ROOT_DOMAIN_OBJECT`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO
        SERVICE_STATE (
        KEY_ROOT_DOMAIN_OBJECT,
        STATE,
        CREATION_ENTITY,
        CREATION_ENTITY_DATE)
        VALUE (
        1,
        'TO_PROCESS',
        'SQL_SCRIPT',
        NOW());

INSERT INTO
        SERVICE_STATE (
        KEY_ROOT_DOMAIN_OBJECT,
        STATE,
        CREATION_ENTITY,
        CREATION_ENTITY_DATE)
        VALUE (
        1,
        'TO_DELETE',
        'SQL_SCRIPT',
        NOW());

INSERT INTO
        SERVICE_STATE (
        KEY_ROOT_DOMAIN_OBJECT,
        STATE,
        CREATION_ENTITY,
        CREATION_ENTITY_DATE)
        VALUE (
        1,
        'UP_TO_DATE',
        'SQL_SCRIPT',
        NOW());

