CREATE TABLE link_cache (id INT UNSIGNED AUTO_INCREMENT NOT NULL, params BLOB DEFAULT NULL, url VARCHAR(255) DEFAULT NULL, tstamp DATETIME DEFAULT CURRENT_TIMESTAMP, crdatetime DATETIME DEFAULT NULL, sticky SMALLINT UNSIGNED DEFAULT 0, INDEX url (url(255)), INDEX params (params(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
CREATE TABLE link_oldlinks (id INT UNSIGNED AUTO_INCREMENT NOT NULL, link_id INT UNSIGNED DEFAULT 0 NOT NULL, url VARCHAR(255) DEFAULT NULL, tstamp DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, sticky SMALLINT UNSIGNED DEFAULT 0, UNIQUE INDEX id (id), INDEX url (url(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
after execute:
Database update failed
Error: Invalid default value for 'tstamp'
Compare current database with specification says:
CREATE TABLE
link_cache
(id
INT UNSIGNED AUTO_INCREMENT NOT NULL,params
BLOB DEFAULT NULL,url
VARCHAR(255) DEFAULT NULL,tstamp
DATETIME DEFAULT CURRENT_TIMESTAMP,crdatetime
DATETIME DEFAULT NULL,sticky
SMALLINT UNSIGNED DEFAULT 0, INDEXurl
(url(255)), INDEXparams
(params(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDBCREATE TABLE
link_oldlinks
(id
INT UNSIGNED AUTO_INCREMENT NOT NULL,link_id
INT UNSIGNED DEFAULT 0 NOT NULL,url
VARCHAR(255) DEFAULT NULL,tstamp
DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,sticky
SMALLINT UNSIGNED DEFAULT 0, UNIQUE INDEXid
(id), INDEXurl
(url(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDBafter execute: Database update failed Error: Invalid default value for 'tstamp'
PHP-Version: 5.6.30 Mysql: 5.5.55 Typo3: 8.7.1
Thanks