@@ -137,7 +137,7 @@ function mixinDiscovery(PostgreSQL) {
137
137
results . map ( function ( r ) {
138
138
// PostgreSQL returns ALWAYS in case the property is generated,
139
139
// otherwise it returns NEVER
140
- if ( r . generated === 'ALWAYS' ) {
140
+ if ( r . generated === 'ALWAYS' || r . identityGenerated === 'ALWAYS' ) {
141
141
r . generated = true ;
142
142
} else {
143
143
r . generated = false ;
@@ -173,8 +173,9 @@ function mixinDiscovery(PostgreSQL) {
173
173
if ( owner ) {
174
174
sql = this . paginateSQL ( 'SELECT table_schema AS "owner", table_name AS "tableName", column_name AS "columnName",'
175
175
+ 'data_type AS "dataType", character_maximum_length AS "dataLength", numeric_precision AS "dataPrecision",'
176
+ + ' numeric_scale AS "dataScale", is_nullable AS "nullable",'
176
177
+ ' is_generated AS "generated",'
177
- + ' numeric_scale AS "dataScale", is_nullable AS "nullable "'
178
+ + ' identity_generation AS "identityGenerated "'
178
179
+ ' FROM information_schema.columns'
179
180
+ ' WHERE table_schema=\'' + owner + '\''
180
181
+ ( table ? ' AND table_name=\'' + table + '\'' : '' ) ,
@@ -183,8 +184,9 @@ function mixinDiscovery(PostgreSQL) {
183
184
sql = this . paginateSQL ( 'SELECT current_schema() AS "owner", table_name AS "tableName",'
184
185
+ ' column_name AS "columnName",'
185
186
+ ' data_type AS "dataType", character_maximum_length AS "dataLength", numeric_precision AS "dataPrecision",'
187
+ + ' numeric_scale AS "dataScale", is_nullable AS "nullable",'
186
188
+ ' is_generated AS "generated",'
187
- + ' numeric_scale AS "dataScale", is_nullable AS "nullable "'
189
+ + ' identity_generation AS "identityGenerated "'
188
190
+ ' FROM information_schema.columns'
189
191
+ ( table ? ' WHERE table_name=\'' + table + '\'' : '' ) ,
190
192
'table_name, ordinal_position' , { } ) ;
0 commit comments