aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/db_create.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/db_create.rb')
-rw-r--r--lib/sisu/v2/db_create.rb27
1 files changed, 17 insertions, 10 deletions
diff --git a/lib/sisu/v2/db_create.rb b/lib/sisu/v2/db_create.rb
index 8ed638dc..c7ce9a6d 100644
--- a/lib/sisu/v2/db_create.rb
+++ b/lib/sisu/v2/db_create.rb
@@ -80,7 +80,9 @@ module SiSU_DB_create
end
def create_db
@env=SiSU_Env::Info_env.new(@opt.fns)
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create PG db:',%{"SiSU_#{@env.path.stub_pwd}"})
+ 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 PG db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"})
tell.colorize unless @opt.cmd =~/q/
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
end
@@ -180,13 +182,16 @@ module SiSU_DB_create
#{column.notes_prefix_a.create_column}
#{column.notes_prefix_b.create_column}
#{column.notes_suffix.create_column}
+ /* src */
+ #{column.src_filename.create_column}
+ #{column.src_fingerprint.create_column}
+ #{column.src_filesize.create_column}
+ #{column.src_word_count.create_column}
+ #{column.src_txt.create_column}
/* misc */
- #{column.filename.create_column}
- #{column.sisutxt.create_column}
#{column.fulltext.create_column}
- #{column.word_count.create_column}
- #{column.digest.create_column}
#{column.skin_name.create_column}
+ #{column.skin_fingerprint.create_column}
#{column.skin.create_column}
#{column.links.create_column.gsub(/,$/,'')}
/* subj VARCHAR(64) NULL, */
@@ -213,7 +218,7 @@ module SiSU_DB_create
ocns VARCHAR(6),
clean TEXT NULL,
body TEXT NULL,
- seg VARCHAR(120) NULL,
+ seg VARCHAR(256) NULL,
lev_an VARCHAR(1),
lev SMALLINT NULL,
lev1 SMALLINT,
@@ -428,12 +433,14 @@ module SiSU_DB_create
%{#{column.notes_prefix_a.column_comment}},
%{#{column.notes_prefix_b.column_comment}},
%{#{column.notes_suffix.column_comment}},
- %{#{column.filename.column_comment}},
- %{#{column.sisutxt.column_comment}},
+ %{#{column.src_filename.column_comment}},
+ %{#{column.src_fingerprint.column_comment}},
+ %{#{column.src_filesize.column_comment}},
+ %{#{column.src_word_count.column_comment}},
+ %{#{column.src_txt.column_comment}},
%{#{column.fulltext.column_comment}},
- %{#{column.word_count.column_comment}},
- %{#{column.digest.column_comment}},
%{#{column.skin_name.column_comment}},
+ %{#{column.skin_fingerprint.column_comment}},
%{#{column.skin.column_comment}},
%{#{column.links.column_comment}},
]