[mysqldef] Parse error arround table comment #645
Closed
bigwheel
started this conversation in
Feature requests
Replies: 3 comments
-
|
Here? Lines 704 to 707 in dfaaadb add comment test is here: Lines 352 to 366 in dfaaadb |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Maybe fixed now? This test passed on my local. func TestMysqldefRemoveComment(t *testing.T) {
resetTestDatabase()
createTable := stripHeredoc(`
CREATE TABLE users (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name varchar(40) DEFAULT NULL
) COMMENT='hello world';
`,
)
assertApplyOutput(t, createTable, applyPrefix+createTable)
assertApplyOutput(t, createTable, nothingModified)
createTable = stripHeredoc(`
CREATE TABLE users (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name varchar(40) DEFAULT NULL
);`,
)
assertApplyOutput(t, createTable, applyPrefix+"ALTER TABLE `users` COMMENT = '';\n")
assertApplyOutput(t, createTable, nothingModified)
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Looks like this has been resolved: https://github.com/sqldef/sqldef/blob/master/cmd/mysqldef/tests_tables.yml#L118-L147 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
tested in docker mysql 5.7.
on mysql client cli,
Then, schema.sql is valid.
Beta Was this translation helpful? Give feedback.
All reactions