Fix mariadb HasDefault column.
This commit is contained in:
parent
48ff221747
commit
74f48fc567
1 changed files with 2 additions and 2 deletions
|
|
@ -18,8 +18,8 @@ func (m mySqlQuerySet) GetTablesMetaData(db *sql.DB, schemaName string, tableTyp
|
||||||
SELECT
|
SELECT
|
||||||
t.table_name as "table.name",
|
t.table_name as "table.name",
|
||||||
col.COLUMN_NAME AS "column.Name",
|
col.COLUMN_NAME AS "column.Name",
|
||||||
col.COLUMN_DEFAULT IS NOT NULL AND t.table_type != 'VIEW' as "column.HasDefault",
|
(col.COLUMN_DEFAULT IS NOT NULL AND col.COLUMN_DEFAULT != 'NULL') AND t.table_type != 'VIEW' as "column.HasDefault",
|
||||||
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",
|
||||||
COALESCE(pk.IsPrimaryKey, 0) AS "column.IsPrimaryKey",
|
COALESCE(pk.IsPrimaryKey, 0) AS "column.IsPrimaryKey",
|
||||||
IF (col.COLUMN_TYPE = 'tinyint(1)',
|
IF (col.COLUMN_TYPE = 'tinyint(1)',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue