From: wbudic Date: Sat, 13 Feb 2021 11:27:23 +0000 (+1100) Subject: Postgress migration added for 2.1 installations. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=ebc07b512606f3d395106ca7ed8607f96237c93d;p=LifeLog.git Postgress migration added for 2.1 installations. --- diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index 2859e33..3f48209 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -385,14 +385,15 @@ try{ } elsif($hasLogTbl && $SCRIPT_RELEASE > $DB_VERSION && $DB_VERSION < 2.0){ #dev 1.9 main log view has changed in 1.8..1.9, above scope will perform anyway, its drop, to be recreated later. + my $t ="BYTE"; $t = "SMALLINT" if Settings::isProgressDB(); $db->do('DROP VIEW '.Settings->VW_LOG);delete($curr_tables{Settings->VW_LOG}); - $db->do('ALTER TABLE "main"."LOG" ADD COLUMN "RTF" BYTE default 0'); + $db->do("ALTER TABLE LOG ADD COLUMN RTF $t default 0"); delete($curr_tables{Settings->VW_LOG}); $changed = 1; } elsif($hasLogTbl && $SCRIPT_RELEASE > $DB_VERSION && $DB_VERSION < 2.2){ my $t ="BYTE"; $t = "SMALLINT" if Settings::isProgressDB(); - $db->do("ALTER TABLE LOG ADD COLUMN \"RTF\" $t default 0");$changed = 1; + $db->do("ALTER TABLE LOG ADD COLUMN RTF $t default 0");$changed = 1; } elsif($SCRIPT_RELEASE > $DB_VERSION){$changed = 1;}