coalesce pk.IsPrimaryKey

This commit is contained in:
Yosyp Buchma 2023-09-19 20:56:21 +03:00
parent 98dfce2ae5
commit ffabf8b26e

View file

@ -74,7 +74,7 @@ SELECT
col.COLUMN_NAME AS "column.Name", col.COLUMN_NAME AS "column.Name",
col.IS_NULLABLE = "YES" AS "column.IsNullable", col.IS_NULLABLE = "YES" AS "column.IsNullable",
col.COLUMN_COMMENT AS "column.Comment", col.COLUMN_COMMENT AS "column.Comment",
pk.IsPrimaryKey AS "column.IsPrimaryKey", COALESCE(pk.IsPrimaryKey, 0) AS "column.IsPrimaryKey",
IF (col.COLUMN_TYPE = 'tinyint(1)', IF (col.COLUMN_TYPE = 'tinyint(1)',
'boolean', 'boolean',
IF (col.DATA_TYPE = 'enum', IF (col.DATA_TYPE = 'enum',