Skip to content
Permalink
Browse files

New version 2.6 and system tables conversion

  • Loading branch information...
tvannini committed Aug 23, 2019
1 parent 4c21553 commit b005d739c44503b1c03a22303c259b07f3ad510a
@@ -41,7 +41,7 @@
*
* @name developers.std
* @package janox/developers.std
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -25,7 +25,7 @@
*
* @name jxman
* @package jxrnt/doc/htdocs/css/jxman.css
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -49,6 +49,6 @@
// ______________________________________ Application instance start ___
o2def::app("2.5");
o2def::app("2.6");
?>
@@ -25,7 +25,7 @@
*
* @name jxman
* @package jxrnt/doc/htdocs/css/jxman.css
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -28,7 +28,7 @@
*
* @name jxjse
* @package jxrnt/htdocs/js/env.js
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -49,6 +49,6 @@
// ______________________________________ Application instance start ___
o2def::app("2.5");
o2def::app("2.6");
?>
@@ -31,7 +31,7 @@
*
* @name jxr
* @package janox/htdocs/jxr.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -15,7 +15,7 @@
;
; @name jxconf
; @package jxrnt/janox.ini
; @version 2.5
; @version 2.6
; @copyright Tommaso Vannini (tvannini@janox.it) 2007
; @author Tommaso Vannini (tvannini@janox.it)

@@ -6,12 +6,12 @@
*
* @name jxconv
* @package janox/bin/jxconv.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
$jxrel = "2.5";
$jxrel = "2.6";
$info = <<<JANOX_SCRIPT_HEAD
Janox Upgrade Tool
@@ -888,6 +888,63 @@ static function to2_5($app_name, $app_dir) {
}
/**
* Upgrades application to release 2.6
*
* Add fields to system tables:
* - jx_running_jobs
* - run_sessid Session ID of process
* - o2_sessions:
* - run_mode Session execution mode [WEB | JOB | CMD | RPC]
*
* @param string $app_name Application name
* @param jxdir $app_dir Application root directory
*/
static function to2_6($app_name, $app_dir) {
// ______________________ Read tab-repository file from INI or use default one ___
$ini_content = file_get_contents($app_dir.$app_name.".ini");
$parts = array();
preg_match('/tables\s*=\s*"([^"]*)"/', $ini_content, $parts);
if ($parts[1]) {
$tables = $parts[1];
}
else {
$tables = 'file_repository.inc';
}
// ________________________________________________ Get tables definition code ___
$code = file_get_contents($app_dir.'prgs'.DIRECTORY_SEPARATOR.$tables);
// ____________________________________________________________ Add new fields ___
$code = add_tab_field($code,
'jx_running_jobs',
'run_sessid',
'run_sessid',
'_o2sid');
$code = add_tab_field($code,
'jx_running_jobs',
'run_sched_id',
'run_sched_id',
'jxscheduler_id');
$code = add_tab_index($code,
'jx_running_jobs',
'run_sessid',
array('run_sessid' => 'A', 'run_id' => 'A'));
$code = add_tab_field($code,
'o2_sessions',
'run_mode',
'run_mode',
'o2sys_app_run_mode');
$code = add_tab_field($code,
'o2_sessions',
'host',
'host',
'jxhost');
// ____________________________________________ Write down new repository code ___
file_put_contents($app_dir.'prgs'.DIRECTORY_SEPARATOR.$tables, $code);
}
}
@@ -26,7 +26,7 @@
*
* @name jxgam
* @package janox/bin/jxgam.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -42,7 +42,7 @@
*
* @name jxmdb.php
* @package janox/jxmdb.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -27,7 +27,7 @@
*
* @name jxrnt
* @package janox/jxrnt.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -37,7 +37,7 @@
*
* @global string $jxrel
*/
$jxrel = "2.5.00";
$jxrel = "2.6.00";
/**
* Janox built date string
@@ -37,7 +37,7 @@
*
* @name jxserver.php
* @package janox/jxserver.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxas400
* @package janox/dbms/jxdb_as400.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxmdb
* @package janox/dbms/jxdb_jxmdb.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -25,7 +25,7 @@
*
* @name jxmssql
* @package janox/dbms/jxdb_mssql.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxmysql
* @package janox/dbms/jxdb_mysql.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxoracle
* @package janox/dbms/jxdb_oracle.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxpostgres
* @package janox/dbms/jxdb_postgres.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -24,7 +24,7 @@
*
* @name jxsqlite
* @package janox/dbms/jxdb_sqlite3.php
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -49,6 +49,6 @@
// ______________________________________ Application instance start ___
o2def::app("2.5");
o2def::app("2.6");
?>
@@ -26,7 +26,7 @@
*
* @name jxapp
* @package janox/jxapp.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -31,7 +31,7 @@
*
* @name jxcore
* @package janox/jxcore.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -30,7 +30,7 @@
*
* @name jxenv
* @package janox/jxenv.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -30,7 +30,7 @@
*
* @name jxfnx
* @package janox/jxfnx.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -31,7 +31,7 @@
*
* @name jxhtml
* @package janox/jxhtml.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -26,7 +26,7 @@
*
* @name jxjs
* @package janox/jxjs.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -29,7 +29,7 @@
*
* @name jxui
* @package janox/jxui.inc
* @version 2.5
* @version 2.6
* @copyright Tommaso Vannini (tvannini@janox.it) 2007
* @author Tommaso Vannini (tvannini@janox.it)
*/
@@ -1,5 +1,5 @@
<?php
//2.5
//2.6
//o2def::module("");
//o2def::folder("");
/*
@@ -1,5 +1,5 @@
<?php
//2.5
//2.6
//o2def::module("");
//o2def::folder("");
/*
@@ -1,5 +1,5 @@
<?php
//2.5
//2.6
//o2def::module("");
//o2def::folder("triggers");
/*
@@ -1,5 +1,5 @@
<?php
//2.5
//2.6
//o2def::module("");
//o2def::folder("");
/*
@@ -1,5 +1,5 @@
<?php
//2.5
//2.6
//o2def::module("");
//o2def::folder("triggers");
/*

0 comments on commit b005d73

Please sign in to comment.
You can’t perform that action at this time.