diff --git a/lib/discovery.js b/lib/discovery.js index 336a3f3..8136406 100644 --- a/lib/discovery.js +++ b/lib/discovery.js @@ -204,7 +204,8 @@ function mixinDiscovery(MySQL, mysql) { ' numeric_precision AS "dataPrecision",' + ' numeric_scale AS "dataScale",' + ' column_type AS "columnType",' + - ' is_nullable = \'YES\' AS "nullable"' + + ' is_nullable = \'YES\' AS "nullable",' + + ' CASE WHEN extra LIKE \'%auto_increment%\' THEN 1 ELSE 0 END AS generated' ' FROM information_schema.columns' + ' WHERE table_schema=' + mysql.escape(schema) + (table ? ' AND table_name=' + mysql.escape(table) : ''), @@ -217,8 +218,13 @@ function mixinDiscovery(MySQL, mysql) { ' character_maximum_length AS "dataLength",' + ' numeric_precision AS "dataPrecision",' + ' numeric_scale AS "dataScale",' + +<<<<<<< HEAD ' column_type AS "columnType",' + ' is_nullable = \'YES\' AS "nullable"' + +======= + ' is_nullable = \'YES\' AS "nullable",' + + ' CASE WHEN extra LIKE \'%auto_increment%\' THEN 1 ELSE 0 END AS generated' +>>>>>>> b73fd1e... Return if column is generated or not ' FROM information_schema.columns' + (table ? ' WHERE table_name=' + mysql.escape(table) : ''), 'table_name, ordinal_position', {});