1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101 |
- <?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>integer</type>
- <default>1</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>
- <!-- 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>
- <field>
- <name>mount_id</name>
- <type>integer</type>
- </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_mount_id_index</name>
- <unique>false</unique>
- <field>
- <name>mount_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>
- <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>
- <field>
- <name>checksum</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>255</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 -->
- <!-- This is the owner of the share
- which does not have to be the initiator of the share -->
- <field>
- <name>uid_owner</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <!-- Foreign Key users::uid -->
- <!-- This is the initiator of the share -->
- <field>
- <name>uid_initiator</name>
- <type>text</type>
- <default></default>
- <notnull>false</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>
- <!-- timestamp when the job was executed the last time -->
- <name>last_run</name>
- <type>integer</type>
- <default></default>
- <notnull>false</notnull>
- </field>
- <field>
- <!-- timestamp when the job was checked if it needs execution the last time -->
- <name>last_checked</name>
- <type>integer</type>
- <default></default>
- <notnull>false</notnull>
- </field>
- <field>
- <!-- timestamp when the job was reserved the last time, 1 day timeout -->
- <name>reserved_at</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>
- <name>*dbprefix*authtoken</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>login_name</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>password</name>
- <type>clob</type>
- <default></default>
- <notnull>false</notnull>
- </field>
- <field>
- <name>name</name>
- <type>clob</type>
- <default></default>
- <notnull>true</notnull>
- </field>
- <field>
- <name>token</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>200</length>
- </field>
- <field>
- <name>type</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <unsigned>true</unsigned>
- <length>2</length>
- </field>
- <field>
- <name>last_activity</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <unsigned>true</unsigned>
- <length>4</length>
- </field>
- <field>
- <name>last_check</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <unsigned>true</unsigned>
- <length>4</length>
- </field>
- <index>
- <name>authtoken_token_index</name>
- <unique>true</unique>
- <field>
- <name>token</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>authtoken_last_activity_index</name>
- <field>
- <name>last_activity</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!--
- List of usernames, their display name and login password.
- -->
- <name>*dbprefix*bruteforce_attempts</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>action</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>occurred</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <unsigned>true</unsigned>
- <length>4</length>
- </field>
- <field>
- <name>ip</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <field>
- <name>subnet</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <field>
- <name>metadata</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <index>
- <name>bruteforce_attempts_ip</name>
- <field>
- <name>ip</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>bruteforce_attempts_subnet</name>
- <field>
- <name>subnet</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>
- <!--
- 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>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>64</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>
- <!--
- System tag to group mapping
- -->
- <name>*dbprefix*systemtag_group</name>
- <declaration>
- <!-- Foreign Key systemtag::id -->
- <field>
- <name>systemtagid</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <unsigned>true</unsigned>
- <length>4</length>
- </field>
- <field>
- <name>gid</name>
- <type>string</type>
- <notnull>true</notnull>
- </field>
- <index>
- <name>systemtag_group</name>
- <primary>true</primary>
- <unique>true</unique>
- <field>
- <name>gid</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>systemtagid</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>
- <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>
- <index>
- <name>comments_parent_id_index</name>
- <unique>false</unique>
- <field>
- <name>parent_id</name>
- <sorting>descending</sorting>
- </field>
- </index>
- <index>
- <name>comments_topmost_parent_id_idx</name>
- <unique>false</unique>
- <field>
- <name>topmost_parent_id</name>
- <sorting>descending</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>
- <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>
- </declaration>
- </table>
- <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>
- <index>
- <name>comments_marker_object_index</name>
- <unique>false</unique>
- <field>
- <name>object_type</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>object_id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>comments_marker_index</name>
- <unique>true</unique>
- <field>
- <name>user_id</name>
- <sorting>descending</sorting>
- </field>
- <field>
- <name>object_type</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>object_id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <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>
- <table>
- <!-- Extra admin settings sections -->
- <name>*dbprefix*admin_sections</name>
- <declaration>
- <field>
- <name>id</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>64</length>
- </field>
- <field>
- <name>class</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <field>
- <name>priority</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <index>
- <name>admin_sections_id_index</name>
- <primary>true</primary>
- <field>
- <name>id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>admin_sections_class</name>
- <unique>true</unique>
- <field>
- <name>class</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- <table>
- <!-- Extra admin settings -->
- <name>*dbprefix*admin_settings</name>
- <declaration>
- <field>
- <name>id</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <autoincrement>1</autoincrement>
- <length>4</length>
- </field>
- <field>
- <name>class</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <length>255</length>
- </field>
- <!-- id of the section, foreign key: admin_sections.id -->
- <field>
- <name>section</name>
- <type>text</type>
- <default></default>
- <notnull>false</notnull>
- <length>64</length>
- </field>
- <field>
- <name>priority</name>
- <type>integer</type>
- <default></default>
- <notnull>true</notnull>
- <length>1</length>
- </field>
- <index>
- <name>admin_settings_id_index</name>
- <primary>true</primary>
- <field>
- <name>id</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>admin_settings_class</name>
- <unique>true</unique>
- <field>
- <name>class</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- <index>
- <name>admin_settings_section</name>
- <unique>false</unique>
- <field>
- <name>section</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
- </database>
|