Module: ActiveRecord

Defined in:
lib/version.rb,
lib/activerecord-cockroachdb-adapter.rb,
lib/active_record/relation/query_methods_ext.rb,
lib/active_record/migration/cockroachdb/compatibility.rb,
lib/active_record/connection_adapters/cockroachdb/type.rb,
lib/active_record/connection_adapters/cockroachdb/setup.rb,
lib/active_record/connection_adapters/cockroachdb/column.rb,
lib/active_record/connection_adapters/cockroachdb/quoting.rb,
lib/active_record/connection_adapters/cockroachdb_adapter.rb,
lib/active_record/connection_adapters/cockroachdb/oid/spatial.rb,
lib/active_record/connection_adapters/cockroachdb/oid/interval.rb,
lib/active_record/connection_adapters/cockroachdb/oid/date_time.rb,
lib/active_record/connection_adapters/cockroachdb/schema_dumper.rb,
lib/active_record/connection_adapters/cockroachdb/column_methods.rb,
lib/active_record/connection_adapters/cockroachdb/database_tasks.rb,
lib/active_record/connection_adapters/cockroachdb/schema_creation.rb,
lib/active_record/connection_adapters/cockroachdb/table_definition.rb,
lib/active_record/connection_adapters/cockroachdb/attribute_methods.rb,
lib/active_record/connection_adapters/cockroachdb/schema_statements.rb,
lib/active_record/connection_adapters/cockroachdb/database_statements.rb,
lib/active_record/connection_adapters/cockroachdb/spatial_column_info.rb,
lib/active_record/connection_adapters/cockroachdb/transaction_manager.rb,
lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb

Overview

The PostgresSQL Adapter’s ReferentialIntegrity module can disable and re-enable foreign key constraints by disabling all table triggers. Since triggers are not available in CockroachDB, we have to remove foreign keys and re-add them via the ActiveRecord API.

This module is commonly used to load test fixture data without having to worry about the order in which that data is loaded.

Defined Under Namespace

Modules: CockroachDB, ConnectionAdapters, Type Classes: Base, Migration, Relation

Constant Summary collapse

COCKROACH_DB_ADAPTER_VERSION =
"7.2.0"