Sha256: 203bf2b91a0712a093094e820dc2b5952bdd45378179c53ff904bc8d71541b34
Contents?: true
Size: 701 Bytes
Versions: 41
Compression:
Stored size: 701 Bytes
Contents
# Copyright (c) 2010-2011, Diaspora Inc. This file is # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. # disable_referential_integrity doesn't work when using PostgreSQL # with a non-root user. # See http://kopongo.com/2008/7/25/postgres-ri_constrainttrigger-error module ActiveRecord module ConnectionAdapters class PostgreSQLAdapter < AbstractAdapter def disable_referential_integrity(&block) transaction { begin execute "SET CONSTRAINTS ALL DEFERRED" yield ensure execute "SET CONSTRAINTS ALL IMMEDIATE" end } end end end end
Version data entries
41 entries across 21 versions & 1 rubygems