You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
syntax errror when change timestamp column with extra content is current_timestamp #1078
Which driver are you using and version of it (Ex: PostgreSQL 10.0):
MySQL 8.0.13
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81):
204
The steps to reproduce this issue:
1)create a table contains a timestamp column.
2) change the timestamp column extra select to "ON UPDATE CURRENT_TIMESTAMP" ,and close structure window.
3) open the structre window .the timestamp column extra display text is "DEFAULT_GENERATED on update CURRENT_TIMESTAMP" ,and modify any property on this column, pending sql is " ALTER TABLE cmbcar_notification.app_message_push_read CHANGE last_modified_datelast_modified_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP DEFAULT_GENERATED on update CURRENT_TIMESTAMP COMMENT '记录最后更新时间' AFTER created_date;"
the 'DEFAULT_GENERATED' is syntax Chief culprit
Noted: If the bug is related to data, please attach an example SQL data.
Hi @fengyunhe thank you for the feedback. But I'm not sure how to reproduce the issue.
After closing and reopening the structure window, this is what I got:
There is a timestamp type column in the table that is automatically updated when the data is updated, and then changes the name of the column or other columns to allow it to perform DDL update SQL, with syntax errors occurring when saving.
Yes, I did it and it seems to work on my setup. I meant it, there is no DEFAULT_GENERATED how did you get this value? could you please make a gif with gifox.io (it's free) it will help me a lot.
Thank you and have a nice day!
There is a similar problem when setting the default value of the bit type, that is, setting the default value to 0 will succeed, and b’0’ will not save.
Activity
huyphams commentedon Apr 3, 2019
Hi @fengyunhe thank you for the feedback. But I'm not sure how to reproduce the issue.

After closing and reopening the structure window, this is what I got:
fengyunhe commentedon Apr 3, 2019
There is a timestamp type column in the table that is automatically updated when the data is updated, and then changes the name of the column or other columns to allow it to perform DDL update SQL, with syntax errors occurring when saving.
huyphams commentedon Apr 3, 2019
Yes, I did it and it seems to work on my setup. I meant it, there is no
DEFAULT_GENERATEDhow did you get this value? could you please make a gif with gifox.io (it's free) it will help me a lot.Thank you and have a nice day!
fengyunhe commentedon Apr 3, 2019
I will upload a GIF to you this afternoon. It will be time for lunch.
fengyunhe commentedon Apr 3, 2019
There is a similar problem when setting the default value of the bit type, that is, setting the default value to 0 will succeed, and b’0’ will not save.
huyphams commentedon Apr 3, 2019
Excellent @fengyunhe! I fixed it on this build: https://www.dropbox.com/s/0i0ofnhi88vlxz8/TablePlus.dmg?dl=0
I don't know why MySQL includes the DEFAULT_GENERATED in extra value, but anw I fixed it.