diff options
Diffstat (limited to 'lib/sisu/v3/db_create.rb')
-rw-r--r-- | lib/sisu/v3/db_create.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb index 71d0ce09..627f0ea5 100644 --- a/lib/sisu/v3/db_create.rb +++ b/lib/sisu/v3/db_create.rb @@ -57,18 +57,18 @@ sqlite =end -module SiSU_DB_create +module SiSU_DbCreate require_relative 'db_columns' # db_columns.rb - class Create < SiSU_DB_columns::Columns + class Create < SiSU_DbColumns::Columns require_relative 'sysenv' # sysenv.rb @@dl=nil def initialize(opt,conn,file,sql_type='pg') @opt,@conn,@file,@sql_type=opt,conn,file,sql_type @cX=SiSU_Screen::Ansi.new(@opt.cmd).cX @comment=(@sql_type=='pg') \ - ? (Comment.new(@conn,@sql_type)) + ? (SiSU_DbCreate::Comment.new(@conn,@sql_type)) : nil - @@dl ||=SiSU_Env::Info_env.new.digest.length + @@dl ||=SiSU_Env::InfoEnv.new.digest.length end def available DBI.available_drivers.each do |driver| @@ -79,15 +79,15 @@ module SiSU_DB_create end end def create_db - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) tell=(@sql_type=='sqlite') \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create Sqlite db tables in:',%{"#{@env.path.output}/sisu_sqlite.db"}) + ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create Sqlite db tables in:',%{"#{@file}"}) : SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create PG db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"}) - tell.colorize if @opt.cmd =~/vVM/ - SiSU_Env::System_call.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub + tell.colorize if @opt.cmd =~/[vVM]/ + SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub end def output_dir? - dir=SiSU_Env::Info_env.new('') + dir=SiSU_Env::InfoEnv.new('') if @opt.cmd =~/d/ dir.path.webserv_stub_ensure end @@ -345,7 +345,7 @@ module SiSU_DB_create self end end - class Comment < SiSU_DB_columns::Columns + class Comment < SiSU_DbColumns::Columns def initialize(conn,sql_type='pg') @conn=conn if sql_type =~ /pg/; psql |