@@ -340,6 +340,22 @@ def get_indexes(self, conn, table_name, schema=None, **kw):
340340 )
341341 return result
342342
343+ def get_multi_indexes (
344+ self , connection , schema , filter_names , scope , kind , ** kw
345+ ):
346+ result = super ().get_multi_indexes (
347+ connection , schema , filter_names , scope , kind , ** kw
348+ )
349+ if schema is None :
350+ result = dict (result )
351+ for k in [
352+ (None , "spatial_ref_sys" ),
353+ (None , "geometry_columns" ),
354+ (None , "geography_columns" ),
355+ ]:
356+ result .pop (k , None )
357+ return result
358+
343359 def get_foreign_keys_v1 (self , conn , table_name , schema = None , ** kw ):
344360 fkeys = []
345361 FK_REGEX = re .compile (r"(?P<referred_table>.+)?\.\[(?P<referred_columns>.+)?]" )
@@ -506,6 +522,20 @@ def get_pk_constraint(self, conn, table_name, schema=None, **kw):
506522 res ["name" ] = pk ["name" ]
507523 return res
508524
525+ def get_multi_pk_constraint (self , connection , schema , filter_names , scope , kind , ** kw ):
526+ result = super ().get_multi_pk_constraint (
527+ connection , schema , filter_names , scope , kind , ** kw
528+ )
529+ if schema is None :
530+ result = dict (result )
531+ for k in [
532+ (None , "spatial_ref_sys" ),
533+ (None , "geometry_columns" ),
534+ (None , "geography_columns" ),
535+ ]:
536+ result .pop (k , None )
537+ return result
538+
509539 def get_unique_constraints (self , conn , table_name , schema = None , ** kw ):
510540 if self ._is_v21plus :
511541 return super ().get_unique_constraints (conn , table_name , schema , ** kw )
@@ -524,13 +554,21 @@ def get_unique_constraints(self, conn, table_name, schema=None, **kw):
524554 res .append (index )
525555 return res
526556
527- def get_check_constraints (self , conn , table_name , schema = None , ** kw ):
528- if self ._is_v21plus :
529- return super ().get_check_constraints (conn , table_name , schema , ** kw )
530- # TODO(bdarnell): The postgres dialect implementation depends on
531- # pg_table_is_visible, which is supported in cockroachdb 1.1
532- # but not in 1.0. Figure out a versioning strategy.
533- return []
557+ def get_multi_check_constraints (
558+ self , connection , schema , filter_names , scope , kind , ** kw
559+ ):
560+ result = super ().get_multi_check_constraints (
561+ connection , schema , filter_names , scope , kind , ** kw
562+ )
563+ if schema is None :
564+ result = dict (result )
565+ for k in [
566+ (None , "spatial_ref_sys" ),
567+ (None , "geometry_columns" ),
568+ (None , "geography_columns" ),
569+ ]:
570+ result .pop (k , None )
571+ return result
534572
535573 def do_savepoint (self , connection , name ):
536574 # Savepoint logic customized to work with run_transaction().
0 commit comments