CREATE TABLE `ASSIDUOUSNESS_RECORD` (
    `ID_INTERNAL` int(11) unsigned NOT NULL auto_increment,
    `ACK_OPT_LOCK` int(11) unsigned NOT NULL default '1',
    `KEY_ASSIDUOUSNESS` int(11) unsigned NOT NULL,
	`DATE` TIMESTAMP NOT NULL,
	`DURATION` BIGINT,
	`NOTES` VARCHAR(255),
	`STATE` VARCHAR(50),
	`ORACLE_SEQUENCE` int(11) unsigned NOT NULL,
	`OJB_CONCRETE_CLASS` varchar(255),
    `KEY_JUSTIFICATION_MOTIVE` int(11) unsigned,
    `LAST_MODIFIED_DATE` TIMESTAMP,
	`KEY_MODIFIED_BY` int(11) unsigned,
	`KEY_ANULATION` int(11) unsigned,
	`KEY_ASSIDUOUSNESS_RECORD` int(11) unsigned,
    `KEY_CLOCK_UNIT` int(11) unsigned,
    KEY_ROOT_DOMAIN_OBJECT int(11) not null default 1,
    PRIMARY KEY  (`ID_INTERNAL`)
)  ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE ass_FUNCIONARIO MODIFY COLUMN KEY_ASSIDUOUSNESS int(11) unsigned DEFAULT NULL;
update 	ass_FUNCIONARIO set KEY_ASSIDUOUSNESS=NULL;
ALTER TABLE ass_FUNCIONARIO ADD COLUMN CREATION_DATE DATETIME NOT NULL DEFAULT '2006-01-01 00:00:00';