[openxs@chief p5.5]$ bin/mysql --no-defaults test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.39-36.0 MySQL Community Server (GPL)
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
It seems we still miss something here:
[openxs@chief p5.5]$ bin/mysql --no-defaults test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.39-36.0 MySQL Community Server (GPL)
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table tpk1(id bigint(20) primary key, c1 int) engine=InnoDB;
Query OK, 0 rows affected (0.14 sec)
mysql> create table tpk2(id bigint(20) primary key, c1 int) engine=InnoDB;
Query OK, 0 rows affected (0.08 sec)
mysql> CREATE TABLE `tablename` ( time` int(11) NOT NULL DEFAULT '0', ctfixed` int(11) NOT NULL DEFAULT '0', ctvar` int(11) NOT NULL DEFAULT '0', orig` int(11) NOT NULL DEFAULT '0', ediome` int(11) NOT NULL DEFAULT '0', dexpenses` int(11) NOT NULL DEFAULT '0', tid`,`date` ), clusterobjectid _date` (`clusterobject id`,`date` ), tid`) REFERENCES `tpk1` (`id`) ON DELETE CASCADE,
-> `objectid` bigint(20) NOT NULL AUTO_INCREMENT,
-> `employeeobjectid` bigint(20) NOT NULL,
-> `clusterobjectid` bigint(20) NOT NULL,
-> `date` date NOT NULL,
-> `durationclient
-> `durationworked` int(11) NOT NULL DEFAULT '0',
-> `durationcontra
-> `durationcontra
-> `durationtimesheet` int(11) NOT NULL DEFAULT '0',
-> `durationworked
-> `durationmodifi
-> `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',
-> `countunverifie
-> 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 `tpk2` (`id`) ON DELETE CASCADE
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.10 sec)
mysql> alter table `tablename` add version bigint not null default '0';
Query OK, 0 rows affected (0.17 sec)
Records: 0 Duplicates: 0 Warnings: 0
No assertion failures. Please, send your my.cnf file content to double check.