summaryrefslogtreecommitdiffstats
path: root/db_structure.xml
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-11-26 15:49:14 +0100
committerVincent Petry <pvince81@owncloud.com>2015-11-27 17:54:29 +0100
commitb666367a7902c5d935f7aef1704711b8695690b2 (patch)
treefc65f2208512f53e8390c55d84bfcf54ab60fdb7 /db_structure.xml
parent129ec4fb4054f2f145285772b94d7d5e1cd56286 (diff)
downloadnextcloud-server-b666367a7902c5d935f7aef1704711b8695690b2.tar.gz
nextcloud-server-b666367a7902c5d935f7aef1704711b8695690b2.zip
Added system tags data structure and PHP side managers
Added SystemTagManager and SystemTagObjectMapper
Diffstat (limited to 'db_structure.xml')
-rw-r--r--db_structure.xml124
1 files changed, 124 insertions, 0 deletions
diff --git a/db_structure.xml b/db_structure.xml
index 8135746233e..637e95d6ef4 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -1064,6 +1064,130 @@
</table>
<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>
+
+ <table>
<!--
Namespaced Key-Value Store for arbitrary data.