provide platform specific install script

This commit is contained in:
zotlabs 2017-03-25 14:19:32 -07:00 committed by Mario Vavti
parent 57a8b3f857
commit 33ff7bf968

View File

@ -15,7 +15,7 @@ class DBA {
static public $scheme = 'mysql'; static public $scheme = 'mysql';
static public $logging = false; static public $logging = false;
static public $install_script = 'install/schema_mysql.sql'; static public $install_script = 'schema_mysql.sql';
static public $null_date = '0001-01-01 00:00:00'; static public $null_date = '0001-01-01 00:00:00';
static public $utc_now = 'UTC_TIMESTAMP()'; static public $utc_now = 'UTC_TIMESTAMP()';
static public $tquot = "`"; static public $tquot = "`";
@ -46,7 +46,7 @@ class DBA {
if(!($port)) if(!($port))
$port = 5432; $port = 5432;
self::$install_script = 'install/schema_postgres.sql'; self::$install_script = 'schema_postgres.sql';
self::$utc_now = "now() at time zone 'UTC'"; self::$utc_now = "now() at time zone 'UTC'";
self::$tquot = '"'; self::$tquot = '"';
self::$scheme = 'pgsql'; self::$scheme = 'pgsql';
@ -163,7 +163,9 @@ abstract class dba_driver {
} }
function get_install_script() { function get_install_script() {
return \DBA::$install_script; if(file_exists('install/' . PLATFORM_NAME . '/' . \DBA::$install_script))
return 'install/' . PLATFORM_NAME . '/' . \DBA::$install_script;
return 'install/' . \DBA::$install_script;
} }
function get_table_quote() { function get_table_quote() {