From 15fd97671da146f526f25f72b58faab11fdb5ef0 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sun, 22 Jan 2023 16:47:51 +0300 Subject: [PATCH] fix: add proper comment for MariaDB fix Signed-off-by: mertmit --- .../nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts b/packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts index 03d09c9510..69fd0c6417 100644 --- a/packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts +++ b/packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts @@ -671,6 +671,11 @@ class MysqlClient extends KnexClient { column.cdf = response[0][i].cdf; } + // Reference: https://github.com/nocodb/nocodb/issues/4625 + // There is an information_schema difference on MariaDB and MySQL + // while MySQL keeps NULL as default value if no value provided + // MariaDB keeps NULL as string (if you provide a string NULL it is wrapped by single-quotes) + // so we check if database is MariaDB and if so we convert the string NULL to null if (this._version?.version) { if (this._version.version.includes('Maria')) { if (column.cdf === 'NULL') {