diff options
author | Valentin Popov <info@valentineus.link> | 2018-09-07 13:36:17 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-09-07 13:36:17 +0300 |
commit | fa86c0329f077501d919121c2145fbca8d2f93c5 (patch) | |
tree | f4038beec62595128b1e1835441f2daa623d4d00 | |
parent | 9ee0af7e28b82dfdfc5c4b6f338885e44aabbc17 (diff) | |
download | local_webhooks-fa86c0329f077501d919121c2145fbca8d2f93c5.tar.xz local_webhooks-fa86c0329f077501d919121c2145fbca8d2f93c5.zip |
Updating the table structure
* Fixed bug with 'XMLDB PATH'. The latest update to Moodle includes
a strict check.
* Remotely the status field in the event table. The logic is
simplified, if there is an event subscription, the event is stored in
a table. There are no subscriptions, no events in the table.
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | db/install.xml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/db/install.xml b/db/install.xml index 45bfb7c..7ee9e92 100644 --- a/db/install.xml +++ b/db/install.xml @@ -1,29 +1,33 @@ <?xml version="1.0" encoding="UTF-8" ?> -<XMLDB PATH="blocks/local_webhooks/db" VERSION="20180312" COMMENT="XMLDB file for Moodle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"> +<XMLDB PATH="local/webhooks/db" VERSION="20180907" COMMENT="XMLDB file for Moodle local/webhooks" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"> + <TABLES> <TABLE NAME="local_webhooks_service" COMMENT="Storing created services."> <FIELDS> <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" /> - <FIELD NAME="header" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Type of outgoing header." /> + <FIELD NAME="header" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" DEFAULT="application/json" COMMENT="Type of outgoing header." /> <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Name of the service." /> <FIELD NAME="point" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Point of delivery of notifications." /> - <FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" COMMENT="Current status of the service." /> + <FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" DEFAULT="0" COMMENT="Current status of the service." /> <FIELD NAME="token" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Token for verification of requests." /> </FIELDS> <KEYS> <KEY NAME="primary" TYPE="primary" FIELDS="id" /> </KEYS> </TABLE> + <TABLE NAME="local_webhooks_events" COMMENT="Storing of viewed events."> <FIELDS> <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" /> <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Name of the service." /> <FIELD NAME="serviceid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Service ID." /> - <FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" COMMENT="Current status of the observer." /> </FIELDS> <KEYS> <KEY NAME="primary" TYPE="primary" FIELDS="id" /> </KEYS> </TABLE> + </TABLES> </XMLDB> |