From 1c07669d3798c1313612360719b8ca1cb559be62 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 29 Aug 2009 23:55:44 -0400 Subject: sql, fix, different solutions for postgresql and sqlite to populate database using ruby-dbi --- lib/sisu/v1/db_drop.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v1/db_drop.rb') diff --git a/lib/sisu/v1/db_drop.rb b/lib/sisu/v1/db_drop.rb index bed179b7..258b31c1 100644 --- a/lib/sisu/v1/db_drop.rb +++ b/lib/sisu/v1/db_drop.rb @@ -95,7 +95,9 @@ module SiSU_DB_drop File.unlink(@db_info.sqlite.db) end else - @conn.do(@drop_table.join('')) + @drop_table.each do |d| + @conn.execute(d) + end end rescue case @sql_type @@ -105,7 +107,10 @@ module SiSU_DB_drop if ans and File.exist?(@db_info.sqlite.db); File.unlink(@db_info.sqlite.db) end else - @conn.do(@drop_table.join('')) + @drop_table.each do |d| + @conn.execute(d) + end + #@conn.do(@drop_table.join('')) end ensure #commit -- cgit v1.2.3