2012-08-27 11:35:04 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2010-06-18 18:08:24 +00:00
|
|
|
<database>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbname*</name>
|
|
|
|
<create>true</create>
|
|
|
|
<overwrite>false</overwrite>
|
|
|
|
|
|
|
|
<charset>utf8</charset>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
2013-11-26 17:39:19 +00:00
|
|
|
<!--
|
|
|
|
Namespaced Key-Value Store for Application Configuration.
|
2013-11-26 19:27:51 +00:00
|
|
|
- Keys are namespaced per appid.
|
|
|
|
- E.g. (core, global_cache_gc_lastrun) -> 1385463286
|
2013-11-26 17:39:19 +00:00
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*appconfig</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>appid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>32</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>configkey</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>64</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>configvalue</name>
|
|
|
|
<type>clob</type>
|
2013-08-09 09:27:21 +00:00
|
|
|
<notnull>false</notnull>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2012-09-19 19:05:39 +00:00
|
|
|
<index>
|
|
|
|
<name>appconfig_appid_key_index</name>
|
2013-03-19 00:35:12 +00:00
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
2012-09-19 19:05:39 +00:00
|
|
|
<field>
|
|
|
|
<name>appid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>configkey</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-11-24 19:58:51 +00:00
|
|
|
<index>
|
|
|
|
<name>appconfig_config_key_index</name>
|
|
|
|
<field>
|
|
|
|
<name>configkey</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2013-12-18 14:13:27 +00:00
|
|
|
<index>
|
|
|
|
<name>appconfig_appid_key</name>
|
|
|
|
<field>
|
|
|
|
<name>appid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-09-19 19:05:39 +00:00
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2012-12-15 22:28:07 +00:00
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 17:57:39 +00:00
|
|
|
<!--
|
|
|
|
Bidirectional Map for Storage Names and Storage Ids.
|
2013-11-26 19:27:51 +00:00
|
|
|
- Assigns each storage name a unique storage id integer.
|
|
|
|
- Long storage names are hashed.
|
|
|
|
- E.g. local::/tmp/ <-> 2
|
|
|
|
- E.g. b5db994aa8c6625100e418406c798269 <-> 27
|
2013-11-26 17:57:39 +00:00
|
|
|
-->
|
2012-12-15 22:28:07 +00:00
|
|
|
<name>*dbprefix*storages</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
2013-06-03 16:28:48 +00:00
|
|
|
<notnull>false</notnull>
|
2012-12-15 22:28:07 +00:00
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>numeric_id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2015-01-23 21:53:21 +00:00
|
|
|
<field>
|
|
|
|
<name>available</name>
|
2015-09-10 21:01:02 +00:00
|
|
|
<type>integer</type>
|
|
|
|
<default>1</default>
|
2015-01-23 21:53:21 +00:00
|
|
|
<notnull>true</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>last_checked</name>
|
|
|
|
<type>integer</type>
|
|
|
|
</field>
|
|
|
|
|
2012-12-15 22:28:07 +00:00
|
|
|
<index>
|
|
|
|
<name>storages_id_index</name>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2015-11-26 16:47:53 +00:00
|
|
|
<!-- a list of all mounted storage per user, populated on filesystem setup -->
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<name>*dbprefix*mounts</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>storage_id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- fileid of the root of the mount, foreign key: oc_filecache.fileid -->
|
|
|
|
<field>
|
|
|
|
<name>root_id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>user_id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>mount_point</name>
|
|
|
|
<type>text</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4000</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>mounts_user_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>user_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>mounts_storage_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>storage_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>mounts_root_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>root_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>mounts_user_root_index</name>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>user_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>root_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2013-01-07 00:40:09 +00:00
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 18:30:59 +00:00
|
|
|
<!--
|
|
|
|
Bidirectional Map for Mimetypes and Mimetype Id
|
2013-11-26 19:27:51 +00:00
|
|
|
- Assigns each mimetype (and supertype) a unique mimetype id integer.
|
|
|
|
- E.g. application <-> 5
|
|
|
|
- E.g. application/pdf <-> 6
|
2013-11-26 18:30:59 +00:00
|
|
|
-->
|
2013-01-07 00:40:09 +00:00
|
|
|
<name>*dbprefix*mimetypes</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>mimetype</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2013-01-10 03:57:42 +00:00
|
|
|
<length>255</length>
|
2013-01-07 00:40:09 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>mimetype_id_index</name>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>mimetype</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 19:27:18 +00:00
|
|
|
<!--
|
|
|
|
Main file table containing one row for each directory and file.
|
|
|
|
- Assigns a unique integer fileid to each file (and directory)
|
|
|
|
- Assigns an etag to each file (and directory)
|
|
|
|
- Caches various file/dir properties such as:
|
|
|
|
- path (filename, e.g. files/combinatoricslib-2.0_doc.zip)
|
|
|
|
- path_hash = md5(path)
|
|
|
|
- name (basename, e.g. combinatoricslib-2.0_doc.zip)
|
|
|
|
- size (for directories this is the sum of all contained file sizes)
|
|
|
|
-->
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>*dbprefix*filecache</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>fileid</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
2012-10-02 21:46:35 +00:00
|
|
|
<autoincrement>1</autoincrement>
|
2012-09-19 18:58:42 +00:00
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:42:15 +00:00
|
|
|
<!-- Foreign Key storages::numeric_id -->
|
2012-10-02 21:46:35 +00:00
|
|
|
<field>
|
|
|
|
<name>storage</name>
|
2012-12-15 22:28:07 +00:00
|
|
|
<type>integer</type>
|
2012-10-02 21:46:35 +00:00
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-12-15 22:28:07 +00:00
|
|
|
<length>4</length>
|
2012-10-02 21:46:35 +00:00
|
|
|
</field>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>path</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
2013-06-03 16:28:48 +00:00
|
|
|
<notnull>false</notnull>
|
2014-05-08 13:19:54 +00:00
|
|
|
<length>4000</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>path_hash</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>32</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:42:15 +00:00
|
|
|
<!-- Foreign Key filecache::fileid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>parent</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-10-02 21:46:35 +00:00
|
|
|
<length>4</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>name</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
2013-06-03 16:28:48 +00:00
|
|
|
<notnull>false</notnull>
|
2012-10-02 21:46:35 +00:00
|
|
|
<length>250</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:42:15 +00:00
|
|
|
<!-- Foreign Key mimetypes::id -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>mimetype</name>
|
2013-01-07 00:40:09 +00:00
|
|
|
<type>integer</type>
|
2012-09-19 18:58:42 +00:00
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2013-01-07 00:40:09 +00:00
|
|
|
<length>4</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:42:15 +00:00
|
|
|
<!-- Foreign Key mimetypes::id -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>mimepart</name>
|
2013-01-07 00:40:09 +00:00
|
|
|
<type>integer</type>
|
2012-09-19 18:58:42 +00:00
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2013-01-07 00:40:09 +00:00
|
|
|
<length>4</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>size</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>integer</type>
|
2012-10-02 21:46:35 +00:00
|
|
|
<default></default>
|
2012-09-19 18:58:42 +00:00
|
|
|
<notnull>true</notnull>
|
2013-02-10 15:44:00 +00:00
|
|
|
<length>8</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>mtime</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>integer</type>
|
2012-10-02 21:46:35 +00:00
|
|
|
<default></default>
|
2012-09-19 18:58:42 +00:00
|
|
|
<notnull>true</notnull>
|
2012-10-02 21:46:35 +00:00
|
|
|
<length>4</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2013-02-10 11:05:41 +00:00
|
|
|
<field>
|
|
|
|
<name>storage_mtime</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>encrypted</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
2012-10-02 21:46:35 +00:00
|
|
|
<length>4</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2013-04-25 13:20:06 +00:00
|
|
|
<field>
|
|
|
|
<name>unencrypted_size</name>
|
|
|
|
<type>integer</type>
|
2013-09-20 18:47:24 +00:00
|
|
|
<default>0</default>
|
2013-04-25 13:20:06 +00:00
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>8</length>
|
|
|
|
</field>
|
|
|
|
|
2012-12-30 21:32:55 +00:00
|
|
|
<field>
|
|
|
|
<name>etag</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
2013-06-26 16:07:53 +00:00
|
|
|
<notnull>false</notnull>
|
2012-12-31 02:23:54 +00:00
|
|
|
<length>40</length>
|
2012-12-30 21:32:55 +00:00
|
|
|
</field>
|
|
|
|
|
2014-06-03 15:57:56 +00:00
|
|
|
<field>
|
|
|
|
<name>permissions</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
|
|
|
|
<index>
|
2013-01-02 23:29:10 +00:00
|
|
|
<name>fs_storage_path_hash</name>
|
2012-10-02 21:46:35 +00:00
|
|
|
<unique>true</unique>
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>storage</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
2012-10-02 21:46:35 +00:00
|
|
|
<name>path_hash</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
2013-01-02 23:29:10 +00:00
|
|
|
<name>fs_parent_name_hash</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>parent</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>name</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2013-01-21 21:31:44 +00:00
|
|
|
<index>
|
|
|
|
<name>fs_storage_mimetype</name>
|
|
|
|
<field>
|
|
|
|
<name>storage</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>mimetype</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>fs_storage_mimepart</name>
|
|
|
|
<field>
|
|
|
|
<name>storage</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>mimepart</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2014-05-31 14:55:50 +00:00
|
|
|
<index>
|
|
|
|
<name>fs_storage_size</name>
|
|
|
|
<field>
|
|
|
|
<name>storage</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>size</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>fileid</name>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 19:50:21 +00:00
|
|
|
<!--
|
|
|
|
Stores which groups have which users as members in an n:m relationship.
|
|
|
|
- Maps group id (gid) to a set of users (uid)
|
|
|
|
- Maps user id (uid) to a set of groups (gid) (but without index)
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*group_user</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
2013-11-26 19:50:21 +00:00
|
|
|
<!-- Foreign Key groups::gid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:50:21 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2013-03-19 00:35:12 +00:00
|
|
|
<index>
|
|
|
|
<name>gu_gid_uid_index</name>
|
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2015-07-08 16:04:10 +00:00
|
|
|
<index>
|
|
|
|
<name>gu_uid_index</name>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 19:55:08 +00:00
|
|
|
<!--
|
|
|
|
Stores which groups have which users as admins in an n:m relationship.
|
|
|
|
- Maps group id (gid) to a set of users (uid)
|
|
|
|
- Maps user id (uid) to a set of groups (gid)
|
2013-11-26 19:55:19 +00:00
|
|
|
|
|
|
|
NOTE: This could (very likely) be reduced to a single bit in group_user
|
|
|
|
instead of repeating varchars gid and uid here
|
2013-11-26 19:55:08 +00:00
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*group_admin</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
2013-11-26 19:55:08 +00:00
|
|
|
<!-- Foreign Key groups::gid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 19:55:08 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
2012-11-24 19:58:51 +00:00
|
|
|
<index>
|
|
|
|
<name>group_admin_uid</name>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-09-19 18:58:42 +00:00
|
|
|
|
2013-03-19 00:35:12 +00:00
|
|
|
<index>
|
|
|
|
<name>ga_gid_uid_index</name>
|
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 19:56:05 +00:00
|
|
|
<!--
|
|
|
|
A simple list of groups.
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*groups</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>groups_pKey</name>
|
|
|
|
<primary>true</primary>
|
|
|
|
<field>
|
|
|
|
<name>gid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 20:18:18 +00:00
|
|
|
<!--
|
|
|
|
Namespaced Key-Value Store for User Preferences
|
|
|
|
- Keys are namespaced per userid and appid.
|
|
|
|
- E.g. (admin, files, cache_version) -> 5
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*preferences</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
2013-11-26 20:18:18 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>userid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>64</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>appid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>32</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>configkey</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>64</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>configvalue</name>
|
|
|
|
<type>clob</type>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
2012-09-19 19:05:39 +00:00
|
|
|
<index>
|
2012-09-20 19:05:37 +00:00
|
|
|
<name>pref_userid_appid_key_index</name>
|
2013-03-19 00:35:12 +00:00
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
2012-09-19 19:05:39 +00:00
|
|
|
<field>
|
|
|
|
<name>userid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>appid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>configkey</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 20:23:57 +00:00
|
|
|
<!--
|
|
|
|
WebDAV properties.
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*properties</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
2013-03-19 00:35:12 +00:00
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:23:57 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>userid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2012-09-27 20:49:01 +00:00
|
|
|
<length>64</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>propertypath</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>propertyname</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>propertyvalue</name>
|
|
|
|
<type>text</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
2013-03-19 00:35:12 +00:00
|
|
|
<index>
|
2013-03-25 16:54:45 +00:00
|
|
|
<name>property_index</name>
|
|
|
|
<field>
|
|
|
|
<name>userid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
2013-03-19 00:35:12 +00:00
|
|
|
</index>
|
2013-03-25 16:54:45 +00:00
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!--
|
|
|
|
Shares of all types (user-to-user, external-via-link, etc.)
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*share</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Constant OCP\Share::SHARE_TYPE_* -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>share_type</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Foreign Key users::uid or NULL -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>share_with</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2015-12-15 08:51:16 +00:00
|
|
|
<!-- This is the owner of the share
|
|
|
|
which does not have to be the initiator of the share -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>uid_owner</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2015-11-24 11:13:19 +00:00
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Foreign Key users::uid -->
|
2015-12-15 08:51:16 +00:00
|
|
|
<!-- This is the initiator of the share -->
|
2015-11-24 11:13:19 +00:00
|
|
|
<field>
|
2015-12-15 08:51:16 +00:00
|
|
|
<name>uid_initiator</name>
|
2015-11-24 11:13:19 +00:00
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
2014-06-27 14:48:42 +00:00
|
|
|
<length>64</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2015-12-15 08:51:16 +00:00
|
|
|
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Foreign Key share::id or NULL -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>parent</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- E.g. file or folder -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>item_type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Foreign Key filecache::fileid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>item_source</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>item_target</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Foreign Key filecache::fileid -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>file_source</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>file_target</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>512</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Permission bitfield -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>permissions</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Time of share creation -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>stime</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>8</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Whether the receiver accepted the share, if share_with is set. -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>accepted</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 20:48:27 +00:00
|
|
|
<!-- Time of share expiration -->
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>expiration</name>
|
|
|
|
<type>timestamp</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
2012-11-12 13:44:00 +00:00
|
|
|
<field>
|
|
|
|
<name>token</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>32</length>
|
|
|
|
</field>
|
|
|
|
|
2013-08-30 11:53:49 +00:00
|
|
|
<field>
|
|
|
|
<name>mail_send</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-11 16:57:17 +00:00
|
|
|
<index>
|
|
|
|
<name>item_share_type_index</name>
|
|
|
|
<field>
|
|
|
|
<name>item_type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>share_type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
<index>
|
|
|
|
<name>file_source_index</name>
|
|
|
|
<field>
|
|
|
|
<name>file_source</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-11-12 13:44:00 +00:00
|
|
|
<index>
|
|
|
|
<name>token_index</name>
|
|
|
|
<field>
|
|
|
|
<name>token</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-09-19 18:58:42 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 20:52:30 +00:00
|
|
|
<!--
|
|
|
|
Scheduled background jobs.
|
|
|
|
See OC\BackgroundJob\JobList.
|
|
|
|
-->
|
2013-04-20 22:04:58 +00:00
|
|
|
<name>*dbprefix*jobs</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2013-04-20 22:04:58 +00:00
|
|
|
<name>class</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2013-11-02 19:52:38 +00:00
|
|
|
<length>255</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2013-04-20 22:04:58 +00:00
|
|
|
<name>argument</name>
|
2012-09-19 18:58:42 +00:00
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2015-02-23 17:07:13 +00:00
|
|
|
<length>4000</length>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2013-04-20 22:04:58 +00:00
|
|
|
<name>last_run</name>
|
2013-06-02 20:49:54 +00:00
|
|
|
<type>integer</type>
|
2012-09-19 18:58:42 +00:00
|
|
|
<default></default>
|
2013-04-20 22:04:58 +00:00
|
|
|
<notnull>false</notnull>
|
2012-09-19 18:58:42 +00:00
|
|
|
</field>
|
|
|
|
|
2013-04-20 22:04:58 +00:00
|
|
|
<index>
|
|
|
|
<name>job_class_index</name>
|
|
|
|
<field>
|
|
|
|
<name>class</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
2012-09-19 18:58:42 +00:00
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 20:53:55 +00:00
|
|
|
<!--
|
|
|
|
List of usernames, their display name and login password.
|
|
|
|
-->
|
2012-09-19 18:58:42 +00:00
|
|
|
<name>*dbprefix*users</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2013-01-28 13:38:38 +00:00
|
|
|
<field>
|
|
|
|
<name>displayname</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2012-09-19 18:58:42 +00:00
|
|
|
<field>
|
|
|
|
<name>password</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>users_pKey</name>
|
|
|
|
<primary>true</primary>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
2010-06-18 18:08:24 +00:00
|
|
|
|
2012-10-19 17:42:59 +00:00
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 21:06:20 +00:00
|
|
|
<!--
|
|
|
|
List of tags (category) + a unique tag id (id) per user (uid) and type.
|
|
|
|
-->
|
2012-10-19 17:42:59 +00:00
|
|
|
<name>*dbprefix*vcategory</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 21:06:20 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2012-10-19 17:42:59 +00:00
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>category</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>uid_index</name>
|
|
|
|
<field>
|
|
|
|
<name>uid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>type_index</name>
|
|
|
|
<field>
|
|
|
|
<name>type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>category_index</name>
|
|
|
|
<field>
|
|
|
|
<name>category</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 21:06:20 +00:00
|
|
|
<!--
|
|
|
|
Object-Tag associations per tag type.
|
|
|
|
-->
|
2012-10-19 17:42:59 +00:00
|
|
|
<name>*dbprefix*vcategory_to_object</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>objid</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 21:06:20 +00:00
|
|
|
<!-- Foreign Key vcategory::id -->
|
2012-10-19 17:42:59 +00:00
|
|
|
<field>
|
|
|
|
<name>categoryid</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
|
|
|
<name>category_object_index</name>
|
|
|
|
<field>
|
|
|
|
<name>categoryid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>objid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2013-11-11 16:57:17 +00:00
|
|
|
<index>
|
|
|
|
<name>vcategory_objectd_index</name>
|
|
|
|
<field>
|
|
|
|
<name>objid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2012-10-19 17:42:59 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
2012-09-17 14:03:15 +00:00
|
|
|
|
2015-11-26 14:49:14 +00:00
|
|
|
<table>
|
|
|
|
<!--
|
|
|
|
List of system-wide tags
|
|
|
|
-->
|
|
|
|
<name>*dbprefix*systemtag</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Tag name -->
|
|
|
|
<field>
|
|
|
|
<name>name</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Visibility: 0 user-not-visible, 1 user-visible -->
|
|
|
|
<field>
|
|
|
|
<name>visibility</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>1</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Editable: 0 user-not-editable, 1 user-editable -->
|
|
|
|
<field>
|
|
|
|
<name>editable</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>1</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>1</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>tag_ident</name>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>name</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>visibility</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>editable</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
System tag to object associations per object type.
|
|
|
|
-->
|
|
|
|
<name>*dbprefix*systemtag_object_mapping</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<!-- object id (ex: file id for files)-->
|
|
|
|
<field>
|
|
|
|
<name>objectid</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- object type (ex: "files")-->
|
|
|
|
<field>
|
|
|
|
<name>objecttype</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Foreign Key systemtag::id -->
|
|
|
|
<field>
|
|
|
|
<name>systemtagid</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<unique>true</unique>
|
|
|
|
<name>mapping</name>
|
|
|
|
<field>
|
|
|
|
<name>objecttype</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>objectid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>systemtagid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2013-10-30 18:36:29 +00:00
|
|
|
<table>
|
2013-11-26 21:16:14 +00:00
|
|
|
|
2013-11-26 21:13:01 +00:00
|
|
|
<!--
|
|
|
|
Namespaced Key-Value Store for arbitrary data.
|
|
|
|
- Keys are namespaced per userid and appid.
|
|
|
|
- E.g. (admin, files, foo) -> bar
|
|
|
|
-->
|
2013-10-30 18:36:29 +00:00
|
|
|
<name>*dbprefix*privatedata</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>keyid</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
</field>
|
|
|
|
|
2013-11-26 21:13:01 +00:00
|
|
|
<!-- Foreign Key users::uid -->
|
2013-10-30 18:36:29 +00:00
|
|
|
<field>
|
|
|
|
<name>user</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
2014-06-27 14:48:42 +00:00
|
|
|
<length>64</length>
|
2013-10-30 18:36:29 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>app</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>key</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>value</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>255</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
|
|
|
<name>keyid_index</name>
|
|
|
|
<field>
|
|
|
|
<name>keyid</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2015-07-15 14:14:32 +00:00
|
|
|
<table>
|
|
|
|
|
|
|
|
<!--
|
2015-08-03 13:46:19 +00:00
|
|
|
Table for storing transactional file locking
|
2015-07-15 14:14:32 +00:00
|
|
|
-->
|
2015-07-16 10:55:28 +00:00
|
|
|
<name>*dbprefix*file_locks</name>
|
2015-07-15 14:14:32 +00:00
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
2015-07-16 10:55:28 +00:00
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
</field>
|
|
|
|
|
2015-07-15 14:14:32 +00:00
|
|
|
<field>
|
|
|
|
<name>lock</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
2015-08-03 13:46:19 +00:00
|
|
|
<name>key</name>
|
2015-07-15 14:14:32 +00:00
|
|
|
<type>text</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
2015-07-16 10:55:28 +00:00
|
|
|
<field>
|
|
|
|
<name>ttl</name>
|
|
|
|
<type>integer</type>
|
2015-08-03 13:46:19 +00:00
|
|
|
<default>-1</default>
|
2015-07-16 10:55:28 +00:00
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
2015-07-15 14:14:32 +00:00
|
|
|
|
|
|
|
<index>
|
|
|
|
<primary>true</primary>
|
2015-07-16 10:55:28 +00:00
|
|
|
<unique>true</unique>
|
|
|
|
<name>lock_id_index</name>
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
2015-07-15 14:14:32 +00:00
|
|
|
<unique>true</unique>
|
2015-08-03 13:46:19 +00:00
|
|
|
<name>lock_key_index</name>
|
2015-07-15 14:14:32 +00:00
|
|
|
<field>
|
2015-08-03 13:46:19 +00:00
|
|
|
<name>key</name>
|
2015-07-15 14:14:32 +00:00
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2015-07-16 10:55:28 +00:00
|
|
|
<index>
|
|
|
|
<name>lock_ttl_index</name>
|
|
|
|
<field>
|
|
|
|
<name>ttl</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
2015-07-15 14:14:32 +00:00
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2015-11-19 19:50:26 +00:00
|
|
|
<table>
|
|
|
|
<!--
|
|
|
|
default place to store comment data
|
|
|
|
-->
|
|
|
|
<name>*dbprefix*comments</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
<autoincrement>1</autoincrement>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>parent_id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>topmost_parent_id</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>children_count</name>
|
|
|
|
<type>integer</type>
|
|
|
|
<default>0</default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<unsigned>true</unsigned>
|
|
|
|
<length>4</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>actor_type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>actor_id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>message</name>
|
|
|
|
<type>clob</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>verb</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>creation_timestamp</name>
|
|
|
|
<type>timestamp</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>latest_child_timestamp</name>
|
|
|
|
<type>timestamp</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>object_type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>object_id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
<!--
|
|
|
|
TODO: finalize indexes when all queries are done
|
|
|
|
<index>
|
|
|
|
<name>comments_parent_id_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>parent_id</name>
|
|
|
|
<sorting>descending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>comments_actor_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>actor_type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>actor_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>comments_object_index</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>object_type</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>object_id</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>creation_timestamp</name>
|
|
|
|
<sorting>descending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
-->
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2016-01-28 21:59:48 +00:00
|
|
|
<table>
|
|
|
|
<!--
|
|
|
|
default place to store per user and object read markers
|
|
|
|
-->
|
|
|
|
<name>*dbprefix*comments_read_markers</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>user_id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>marker_datetime</name>
|
|
|
|
<type>timestamp</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>object_type</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>object_id</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2015-08-24 15:13:16 +00:00
|
|
|
<table>
|
|
|
|
<!--
|
|
|
|
Encrypted credentials storage
|
|
|
|
-->
|
|
|
|
<name>*dbprefix*credentials</name>
|
|
|
|
|
|
|
|
<declaration>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>user</name>
|
|
|
|
<type>text</type>
|
|
|
|
<default></default>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>identifier</name>
|
|
|
|
<type>text</type>
|
|
|
|
<notnull>true</notnull>
|
|
|
|
<length>64</length>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<field>
|
|
|
|
<name>credentials</name>
|
|
|
|
<type>clob</type>
|
|
|
|
<notnull>false</notnull>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>credentials_user_id</name>
|
|
|
|
<primary>true</primary>
|
|
|
|
<unique>true</unique>
|
|
|
|
<field>
|
|
|
|
<name>user</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>identifier</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<name>credentials_user</name>
|
|
|
|
<unique>false</unique>
|
|
|
|
<field>
|
|
|
|
<name>user</name>
|
|
|
|
<sorting>ascending</sorting>
|
|
|
|
</field>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</declaration>
|
|
|
|
|
|
|
|
</table>
|
2013-10-30 18:36:29 +00:00
|
|
|
|
2010-06-18 18:08:24 +00:00
|
|
|
</database>
|