diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-03-31 16:08:48 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-03-31 16:08:48 -0400 |
commit | 8dec9defaf3a87137675c8656a7db1919cd86b9a (patch) | |
tree | edaf75a5c88996c39aa6fc16ec80745ed6bc4dda /lib | |
parent | cgi sql search form: comparison bug fix; clearer information when results exc... (diff) |
db_create, comments causing issues for sqlite, fix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/db_create.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sisu/v2/db_create.rb b/lib/sisu/v2/db_create.rb index d46fd4c3..feba670c 100644 --- a/lib/sisu/v2/db_create.rb +++ b/lib/sisu/v2/db_create.rb @@ -65,7 +65,9 @@ module SiSU_DB_create 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=Comment.new(@conn,@sql_type) + @comment=(@sql_type=='pg') \ + ? (Comment.new(@conn,@sql_type)) \ + : nil @@dl ||=SiSU_Env::Info_env.new.digest.length end def available @@ -167,7 +169,7 @@ module SiSU_DB_create topic_register VARCHAR(#{lt_topic_register}) NULL ); }) - @comment.metadata + @comment.psql.metadata if @comment end def documents # create documents base print %{ @@ -208,7 +210,7 @@ module SiSU_DB_create types CHAR(1) NULL ); }) - @comment.documents + @comment.psql.documents if @comment end def endnotes print %{ @@ -230,7 +232,7 @@ module SiSU_DB_create metadata_tid BIGINT REFERENCES metadata ); }) - @comment.endnotes + @comment.psql.endnotes if @comment end def endnotes_asterisk print %{ @@ -252,7 +254,7 @@ module SiSU_DB_create metadata_tid BIGINT REFERENCES metadata ); }) - @comment.endnotes_asterisk + @comment.psql.endnotes_asterisk if @comment end def endnotes_plus print %{ @@ -274,7 +276,7 @@ module SiSU_DB_create metadata_tid BIGINT REFERENCES metadata ); }) - @comment.endnotes_plus + @comment.psql.endnotes_plus if @comment end def urls # create documents file links mapping print %{ @@ -304,7 +306,7 @@ module SiSU_DB_create sisupod varchar(512) ); }) - @comment.urls + @comment.psql.urls if @comment end self end @@ -313,7 +315,6 @@ module SiSU_DB_create def initialize(conn,sql_type='pg') @conn=conn if sql_type =~ /pg/; psql - else none end end def psql |