text: SELECT DISTINCT
      TABLES.TABLE_SCHEMA AS '$database',
      TABLES.TABLE_NAME AS '$table',
      # TABLES.TABLE_TYPE AS '$tableType',
      COLUMNS.COLUMN_NAME AS '$column',
      COLUMNS.COLUMN_TYPE AS '$columnType',
      COLUMNS.IS_NULLABLE AS '$isColumnNullable',
      COLUMNS.COLUMN_DEFAULT AS '$defaultColumnValue',
      COLUMNS.EXTRA AS '$extraColumnInformation',
      COLUMNS.ORDINAL_POSITION AS '$ordinalColumnPosition',
      COLUMNS.CHARACTER_MAXIMUM_LENGTH AS '$maximumCharactersLength',
      IF(LOCATE(' unsigned', COLUMNS.COLUMN_TYPE) > 0,1,0) AS '$isUnsigned',
      COLUMNS.EXTRA LIKE '%auto_increment%' AS '$isAutoIncrement',
      KEY_COLUMN_USAGE.CONSTRAINT_NAME AS '$boundConstraint',
      KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME AS '$referencedTable',
      KEY_COLUMN_USAGE.REFERENCED_COLUMN_NAME AS '$referencedColumn'
  FROM INFORMATION_SCHEMA.TABLES
  LEFT JOIN INFORMATION_SCHEMA.COLUMNS ON 
      COLUMNS.TABLE_SCHEMA = TABLES.TABLE_SCHEMA AND
      COLUMNS.TABLE_NAME = TABLES.TABLE_NAME
  LEFT JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE ON
      KEY_COLUMN_USAGE.TABLE_SCHEMA = TABLES.TABLE_SCHEMA AND 
      KEY_COLUMN_USAGE.TABLE_NAME = TABLES.TABLE_NAME AND
      KEY_COLUMN_USAGE.COLUMN_NAME = COLUMNS.COLUMN_NAME
  WHERE
      TABLES.TABLE_SCHEMA = '${DATABASE_NAME}' AND
      TABLES.TABLE_TYPE = 'BASE TABLE'
  ORDER BY TABLES.TABLE_SCHEMA ASC, TABLES.TABLE_NAME ASC, COLUMNS.COLUMN_NAME ASC;