The table was actually empty at the time of the altering. The structure was as follows (slightly changed some names):
CREATE TABLE `tablename` ( `objectid` bigint(20) NOT NULL AUTO_INCREMENT, `employeeobjectid` bigint(20) NOT NULL, `clusterobjectid` bigint(20) NOT NULL, `date` date NOT NULL, `durationclienttime` int(11) NOT NULL DEFAULT '0', `durationworked` int(11) NOT NULL DEFAULT '0', `durationcontractfixed` int(11) NOT NULL DEFAULT '0', `durationcontractvar` int(11) NOT NULL DEFAULT '0', `durationtimesheet` int(11) NOT NULL DEFAULT '0', `durationworkedorig` int(11) NOT NULL DEFAULT '0', `durationmodifiediome` int(11) NOT NULL DEFAULT '0', `counterrors` int(11) NOT NULL DEFAULT '0', `countunverified` int(11) NOT NULL DEFAULT '0', `durationtravel` int(11) NOT NULL DEFAULT '0', `durationsickleave` int(11) NOT NULL DEFAULT '0', `durationvacation` int(11) NOT NULL DEFAULT '0', `expenseday` int(11) NOT NULL DEFAULT '0', `expensedistance` int(11) NOT NULL DEFAULT '0', `durationPLBLeave` int(11) NOT NULL DEFAULT '0', `countunverifiedexpenses` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`objectid`), UNIQUE KEY `unique_tablename` (`employeeobjectid`,`date`), KEY `IX_tablename_clusterobjectid_date` (`clusterobjectid`,`date`), KEY `IX_tablename_date` (`date`), CONSTRAINT `tablename_ibfk_1` FOREIGN KEY (`employeeobjectid`) REFERENCES `...` (`objectid`) ON DELETE CASCADE, CONSTRAINT `tablename_ibfk_2` FOREIGN KEY (`clusterobjectid`) REFERENCES `...` (`objectid`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1
The table was actually empty at the time of the altering. The structure was as follows (slightly changed some names):
CREATE TABLE `tablename` ( ctid` bigint(20) NOT NULL, nttime` int(11) NOT NULL DEFAULT '0', ractfixed` int(11) NOT NULL DEFAULT '0', ractvar` int(11) NOT NULL DEFAULT '0', sheet` int(11) NOT NULL DEFAULT '0', edorig` int(11) NOT NULL DEFAULT '0', fiediome` int(11) NOT NULL DEFAULT '0', leave` int(11) NOT NULL DEFAULT '0', tion` int(11) NOT NULL DEFAULT '0', eave` int(11) NOT NULL DEFAULT '0', iedexpenses` int(11) NOT NULL DEFAULT '0', tid`,`date` ), clusterobjectid _date` (`clusterobject id`,`date` ), tid`) REFERENCES `...` (`objectid`) ON DELETE CASCADE,
`objectid` bigint(20) NOT NULL AUTO_INCREMENT,
`employeeobje
`clusterobjectid` bigint(20) NOT NULL,
`date` date NOT NULL,
`durationclie
`durationworked` int(11) NOT NULL DEFAULT '0',
`durationcont
`durationcont
`durationtime
`durationwork
`durationmodi
`counterrors` int(11) NOT NULL DEFAULT '0',
`countunverified` int(11) NOT NULL DEFAULT '0',
`durationtravel` int(11) NOT NULL DEFAULT '0',
`durationsick
`durationvaca
`expenseday` int(11) NOT NULL DEFAULT '0',
`expensedistance` int(11) NOT NULL DEFAULT '0',
`durationPLBL
`countunverif
PRIMARY KEY (`objectid`),
UNIQUE KEY `unique_tablename` (`employeeobjec
KEY `IX_tablename_
KEY `IX_tablename_date` (`date`),
CONSTRAINT `tablename_ibfk_1` FOREIGN KEY (`employeeobjec
CONSTRAINT `tablename_ibfk_2` FOREIGN KEY (`clusterobjectid`) REFERENCES `...` (`objectid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1