drop table if exists SNAPSHOT;
create table SNAPSHOT (
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `DAY` timestamp NULL default NULL,
  `KEY_WORK_ITEM` int(11),
  `ESTIMATE` int(11),
  `STATE` text,
  `COMPLETED` timestamp NULL default NULL,
  primary key (ID_INTERNAL),
  unique key u1 (DAY, KEY_WORK_ITEM),
  index (KEY_WORK_ITEM)
) type=InnoDB ;
