From ffabf8b26e90b94fb019988d06dbca26d6aceece Mon Sep 17 00:00:00 2001 From: Yosyp Buchma Date: Tue, 19 Sep 2023 20:56:21 +0300 Subject: [PATCH] coalesce pk.IsPrimaryKey --- generator/mysql/query_set.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/mysql/query_set.go b/generator/mysql/query_set.go index 95d6a93..f886357 100644 --- a/generator/mysql/query_set.go +++ b/generator/mysql/query_set.go @@ -74,7 +74,7 @@ SELECT col.COLUMN_NAME AS "column.Name", col.IS_NULLABLE = "YES" AS "column.IsNullable", col.COLUMN_COMMENT AS "column.Comment", - pk.IsPrimaryKey AS "column.IsPrimaryKey", + COALESCE(pk.IsPrimaryKey, 0) AS "column.IsPrimaryKey", IF (col.COLUMN_TYPE = 'tinyint(1)', 'boolean', IF (col.DATA_TYPE = 'enum',