lib/lhm/atomic_switcher.rb in lhm-2.1.0 vs lib/lhm/atomic_switcher.rb in lhm-2.2.0
- old
+ new
@@ -27,11 +27,11 @@
atomic_switch
end
def atomic_switch
[
- "rename table `#{ @origin.name }` to `#{ @migration.archive_name }`, " +
+ "rename table `#{ @origin.name }` to `#{ @migration.archive_name }`, " \
"`#{ @destination.name }` to `#{ @origin.name }`"
]
end
def validate
@@ -40,9 +40,10 @@
error "`#{ @origin.name }` and `#{ @destination.name }` must exist"
end
end
private
+
def execute
@connection.sql(statements)
end
end
end