aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/db_drop.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-05-18 08:49:03 -0400
committerRalph Amissah <ralph@amissah.com>2014-05-18 08:49:03 -0400
commit307ecb4df591aa675b71839014debf6e81d462e1 (patch)
tree647e6738bc5868f09c62e07cc03c45ab64e3c1cd /lib/sisu/v5/db_drop.rb
parentv6: utils, add ok code marker (diff)
v5 v6: db, use symbols to identify sql engine
Diffstat (limited to 'lib/sisu/v5/db_drop.rb')
-rw-r--r--lib/sisu/v5/db_drop.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/v5/db_drop.rb
index b1ff634e..1a76eff9 100644
--- a/lib/sisu/v5/db_drop.rb
+++ b/lib/sisu/v5/db_drop.rb
@@ -64,11 +64,11 @@
module SiSU_DbDrop
class Drop
require_relative 'response' # response.rb
- def initialize(opt,conn,db_info,sql_type='')
+ def initialize(opt,conn,db_info,sql_type)
@opt,@conn,@db_info,@sql_type=opt,conn,db_info,sql_type
@ans=SiSU_Response::Response.new
case @sql_type
- when /sqlite/
+ when :sqlite
cascade=''
else
cascade='CASCADE'
@@ -87,7 +87,7 @@ module SiSU_DbDrop
begin
msg_sqlite="as not all disk space is recovered after dropping the database << #{@db_info.sqlite.db} >>, you may be better off deleting the file, and recreating it as necessary"
case @sql_type
- when /sqlite/
+ when :sqlite
puts msg_sqlite
ans=@ans.response?('remove sql database?')
if ans \
@@ -129,7 +129,7 @@ module SiSU_DbDrop
end
rescue
case @sql_type
- when /sqlite/
+ when :sqlite
ans=@ans.response?('remove sql database?')
if ans and File.exist?(@db_info.sqlite.db); File.unlink(@db_info.sqlite.db)
end