diff options
Diffstat (limited to 'lib/sisu/v5/db_drop.rb')
-rw-r--r-- | lib/sisu/v5/db_drop.rb | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/v5/db_drop.rb index 1a76eff9..75e98faa 100644 --- a/lib/sisu/v5/db_drop.rb +++ b/lib/sisu/v5/db_drop.rb @@ -118,14 +118,24 @@ module SiSU_DbDrop else @conn.transaction @drop_table.each do |d| - @conn.execute(d) - end + begin + @conn.exec_params(d) + rescue + next + end + end @conn.commit end - else + when :pg + @conn.transaction @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end + @conn.commit end rescue case @sql_type @@ -135,7 +145,11 @@ module SiSU_DbDrop end else @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end end ensure @@ -145,7 +159,11 @@ module SiSU_DbDrop def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + begin + conn.exec_params(sql) + rescue + next + end end end end |