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
Knex version: 0.95.14
Database + version: 10.4.22-MariaDB
OS: Windows
Bug
Explain what kind of behaviour you are getting and how you think it should do
When running a migration that have a column/table comment with more than 60 characters the following message appears: "The max length for a table comment is 60 characters"
This message shows multiple times since we have some columns with long comments. It shouldn't trigger any warning since mysql and mariaDB maximum length is 1024 characters (a long time ago was 60).
MySQL Documentation
COMMENT
A comment for a column can be specified with the COMMENT option, up to 1024 characters long. The comment is displayed by the SHOW CREATE TABLE and SHOW FULL COLUMNS statements.
COMMENT Column Option
You can provide a comment for each column using the COMMENT clause. The maximum length is 1024 characters. Use the SHOW FULL COLUMNS statement to see column comments.
This warning appears because of the following code:
'The max length for a table comment is 60 characters'
);
Error message
No error message, only a warning every time that a comment with >60 characters appear.
"The max length for a table comment is 60 characters"
Reduced test code
return knex.schema
.createTable('table', (table) => {
table.comment('A big comment. If we write more than 60 characters here it shouldn't trigger any warning since mysql and mariaDB maximum length is 1024 characters. Please fix this warning, it's annoying when a migration is taking place with multiple long comments.');
})
The text was updated successfully, but these errors were encountered:
Environment
Knex version: 0.95.14
Database + version: 10.4.22-MariaDB
OS: Windows
Bug
When running a migration that have a column/table comment with more than 60 characters the following message appears:
"The max length for a table comment is 60 characters"
This message shows multiple times since we have some columns with long comments. It shouldn't trigger any warning since mysql and mariaDB maximum length is 1024 characters (a long time ago was 60).
MySQL Documentation
MariaDB Documentation
https://mariadb.com/kb/en/create-table/#comment-column-option
This warning appears because of the following code:
knex/lib/dialects/mysql/schema/mysql-tablecompiler.js
Lines 45 to 48 in 27ade6f
Error message
No error message, only a warning every time that a comment with >60 characters appear.
"The max length for a table comment is 60 characters"
Reduced test code
The text was updated successfully, but these errors were encountered: