Can't save CURRENT_TIMESTAMP ON UPDATE of type field DATETIME
Can't save CURRENT_TIMESTAMP ON UPDATE
Perhaps you could post what HeidiSQL shows in the bottom SQL log. I just tried to reproduce that, and added an ON UPDATE clause:
ALTER TABLE `test_table` CHANGE COLUMN `ts` `ts` TIMESTAMP NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP() AFTER `field1`;
And the table designer shows that afterwards:
Perhaps the detection is still wrong, for that particular server version.
I see you're on MySQL 8.0.19, and I tested the same on MySQL 8.0.11, but it works as expected here.
Could you please post the result of the following query:
SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA='uszn_group' AND TABLE_NAME='allowance_obrashenie_tmp' ORDER BY ORDINAL_POSITION;
Yes, I see "DEFAULT_GENERATED on update CURRENT_TIMESTAMP"
Make regular expressions for detecting attributes in EXTRA column of IS.COLUMNS slightly more lose, so a "default_generated" does not break detection of "on update ...". Also allow case insensitive searching. See https://www.heidisql.com/forum.php?t=36100
Forgotten file change for previous commit. See https://www.heidisql.com/forum.php?t=36100
Please login to leave a reply, or register at first.