@@ -137,7 +137,7 @@ function mixinDiscovery(PostgreSQL) {
137137 results . map ( function ( r ) {
138138 // PostgreSQL returns ALWAYS in case the property is generated,
139139 // otherwise it returns NEVER
140- if ( r . generated === 'ALWAYS' ) {
140+ if ( r . generated === 'ALWAYS' || r . identityGenerated === 'ALWAYS' ) {
141141 r . generated = true ;
142142 } else {
143143 r . generated = false ;
@@ -173,8 +173,9 @@ function mixinDiscovery(PostgreSQL) {
173173 if ( owner ) {
174174 sql = this . paginateSQL ( 'SELECT table_schema AS "owner", table_name AS "tableName", column_name AS "columnName",'
175175 + 'data_type AS "dataType", character_maximum_length AS "dataLength", numeric_precision AS "dataPrecision",'
176+ + ' numeric_scale AS "dataScale", is_nullable AS "nullable",'
176177 + ' is_generated AS "generated",'
177- + ' numeric_scale AS "dataScale", is_nullable AS "nullable "'
178+ + ' identity_generation AS "identityGenerated "'
178179 + ' FROM information_schema.columns'
179180 + ' WHERE table_schema=\'' + owner + '\''
180181 + ( table ? ' AND table_name=\'' + table + '\'' : '' ) ,
@@ -183,8 +184,9 @@ function mixinDiscovery(PostgreSQL) {
183184 sql = this . paginateSQL ( 'SELECT current_schema() AS "owner", table_name AS "tableName",'
184185 + ' column_name AS "columnName",'
185186 + ' data_type AS "dataType", character_maximum_length AS "dataLength", numeric_precision AS "dataPrecision",'
187+ + ' numeric_scale AS "dataScale", is_nullable AS "nullable",'
186188 + ' is_generated AS "generated",'
187- + ' numeric_scale AS "dataScale", is_nullable AS "nullable "'
189+ + ' identity_generation AS "identityGenerated "'
188190 + ' FROM information_schema.columns'
189191 + ( table ? ' WHERE table_name=\'' + table + '\'' : '' ) ,
190192 'table_name, ordinal_position' , { } ) ;
0 commit comments