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: knex@3.0.1
Database + version: mysql2@3.6.2 | MySQL 8.3.0
OS: mac m2
Bug
Explain what kind of behaviour you are getting and how you think it should do
Error message
Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
awaitknex.schema.alterTable(tableName,async(table)=>{debug(`renaming column ${full.columnName} to ${short.columnName}`);table.renameColumn(full.columnName,short.columnName);});
Error:
error="incompatible type for default value: error: 'NULL' is not a valid value for 'double'"
query="alter table `admin_permissions_role_links` change `permission_order` `permission_ord` double NULL DEFAULT 'NULL'"
This query fails in raw SQL, likely because the 'null' in quotes
mysql> create table t (i int);
Query OK, 0 rows affected (0.0198 sec)
mysql> alter table t change i double null default 'null';
ERROR: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'double null default 'null'' at line 1
mysql> alter table t change i ii double null default 'null';
ERROR: 1067: Invalid default value for 'ii'
(working without quotes)
mysql> alter table t change i ii double null default null;
Query OK, 0 rows affected (0.0300 sec)
Records: 0 Duplicates: 0 Warnings: 0
The text was updated successfully, but these errors were encountered:
Environment
Knex version:
knex@3.0.1
Database + version:
mysql2@3.6.2
|MySQL 8.3.0
OS: mac m2
Bug
Explain what kind of behaviour you are getting and how you think it should do
Error message
Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
I'm getting an error from a migration that happens here: https://github.com/strapi/strapi/blob/cb634392313a5a8089523ac32c51e41326dc579b/packages/core/database/src/migrations/internal-migrations/5.0.0-01-convert-identifiers-long-than-max-length.ts#L47
snippet:
Error:
This query fails in raw SQL, likely because the
'null'
in quotes(working without quotes)
The text was updated successfully, but these errors were encountered: