From 307ecb4df591aa675b71839014debf6e81d462e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:49:03 -0400 Subject: v5 v6: db, use symbols to identify sql engine --- lib/sisu/v5/db_drop.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v5/db_drop.rb') 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 -- cgit v1.2.3