diff --git a/dbd/sql/mysql/schema/system_todo.sql b/dbd/sql/mysql/schema/system_todo.sql index 3f88815..8c0a1b9 100644 --- a/dbd/sql/mysql/schema/system_todo.sql +++ b/dbd/sql/mysql/schema/system_todo.sql @@ -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' diff --git a/dbd/sql/pg/schema/system_cron.sql b/dbd/sql/pg/schema/system_cron.sql new file mode 100644 index 0000000..650af2a --- /dev/null +++ b/dbd/sql/pg/schema/system_cron.sql @@ -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; \ No newline at end of file diff --git a/dbd/sql/pg/schema/system_log.sql b/dbd/sql/pg/schema/system_log.sql new file mode 100644 index 0000000..3693664 --- /dev/null +++ b/dbd/sql/pg/schema/system_log.sql @@ -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; \ No newline at end of file diff --git a/dbd/sql/pg/schema/system_sys_log.sql b/dbd/sql/pg/schema/system_sys_log.sql deleted file mode 100644 index d76711b..0000000 --- a/dbd/sql/pg/schema/system_sys_log.sql +++ /dev/null @@ -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; - diff --git a/dbd/sql/pg/schema/system_todo.sql b/dbd/sql/pg/schema/system_todo.sql index b7f08cb..fc385af 100644 --- a/dbd/sql/pg/schema/system_todo.sql +++ b/dbd/sql/pg/schema/system_todo.sql @@ -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; \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php index 76943e1..5fa8721 100644 --- a/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php +++ b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php @@ -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;' );}} diff --git a/sai/modules/saimod_sys_cron/tpl/tabs.tpl b/sai/modules/saimod_sys_cron/tpl/tabs.tpl index 912ac79..0e2de9e 100644 --- a/sai/modules/saimod_sys_cron/tpl/tabs.tpl +++ b/sai/modules/saimod_sys_cron/tpl/tabs.tpl @@ -23,6 +23,7 @@