lib/lhm/entangler.rb in lhm-1.1.0 vs lib/lhm/entangler.rb in lhm-1.2.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias +# Copyright (c) 2011 - 2013, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias # Schmidt require 'lhm/command' require 'lhm/sql_helper' @@ -66,24 +66,24 @@ def trigger(type) "lhmt_#{ type }_#{ @origin.name }" end def validate - unless table?(@origin.name) + unless @connection.table_exists?(@origin.name) error("#{ @origin.name } does not exist") end - unless table?(@destination.name) + unless @connection.table_exists?(@destination.name) error("#{ @destination.name } does not exist") end end def before - sql(entangle) + @connection.sql(entangle) end def after - sql(untangle) + @connection.sql(untangle) end def revert after end