1 |
efrain |
1 |
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2 |
<XMLDB PATH="admin/tool/policy/db" VERSION="20180918" COMMENT="The plugin allows to manage various policy documents that users have to accept to use the site."
|
|
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
4 |
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
|
|
|
5 |
>
|
|
|
6 |
<TABLES>
|
|
|
7 |
<TABLE NAME="tool_policy" COMMENT="Contains the list of policy documents defined on the site.">
|
|
|
8 |
<FIELDS>
|
|
|
9 |
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
|
|
10 |
<FIELD NAME="sortorder" TYPE="int" LENGTH="5" NOTNULL="true" DEFAULT="999" SEQUENCE="false" COMMENT="Defines the order in which policies should be presented to users"/>
|
|
|
11 |
<FIELD NAME="currentversionid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="ID of the current policy version that applies on the site, NULL if the policy does not apply"/>
|
|
|
12 |
</FIELDS>
|
|
|
13 |
<KEYS>
|
|
|
14 |
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
|
|
15 |
<KEY NAME="fk_currentversionid" TYPE="foreign" FIELDS="currentversionid" REFTABLE="tool_policy_versions" REFFIELDS="id"/>
|
|
|
16 |
</KEYS>
|
|
|
17 |
</TABLE>
|
|
|
18 |
<TABLE NAME="tool_policy_versions" COMMENT="Holds versions of the policy documents">
|
|
|
19 |
<FIELDS>
|
|
|
20 |
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
|
|
21 |
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="Name of the policy document"/>
|
|
|
22 |
<FIELD NAME="type" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Type of the policy: 0 - Site policy, 1 - Privacy policy, 2 - Third party policy, 99 - Other"/>
|
|
|
23 |
<FIELD NAME="audience" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Who is this policy targeted at: 0 - all users, 1 - logged in users only, 2 - guests only"/>
|
|
|
24 |
<FIELD NAME="archived" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Should the version be considered as archived. All non-archived, non-current versions are considered to be drafts."/>
|
|
|
25 |
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the user who last edited this policy document version."/>
|
|
|
26 |
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the policy version was created."/>
|
|
|
27 |
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the policy version was last modified."/>
|
|
|
28 |
<FIELD NAME="policyid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the policy document we are version of."/>
|
|
|
29 |
<FIELD NAME="agreementstyle" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="How this agreement should flow: 0 - on the consent page, 1 - on a separate page before reaching the consent page."/>
|
|
|
30 |
<FIELD NAME="optional" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 - the policy must be accepted to use the site, 1 - accepting the policy is optional"/>
|
|
|
31 |
<FIELD NAME="revision" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="Human readable version of the policy document"/>
|
|
|
32 |
<FIELD NAME="summary" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="Policy text summary"/>
|
|
|
33 |
<FIELD NAME="summaryformat" TYPE="int" LENGTH="3" NOTNULL="true" SEQUENCE="false" COMMENT="Format of the summary field"/>
|
|
|
34 |
<FIELD NAME="content" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="Full policy text"/>
|
|
|
35 |
<FIELD NAME="contentformat" TYPE="int" LENGTH="3" NOTNULL="true" SEQUENCE="false" COMMENT="Format of the content field"/>
|
|
|
36 |
</FIELDS>
|
|
|
37 |
<KEYS>
|
|
|
38 |
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
|
|
39 |
<KEY NAME="fk_usermodified" TYPE="foreign" FIELDS="usermodified" REFTABLE="user" REFFIELDS="id"/>
|
|
|
40 |
<KEY NAME="fk_policyid" TYPE="foreign" FIELDS="policyid" REFTABLE="tool_policy" REFFIELDS="id"/>
|
|
|
41 |
</KEYS>
|
|
|
42 |
</TABLE>
|
|
|
43 |
<TABLE NAME="tool_policy_acceptances" COMMENT="Tracks users accepting the policy versions">
|
|
|
44 |
<FIELDS>
|
|
|
45 |
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
|
|
46 |
<FIELD NAME="policyversionid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the policy document version"/>
|
|
|
47 |
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the user this acceptance is relevant to"/>
|
|
|
48 |
<FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="Acceptance status: 1 - accepted, 0 - not accepted"/>
|
|
|
49 |
<FIELD NAME="lang" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" COMMENT="Code of the language the user had when the policy document was displayed"/>
|
|
|
50 |
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the user who last modified the acceptance record"/>
|
|
|
51 |
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the acceptance record was created"/>
|
|
|
52 |
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the acceptance record was last modified"/>
|
|
|
53 |
<FIELD NAME="note" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="Plain text note describing how the actual consent has been obtained if the policy has been accepted on other user's behalf."/>
|
|
|
54 |
</FIELDS>
|
|
|
55 |
<KEYS>
|
|
|
56 |
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
|
|
57 |
<KEY NAME="fk_policyversionid" TYPE="foreign" FIELDS="policyversionid" REFTABLE="tool_policy_versions" REFFIELDS="id"/>
|
|
|
58 |
<KEY NAME="fk_userid" TYPE="foreign" FIELDS="userid" REFTABLE="user" REFFIELDS="id"/>
|
|
|
59 |
<KEY NAME="fk_usermodified" TYPE="foreign" FIELDS="usermodified" REFTABLE="user" REFFIELDS="id"/>
|
|
|
60 |
<KEY NAME="uq_versionuser" TYPE="unique" FIELDS="policyversionid, userid" COMMENT="There cannot exist more records for given user and policy document version."/>
|
|
|
61 |
</KEYS>
|
|
|
62 |
</TABLE>
|
|
|
63 |
</TABLES>
|
|
|
64 |
</XMLDB>
|