Skip to content

Commit a2ee747

Browse files
cockroach removed access to crdb_internal after v25. Fixed introspect
1 parent e933a2c commit a2ee747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drizzle-kit/src/dialects/cockroach/introspect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ export const fromDatabase = async (
509509
FROM
510510
pg_attribute attr
511511
LEFT JOIN pg_class cls ON cls.oid = attr.attrelid
512-
LEFT JOIN crdb_internal.table_columns tc ON tc.descriptor_id = attrelid AND tc.column_name = attname
512+
LEFT JOIN information_schema.columns tc ON tc.table_schema = cls.relnamespace::regnamespace::text AND tc.table_name = cls.relname AND tc.column_name = attname
513513
LEFT JOIN pg_type typ ON typ.oid = attr.atttypid
514514
WHERE
515515
${filterByTableAndViewIds ? ` attrelid in ${filterByTableAndViewIds}` : 'false'}

0 commit comments

Comments
 (0)