diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-11-26 15:49:14 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-11-27 17:54:29 +0100 |
commit | b666367a7902c5d935f7aef1704711b8695690b2 (patch) | |
tree | fc65f2208512f53e8390c55d84bfcf54ab60fdb7 /db_structure.xml | |
parent | 129ec4fb4054f2f145285772b94d7d5e1cd56286 (diff) | |
download | nextcloud-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.xml | 124 |
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. |