File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ int main(int argc, char* argv[])
4747 bool optArchive = 0 ; // move content of main message table to (time-based name) archive table
4848 bool optList = 0 ; // list current tables
4949 bool optNone = 0 ; // no command specified - test DB access only
50+ bool optShowCreate = 0 ; // print command used to create table
5051
5152 // configure log output
5253 log.setOutputFormat (SimpleLog::FormatOption::ShowSeverityTxt | SimpleLog::FormatOption::ShowMessage);
@@ -97,6 +98,8 @@ int main(int argc, char* argv[])
9798 optDestroy = 1 ;
9899 } else if (command == " list" ) {
99100 optList = 1 ;
101+ } else if (command == " showCreate" ) {
102+ optShowCreate = 1 ;
100103 } else if (command == " " ) {
101104 optNone = 1 ;
102105 } else {
@@ -228,6 +231,10 @@ int main(int argc, char* argv[])
228231 sqlTableDesriptionMessages += " partition by hash(timestamp div 86400) partitions 365" ;
229232 }
230233
234+ if (optShowCreate) {
235+ log.info (" SQL create statement:\n\n create table " INFOLOGGER_TABLE_MESSAGES " %s;\n " , sqlTableDesriptionMessages.c_str ());
236+ }
237+
231238 if (optArchive) {
232239 log.info (" Archiving main infoLogger table" );
233240 auto t = std::time (nullptr );
You can’t perform that action at this time.
0 commit comments