Reputation: 19
I am using this schema on localhost wamp MySQL server and it works fine:
CREATE TABLE `tblcustomers` (
`customerid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`customername` varchar(50) NOT NULL,
`customerphone` varchar(11) DEFAULT NULL,
`customeraddress` varchar(255) DEFAULT NULL,
`registrationdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `credid` (`customerid`),
UNIQUE KEY `credname` (`customername`),
UNIQUE KEY `customerid` (`customerid`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=latin1;
MySQL said: Documentation
#1067 - Invalid default value for 'registrationdate'
When I import the dump file on online server I get the message above. How to deal with it?
Upvotes: 0
Views: 64
Reputation: 8881
change datatype for registrationdate
FROM DATETIME
to TIMESTAMP
and you should be through
Upvotes: 1