TablePlus-Windows
TablePlus-Windows copied to clipboard
Cannot set default to empty
-
Which driver are you using and version of it (Ex: PostgreSQL 10.0): MySQL 8.0.11
-
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 4.1.2 (170)
-
The steps to reproduce this issue:
-
Attempt to Set Value for
column_defaultto empty
-
Attempt to commit change.
-
Error syntax error at position 98 near `COMMENT`
-
Noted: If the bug is related to data, please attach an example SQL data.
Query:
ALTER TABLE `test_data`.`test_table` CHANGE `bit_data` `bit_data` bit(1) NULL DEFAULT COMMENT ''
Query should likely instead be (I don't know what EMPTY's value actually is here)
ALTER TABLE `test_data`.`test_table` CHANGE `bit_data` `bit_data` bit(1) NULL DEFAULT "" COMMENT ''
Update:
This also occurs if a column you are attempting to edit has column_default set to EMPTY. Consider changing behavior to leave out DEFAULT if <data_type> NOT NULL. It also appears that there is no need to have COMMENT if there are no changes to comment.