fixed merge problem, pg adjustments, pg schema
This commit is contained in:
parent
b42176ed8a
commit
a298181219
@ -1,14 +1,24 @@
|
||||
CREATE TABLE `system_todo` (
|
||||
`ID` INT(10) NOT NULL AUTO_INCREMENT,
|
||||
`class` TEXT NOT NULL,
|
||||
`message` TEXT NOT NULL,
|
||||
`code` INT(10) UNSIGNED NOT NULL,
|
||||
`file` TEXT NOT NULL,
|
||||
`line` INT(11) NOT NULL,
|
||||
`trace` TEXT NOT NULL,
|
||||
`ip` TEXT NOT NULL,
|
||||
`querytime` DOUBLE NOT NULL,
|
||||
`time` DATETIME NOT NULL,
|
||||
`author` INT(11) NOT NULL,
|
||||
`type` INT(11) NOT NULL,
|
||||
`state` INT(11) NOT NULL,
|
||||
`msg_1` TEXT NOT NULL,
|
||||
`msg_2` TEXT NULL,
|
||||
`msg_3` TEXT NULL,
|
||||
`msg_4` TEXT NULL,
|
||||
`msg_5` TEXT NULL,
|
||||
`server_name` CHAR(255) NOT NULL,
|
||||
`server_port` INT(10) UNSIGNED NOT NULL,
|
||||
`request_uri` CHAR(255) NOT NULL,
|
||||
`post` TEXT NOT NULL,
|
||||
`http_referer` CHAR(255) NOT NULL,
|
||||
`http_user_agent` TEXT NOT NULL,
|
||||
`user` INT(10) UNSIGNED NOT NULL,
|
||||
`thrown` BIT(1) NOT NULL,
|
||||
`type` INT(11) NOT NULL DEFAULT '0',
|
||||
`count` INT(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
|
||||
17
dbd/sql/pg/schema/system_cron.sql
Normal file
17
dbd/sql/pg/schema/system_cron.sql
Normal file
@ -0,0 +1,17 @@
|
||||
CREATE TABLE system.cron
|
||||
(
|
||||
"class" character varying(255) NOT NULL,
|
||||
"min" integer DEFAULT NULL,
|
||||
"hour" integer DEFAULT NULL,
|
||||
"day" integer DEFAULT NULL,
|
||||
"day_week" integer DEFAULT NULL,
|
||||
"month" integer DEFAULT NULL,
|
||||
"last_run" timestamp with time zone DEFAULT NULL,
|
||||
"status" integer NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY ("class")
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
ALTER TABLE system.log
|
||||
OWNER TO dasense;
|
||||
30
dbd/sql/pg/schema/system_log.sql
Normal file
30
dbd/sql/pg/schema/system_log.sql
Normal file
@ -0,0 +1,30 @@
|
||||
CREATE TABLE system.log
|
||||
(
|
||||
"ID" integer NOT NULL DEFAULT nextval('system."sys_log_ID_seq"'::regclass),
|
||||
class text NOT NULL,
|
||||
message text NOT NULL,
|
||||
code integer NOT NULL,
|
||||
file text NOT NULL,
|
||||
line integer NOT NULL,
|
||||
trace text NOT NULL,
|
||||
ip text NOT NULL,
|
||||
querytime double precision NOT NULL,
|
||||
"time" timestamp with time zone NOT NULL DEFAULT now(),
|
||||
server_name character varying(255),
|
||||
server_port integer,
|
||||
request_uri character varying(512),
|
||||
post text,
|
||||
http_referer character varying(255),
|
||||
http_user_agent text,
|
||||
"user" integer,
|
||||
thrown integer,
|
||||
CONSTRAINT system_log_pk_id PRIMARY KEY ("ID"),
|
||||
CONSTRAINT system_log_fk_user FOREIGN KEY ("user")
|
||||
REFERENCES system."user" (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
ALTER TABLE system.log
|
||||
OWNER TO dasense;
|
||||
@ -1,19 +0,0 @@
|
||||
CREATE TABLE system.sys_log
|
||||
(
|
||||
"ID" integer NOT NULL DEFAULT nextval('system."sys_log_ID_seq"'::regclass),
|
||||
class text NOT NULL,
|
||||
message text NOT NULL,
|
||||
code integer NOT NULL,
|
||||
file text NOT NULL,
|
||||
line integer NOT NULL,
|
||||
trace text NOT NULL,
|
||||
ip text NOT NULL,
|
||||
querytime double precision NOT NULL,
|
||||
"time" timestamp with time zone NOT NULL DEFAULT now()
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
ALTER TABLE system.sys_log
|
||||
OWNER TO username;
|
||||
|
||||
@ -1,19 +1,32 @@
|
||||
CREATE TABLE system.todo
|
||||
(
|
||||
"ID" integer NOT NULL,
|
||||
"class" text NOT NULL,
|
||||
"message" text NOT NULL,
|
||||
"code" integer NOT NULL,
|
||||
"file" text NOT NULL,
|
||||
"line" integer NOT NULL,
|
||||
"trace" text NOT NULL,
|
||||
"ip" text NOT NULL,
|
||||
"querytime" double precision NOT NULL,
|
||||
"time" timestamp with time zone NOT NULL,
|
||||
author integer NOT NULL,
|
||||
type integer NOT NULL,
|
||||
state integer NOT NULL,
|
||||
msg_1 text NOT NULL,
|
||||
msg_2 text,
|
||||
msg_3 text,
|
||||
msg_4 text,
|
||||
msg_5 text,
|
||||
CONSTRAINT system_todo_pk_id PRIMARY KEY ("ID")
|
||||
server_name character varying(255),
|
||||
server_port integer,
|
||||
request_uri character varying(512),
|
||||
post text,
|
||||
http_referer character varying(255),
|
||||
http_user_agent text,
|
||||
"user" integer,
|
||||
thrown integer,
|
||||
"type" integer NOT NULL DEFAULT 0,
|
||||
"count" integer NOT NULL DEFAULT 0,
|
||||
CONSTRAINT system_todo_pk_id PRIMARY KEY ("ID"),
|
||||
CONSTRAINT system_todo_fk_user FOREIGN KEY ("user")
|
||||
REFERENCES system."user" (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
ALTER TABLE system.todo
|
||||
OWNER TO username;
|
||||
OWNER TO dasense;
|
||||
@ -5,7 +5,7 @@ class SYS_SAIMOD_CRON extends \SYSTEM\DB\QQ {
|
||||
protected static function query(){
|
||||
return new \SYSTEM\DB\QQuery(get_class(),
|
||||
//pg
|
||||
'',
|
||||
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_PG.' ORDER BY class;',
|
||||
//mys
|
||||
'SELECT * FROM system_cron ORDER BY class;'
|
||||
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_MYS.' ORDER BY class;'
|
||||
);}}
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
<td><input type="text" id="new_cron_day_week" placeholder="day_week" style="width: 140px;"></td>
|
||||
<td><input type="text" id="new_cron_month" placeholder="month" style="width: 140px;"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><button type="button" class="btn-small btn-success" id="addcron">Add</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -4,8 +4,7 @@ namespace SYSTEM\SAI;
|
||||
class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
|
||||
public static function getLanguages(){
|
||||
return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS);
|
||||
}
|
||||
return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS);}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale(){
|
||||
$vars = array();
|
||||
@ -34,22 +33,30 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_load($lang, $group){
|
||||
$con = new \SYSTEM\DB\Connection();
|
||||
$query = 'SELECT id, '.$lang.' FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' WHERE category='.$group.' ORDER BY category ASC;';
|
||||
$res = $con->query($query);
|
||||
$entries = '';
|
||||
$temparr = array();
|
||||
while($r = $res->next()){
|
||||
$temparr['lang'] = $r[$lang];
|
||||
$temparr['id'] = $r['id'];
|
||||
$entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/entry.tpl'), $temparr);
|
||||
}
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
$query = 'SELECT id, "'.$lang.'" FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' WHERE category='.$group.' ORDER BY category ASC;';
|
||||
} else {
|
||||
$query = 'SELECT id, '.$lang.' FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' WHERE category='.$group.' ORDER BY category ASC;';
|
||||
}
|
||||
$res = $con->query($query);
|
||||
$entries = '';
|
||||
$temparr = array();
|
||||
while($r = $res->next()){
|
||||
$temparr['lang'] = $r[$lang];
|
||||
$temparr['id'] = $r['id'];
|
||||
$entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/entry.tpl'), $temparr);
|
||||
}
|
||||
return $entries;
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_singleload($id, $lang){
|
||||
$con = new \SYSTEM\DB\Connection();
|
||||
$result = "";
|
||||
$query = 'SELECT '.$lang.' FROM `'.\SYSTEM\DBD\system_locale_string::NAME_MYS.'` WHERE id=\''.$id.'\' ORDER BY category ASC;';
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
$query = 'SELECT "'.$lang.'" FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' WHERE id=\''.$id.'\' ORDER BY category ASC;';
|
||||
} else {
|
||||
$query = 'SELECT '.$lang.' FROM `'.\SYSTEM\DBD\system_locale_string::NAME_MYS.'` WHERE id=\''.$id.'\' ORDER BY category ASC;';
|
||||
}
|
||||
$res = $con->query($query);
|
||||
$entries = '';
|
||||
$temparr = array();
|
||||
|
||||
@ -19,8 +19,6 @@ class RIGHTS {
|
||||
|
||||
const SYS_SAI_CRON = 25;
|
||||
|
||||
const SYS_SAI_CRON = 25;
|
||||
|
||||
//Reserve first 1000 ids.
|
||||
const RESERVED_SYS_0_999 = 999;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user