]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Postgress migration added for 2.1 installations.
authorwbudic <redacted>
Sat, 13 Feb 2021 11:27:23 +0000 (22:27 +1100)
committerwbudic <redacted>
Sat, 13 Feb 2021 11:27:23 +0000 (22:27 +1100)
htdocs/cgi-bin/login_ctr.cgi

index 2859e33156cfa5f01b261ca9d422976ff5d30904..3f48209b5662f1fe59f415050ea1c63a9dced2ee 100755 (executable)
@@ -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;}