Sha256: 56094f4ddc5c267dae27100a58a544ae124b12e069520408fbf75c7af6ee5c64
Contents?: true
Size: 465 Bytes
Versions: 3
Compression:
Stored size: 465 Bytes
Contents
# frozen_string_literal: true module DatabaseFlusher module ActiveRecord class PostgreSQLAdapter < AbstractAdapter private def disable_referential_integrity(*tables) execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER ALL" }.join(";")) yield ensure execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} ENABLE TRIGGER ALL" }.join(";")) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems