aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/db_drop.rb
diff options
context:
space:
mode:
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