1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270 |
- <?xml version="1.0" encoding="utf-8" ?>
- <database>
- <name>*dbname*</name>
- <create>true</create>
- <overwrite>false</overwrite>
- <charset>utf8</charset>
- <table>
- <!--
- Namespaced Key-Value Store for Application Configuration.
- - Keys are namespaced per appid.
- - E.g. (core, global_cache_gc_lastrun) -> 1385463286
- -->
- <name>*dbprefix*appconfig</name>
- <declaration>
- <field>
- <name>appid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>32</length>
- </field>
- <field>
- <name>configkey</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>configvalue</name>
- <type>clob</type>
- <notnull>false</notnull>
- </field>
- <index>
- <name>appconfig_appid_key_index</name>
- <primary>true</primary>
- <unique>true</unique>
- <field>
- <name>appid</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>configkey</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>appconfig_config_key_index</name>
- <field>
- <name>configkey</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>appconfig_appid_key</name>
- <field>
- <name>appid</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- Bidirectional Map for Storage Names and Storage Ids.
- - Assigns each storage name a unique storage id integer.
- - Long storage names are hashed.
- - E.g. local::/tmp/ <-> 2
- - E.g. b5db994aa8c6625100e418406c798269 <-> 27
- -->
- <name>*dbprefix*storages</name>
- <declaration>
- <field>
- <name>id</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <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>
- <field>
- <name>available</name>
- <type>boolean</type>
- <default>true</default>
- <notnull>true</notnull>
- </field>
- <field>
- <name>last_checked</name>
- <type>integer</type>
- </field>
- <index>
- <name>storages_id_index</name>
- <unique>true</unique>
- <field>
- <name>id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <name>*dbprefix*file_map</name>
- <declaration>
- <field>
- <name>logic_path</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>512</length>
- </field>
- <field>
- <name>logic_path_hash</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>32</length>
- </field>
- <field>
- <name>physic_path</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>512</length>
- </field>
- <field>
- <name>physic_path_hash</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>32</length>
- </field>
- <index>
- <name>file_map_lp_index</name>
- <primary>true</primary>
- <unique>true</unique>
- <field>
- <name>logic_path_hash</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>file_map_pp_index</name>
- <unique>true</unique>
- <field>
- <name>physic_path_hash</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- Bidirectional Map for Mimetypes and Mimetype Id
- - Assigns each mimetype (and supertype) a unique mimetype id integer.
- - E.g. application <-> 5
- - E.g. application/pdf <-> 6
- -->
- <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>
- <length>255</length>
- </field>
- <index>
- <name>mimetype_id_index</name>
- <unique>true</unique>
- <field>
- <name>mimetype</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- 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)
- -->
- <name>*dbprefix*filecache</name>
- <declaration>
- <field>
- <name>fileid</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <autoincrement>1</autoincrement>
- <length>4</length>
- </field>
- <!-- Foreign Key storages::numeric_id -->
- <field>
- <name>storage</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>path</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>4000</length>
- </field>
- <field>
- <name>path_hash</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>32</length>
- </field>
- <!-- Foreign Key filecache::fileid -->
- <field>
- <name>parent</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>name</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>250</length>
- </field>
- <!-- Foreign Key mimetypes::id -->
- <field>
- <name>mimetype</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <!-- Foreign Key mimetypes::id -->
- <field>
- <name>mimepart</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>size</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>8</length>
- </field>
- <field>
- <name>mtime</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>storage_mtime</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>encrypted</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>unencrypted_size</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>8</length>
- </field>
- <field>
- <name>etag</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>40</length>
- </field>
- <field>
- <name>permissions</name>
- <type>integer</type>
- <default>0</default>
- <notnull>false</notnull>
- <length>4</length>
- </field>
- <index>
- <name>fs_storage_path_hash</name>
- <unique>true</unique>
- <field>
- <name>storage</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>path_hash</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>fs_parent_name_hash</name>
- <field>
- <name>parent</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>name</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <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>
- <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>
- </declaration>
- </table>
- <table>
- <!--
- 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)
- -->
- <name>*dbprefix*group_user</name>
- <declaration>
- <!-- Foreign Key groups::gid -->
- <field>
- <name>gid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <!-- Foreign Key users::uid -->
- <field>
- <name>uid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <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>
- <index>
- <name>gu_uid_index</name>
- <field>
- <name>uid</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- 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)
- NOTE: This could (very likely) be reduced to a single bit in group_user
- instead of repeating varchars gid and uid here
- -->
- <name>*dbprefix*group_admin</name>
- <declaration>
- <!-- Foreign Key groups::gid -->
- <field>
- <name>gid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <!-- Foreign Key users::uid -->
- <field>
- <name>uid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <index>
- <name>group_admin_uid</name>
- <field>
- <name>uid</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <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>
- </declaration>
- </table>
- <table>
- <!--
- A simple list of groups.
- -->
- <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>
- <!--
- Namespaced Key-Value Store for User Preferences
- - Keys are namespaced per userid and appid.
- - E.g. (admin, files, cache_version) -> 5
- -->
- <name>*dbprefix*preferences</name>
- <declaration>
- <!-- Foreign Key users::uid -->
- <field>
- <name>userid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>appid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>32</length>
- </field>
- <field>
- <name>configkey</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>configvalue</name>
- <type>clob</type>
- <notnull>false</notnull>
- </field>
- <index>
- <name>pref_userid_appid_key_index</name>
- <primary>true</primary>
- <unique>true</unique>
- <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>
- </declaration>
- </table>
- <table>
- <!--
- WebDAV properties.
- -->
- <name>*dbprefix*properties</name>
- <declaration>
- <field>
- <name>id</name>
- <autoincrement>1</autoincrement>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <!-- Foreign Key users::uid -->
- <field>
- <name>userid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </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>
- <index>
- <name>property_index</name>
- <field>
- <name>userid</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- Shares of all types (user-to-user, external-via-link, etc.)
- -->
- <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>
- <!-- Constant OCP\Share::SHARE_TYPE_* -->
- <field>
- <name>share_type</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <!-- Foreign Key users::uid or NULL -->
- <field>
- <name>share_with</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>255</length>
- </field>
- <!-- Foreign Key users::uid -->
- <field>
- <name>uid_owner</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <!-- Foreign Key share::id or NULL -->
- <field>
- <name>parent</name>
- <type>integer</type>
- <notnull>false</notnull>
- <length>4</length>
- </field>
- <!-- E.g. file or folder -->
- <field>
- <name>item_type</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <!-- Foreign Key filecache::fileid -->
- <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>
- <!-- Foreign Key filecache::fileid -->
- <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>
- <!-- Permission bitfield -->
- <field>
- <name>permissions</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <!-- Time of share creation -->
- <field>
- <name>stime</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>8</length>
- </field>
- <!-- Whether the receiver accepted the share, if share_with is set. -->
- <field>
- <name>accepted</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <!-- Time of share expiration -->
- <field>
- <name>expiration</name>
- <type>timestamp</type>
- <default></default>
- <notnull>false</notnull>
- </field>
- <field>
- <name>token</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>32</length>
- </field>
- <field>
- <name>mail_send</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <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>
- <index>
- <name>token_index</name>
- <field>
- <name>token</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- Scheduled background jobs.
- See OC\BackgroundJob\JobList.
- -->
- <name>*dbprefix*jobs</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>
- <field>
- <name>class</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <field>
- <name>argument</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>4000</length>
- </field>
- <field>
- <name>last_run</name>
- <type>integer</type>
- <default></default>
- <notnull>false</notnull>
- </field>
- <index>
- <name>job_class_index</name>
- <field>
- <name>class</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- List of usernames, their display name and login password.
- -->
- <name>*dbprefix*users</name>
- <declaration>
- <field>
- <name>uid</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>displayname</name>
- <type>text</type>
- <default></default>
- <length>64</length>
- </field>
- <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>
- <table>
- <!--
- List of tags (category) + a unique tag id (id) per user (uid) and type.
- -->
- <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>
- <!-- Foreign Key users::uid -->
- <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>
- <!--
- Object-Tag associations per tag type.
- -->
- <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>
- <!-- Foreign Key vcategory::id -->
- <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>
- <index>
- <name>vcategory_objectd_index</name>
- <field>
- <name>objid</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>type</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- Namespaced Key-Value Store for arbitrary data.
- - Keys are namespaced per userid and appid.
- - E.g. (admin, files, foo) -> bar
- -->
- <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>
- <!-- Foreign Key users::uid -->
- <field>
- <name>user</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </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>
- <table>
- <!--
- Table for storing transactional file locking
- -->
- <name>*dbprefix*file_locks</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>lock</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <field>
- <name>key</name>
- <type>text</type>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>ttl</name>
- <type>integer</type>
- <default>-1</default>
- <notnull>true</notnull>
- <length>4</length>
- </field>
- <index>
- <primary>true</primary>
- <unique>true</unique>
- <name>lock_id_index</name>
- <field>
- <name>id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <unique>true</unique>
- <name>lock_key_index</name>
- <field>
- <name>key</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>lock_ttl_index</name>
- <field>
- <name>ttl</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- </database>
|