Sha256: 28de6e7b7ebcd9fc7ffd031dad1f69b0cf1c9ead58c4fcbf38b813cd676a2d4c
Contents?: true
Size: 573 Bytes
Versions: 11
Compression:
Stored size: 573 Bytes
Contents
if Rails::VERSION::MAJOR < 4 #Fix fixtures with foreign keys, fixed in Rails4 class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter def disable_referential_integrity #:nodoc: if supports_disable_referential_integrity? execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER USER" }.join(";")) end yield ensure if supports_disable_referential_integrity? execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} ENABLE TRIGGER USER" }.join(";")) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems