db_structure.xml 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <database>
  3. <name>*dbname*</name>
  4. <create>true</create>
  5. <overwrite>false</overwrite>
  6. <charset>utf8</charset>
  7. <table>
  8. <!--
  9. Namespaced Key-Value Store for Application Configuration.
  10. - Keys are namespaced per appid.
  11. - E.g. (core, global_cache_gc_lastrun) -> 1385463286
  12. -->
  13. <name>*dbprefix*appconfig</name>
  14. <declaration>
  15. <field>
  16. <name>appid</name>
  17. <type>text</type>
  18. <default></default>
  19. <notnull>true</notnull>
  20. <length>32</length>
  21. </field>
  22. <field>
  23. <name>configkey</name>
  24. <type>text</type>
  25. <default></default>
  26. <notnull>true</notnull>
  27. <length>64</length>
  28. </field>
  29. <field>
  30. <name>configvalue</name>
  31. <type>clob</type>
  32. <notnull>false</notnull>
  33. </field>
  34. <index>
  35. <name>appconfig_appid_key_index</name>
  36. <primary>true</primary>
  37. <unique>true</unique>
  38. <field>
  39. <name>appid</name>
  40. <sorting>ascending</sorting>
  41. </field>
  42. <field>
  43. <name>configkey</name>
  44. <sorting>ascending</sorting>
  45. </field>
  46. </index>
  47. <index>
  48. <name>appconfig_config_key_index</name>
  49. <field>
  50. <name>configkey</name>
  51. <sorting>ascending</sorting>
  52. </field>
  53. </index>
  54. <index>
  55. <name>appconfig_appid_key</name>
  56. <field>
  57. <name>appid</name>
  58. <sorting>ascending</sorting>
  59. </field>
  60. </index>
  61. </declaration>
  62. </table>
  63. <table>
  64. <!--
  65. Bidirectional Map for Storage Names and Storage Ids.
  66. - Assigns each storage name a unique storage id integer.
  67. - Long storage names are hashed.
  68. - E.g. local::/tmp/ <-> 2
  69. - E.g. b5db994aa8c6625100e418406c798269 <-> 27
  70. -->
  71. <name>*dbprefix*storages</name>
  72. <declaration>
  73. <field>
  74. <name>id</name>
  75. <type>text</type>
  76. <default></default>
  77. <notnull>false</notnull>
  78. <length>64</length>
  79. </field>
  80. <field>
  81. <name>numeric_id</name>
  82. <type>integer</type>
  83. <default>0</default>
  84. <notnull>true</notnull>
  85. <autoincrement>1</autoincrement>
  86. <length>4</length>
  87. </field>
  88. <field>
  89. <name>available</name>
  90. <type>integer</type>
  91. <default>1</default>
  92. <notnull>true</notnull>
  93. </field>
  94. <field>
  95. <name>last_checked</name>
  96. <type>integer</type>
  97. </field>
  98. <index>
  99. <name>storages_id_index</name>
  100. <unique>true</unique>
  101. <field>
  102. <name>id</name>
  103. <sorting>ascending</sorting>
  104. </field>
  105. </index>
  106. </declaration>
  107. </table>
  108. <!-- a list of all mounted storage per user, populated on filesystem setup -->
  109. <table>
  110. <name>*dbprefix*mounts</name>
  111. <declaration>
  112. <field>
  113. <name>id</name>
  114. <type>integer</type>
  115. <default>0</default>
  116. <notnull>true</notnull>
  117. <autoincrement>1</autoincrement>
  118. <length>4</length>
  119. </field>
  120. <field>
  121. <name>storage_id</name>
  122. <type>integer</type>
  123. <notnull>true</notnull>
  124. </field>
  125. <!-- fileid of the root of the mount, foreign key: oc_filecache.fileid -->
  126. <field>
  127. <name>root_id</name>
  128. <type>integer</type>
  129. <notnull>true</notnull>
  130. </field>
  131. <field>
  132. <name>user_id</name>
  133. <type>text</type>
  134. <notnull>true</notnull>
  135. <length>64</length>
  136. </field>
  137. <field>
  138. <name>mount_point</name>
  139. <type>text</type>
  140. <notnull>true</notnull>
  141. <length>4000</length>
  142. </field>
  143. <field>
  144. <name>mount_id</name>
  145. <type>integer</type>
  146. </field>
  147. <index>
  148. <name>mounts_user_index</name>
  149. <unique>false</unique>
  150. <field>
  151. <name>user_id</name>
  152. <sorting>ascending</sorting>
  153. </field>
  154. </index>
  155. <index>
  156. <name>mounts_storage_index</name>
  157. <unique>false</unique>
  158. <field>
  159. <name>storage_id</name>
  160. <sorting>ascending</sorting>
  161. </field>
  162. </index>
  163. <index>
  164. <name>mounts_root_index</name>
  165. <unique>false</unique>
  166. <field>
  167. <name>root_id</name>
  168. <sorting>ascending</sorting>
  169. </field>
  170. </index>
  171. <index>
  172. <name>mounts_mount_id_index</name>
  173. <unique>false</unique>
  174. <field>
  175. <name>mount_id</name>
  176. <sorting>ascending</sorting>
  177. </field>
  178. </index>
  179. <index>
  180. <name>mounts_user_root_index</name>
  181. <unique>true</unique>
  182. <field>
  183. <name>user_id</name>
  184. <sorting>ascending</sorting>
  185. </field>
  186. <field>
  187. <name>root_id</name>
  188. <sorting>ascending</sorting>
  189. </field>
  190. </index>
  191. </declaration>
  192. </table>
  193. <table>
  194. <!--
  195. Bidirectional Map for Mimetypes and Mimetype Id
  196. - Assigns each mimetype (and supertype) a unique mimetype id integer.
  197. - E.g. application <-> 5
  198. - E.g. application/pdf <-> 6
  199. -->
  200. <name>*dbprefix*mimetypes</name>
  201. <declaration>
  202. <field>
  203. <name>id</name>
  204. <type>integer</type>
  205. <default>0</default>
  206. <notnull>true</notnull>
  207. <autoincrement>1</autoincrement>
  208. <length>4</length>
  209. </field>
  210. <field>
  211. <name>mimetype</name>
  212. <type>text</type>
  213. <default></default>
  214. <notnull>true</notnull>
  215. <length>255</length>
  216. </field>
  217. <index>
  218. <name>mimetype_id_index</name>
  219. <unique>true</unique>
  220. <field>
  221. <name>mimetype</name>
  222. <sorting>ascending</sorting>
  223. </field>
  224. </index>
  225. </declaration>
  226. </table>
  227. <table>
  228. <!--
  229. Main file table containing one row for each directory and file.
  230. - Assigns a unique integer fileid to each file (and directory)
  231. - Assigns an etag to each file (and directory)
  232. - Caches various file/dir properties such as:
  233. - path (filename, e.g. files/combinatoricslib-2.0_doc.zip)
  234. - path_hash = md5(path)
  235. - name (basename, e.g. combinatoricslib-2.0_doc.zip)
  236. - size (for directories this is the sum of all contained file sizes)
  237. -->
  238. <name>*dbprefix*filecache</name>
  239. <declaration>
  240. <field>
  241. <name>fileid</name>
  242. <type>integer</type>
  243. <default>0</default>
  244. <notnull>true</notnull>
  245. <autoincrement>1</autoincrement>
  246. <length>4</length>
  247. </field>
  248. <!-- Foreign Key storages::numeric_id -->
  249. <field>
  250. <name>storage</name>
  251. <type>integer</type>
  252. <default></default>
  253. <notnull>true</notnull>
  254. <length>4</length>
  255. </field>
  256. <field>
  257. <name>path</name>
  258. <type>text</type>
  259. <default></default>
  260. <notnull>false</notnull>
  261. <length>4000</length>
  262. </field>
  263. <field>
  264. <name>path_hash</name>
  265. <type>text</type>
  266. <default></default>
  267. <notnull>true</notnull>
  268. <length>32</length>
  269. </field>
  270. <!-- Foreign Key filecache::fileid -->
  271. <field>
  272. <name>parent</name>
  273. <type>integer</type>
  274. <default></default>
  275. <notnull>true</notnull>
  276. <length>4</length>
  277. </field>
  278. <field>
  279. <name>name</name>
  280. <type>text</type>
  281. <default></default>
  282. <notnull>false</notnull>
  283. <length>250</length>
  284. </field>
  285. <!-- Foreign Key mimetypes::id -->
  286. <field>
  287. <name>mimetype</name>
  288. <type>integer</type>
  289. <default></default>
  290. <notnull>true</notnull>
  291. <length>4</length>
  292. </field>
  293. <!-- Foreign Key mimetypes::id -->
  294. <field>
  295. <name>mimepart</name>
  296. <type>integer</type>
  297. <default></default>
  298. <notnull>true</notnull>
  299. <length>4</length>
  300. </field>
  301. <field>
  302. <name>size</name>
  303. <type>integer</type>
  304. <default></default>
  305. <notnull>true</notnull>
  306. <length>8</length>
  307. </field>
  308. <field>
  309. <name>mtime</name>
  310. <type>integer</type>
  311. <default></default>
  312. <notnull>true</notnull>
  313. <length>4</length>
  314. </field>
  315. <field>
  316. <name>storage_mtime</name>
  317. <type>integer</type>
  318. <default></default>
  319. <notnull>true</notnull>
  320. <length>4</length>
  321. </field>
  322. <field>
  323. <name>encrypted</name>
  324. <type>integer</type>
  325. <default>0</default>
  326. <notnull>true</notnull>
  327. <length>4</length>
  328. </field>
  329. <field>
  330. <name>unencrypted_size</name>
  331. <type>integer</type>
  332. <default>0</default>
  333. <notnull>true</notnull>
  334. <length>8</length>
  335. </field>
  336. <field>
  337. <name>etag</name>
  338. <type>text</type>
  339. <default></default>
  340. <notnull>false</notnull>
  341. <length>40</length>
  342. </field>
  343. <field>
  344. <name>permissions</name>
  345. <type>integer</type>
  346. <default>0</default>
  347. <notnull>false</notnull>
  348. <length>4</length>
  349. </field>
  350. <field>
  351. <name>checksum</name>
  352. <type>text</type>
  353. <default></default>
  354. <notnull>false</notnull>
  355. <length>255</length>
  356. </field>
  357. <index>
  358. <name>fs_storage_path_hash</name>
  359. <unique>true</unique>
  360. <field>
  361. <name>storage</name>
  362. <sorting>ascending</sorting>
  363. </field>
  364. <field>
  365. <name>path_hash</name>
  366. <sorting>ascending</sorting>
  367. </field>
  368. </index>
  369. <index>
  370. <name>fs_parent_name_hash</name>
  371. <field>
  372. <name>parent</name>
  373. <sorting>ascending</sorting>
  374. </field>
  375. <field>
  376. <name>name</name>
  377. <sorting>ascending</sorting>
  378. </field>
  379. </index>
  380. <index>
  381. <name>fs_storage_mimetype</name>
  382. <field>
  383. <name>storage</name>
  384. <sorting>ascending</sorting>
  385. </field>
  386. <field>
  387. <name>mimetype</name>
  388. <sorting>ascending</sorting>
  389. </field>
  390. </index>
  391. <index>
  392. <name>fs_storage_mimepart</name>
  393. <field>
  394. <name>storage</name>
  395. <sorting>ascending</sorting>
  396. </field>
  397. <field>
  398. <name>mimepart</name>
  399. <sorting>ascending</sorting>
  400. </field>
  401. </index>
  402. <index>
  403. <name>fs_storage_size</name>
  404. <field>
  405. <name>storage</name>
  406. <sorting>ascending</sorting>
  407. </field>
  408. <field>
  409. <name>size</name>
  410. <sorting>ascending</sorting>
  411. </field>
  412. <field>
  413. <name>fileid</name>
  414. </field>
  415. </index>
  416. </declaration>
  417. </table>
  418. <table>
  419. <!--
  420. Stores which groups have which users as members in an n:m relationship.
  421. - Maps group id (gid) to a set of users (uid)
  422. - Maps user id (uid) to a set of groups (gid) (but without index)
  423. -->
  424. <name>*dbprefix*group_user</name>
  425. <declaration>
  426. <!-- Foreign Key groups::gid -->
  427. <field>
  428. <name>gid</name>
  429. <type>text</type>
  430. <default></default>
  431. <notnull>true</notnull>
  432. <length>64</length>
  433. </field>
  434. <!-- Foreign Key users::uid -->
  435. <field>
  436. <name>uid</name>
  437. <type>text</type>
  438. <default></default>
  439. <notnull>true</notnull>
  440. <length>64</length>
  441. </field>
  442. <index>
  443. <name>gu_gid_uid_index</name>
  444. <primary>true</primary>
  445. <unique>true</unique>
  446. <field>
  447. <name>gid</name>
  448. <sorting>ascending</sorting>
  449. </field>
  450. <field>
  451. <name>uid</name>
  452. <sorting>ascending</sorting>
  453. </field>
  454. </index>
  455. <index>
  456. <name>gu_uid_index</name>
  457. <field>
  458. <name>uid</name>
  459. <sorting>ascending</sorting>
  460. </field>
  461. </index>
  462. </declaration>
  463. </table>
  464. <table>
  465. <!--
  466. Stores which groups have which users as admins in an n:m relationship.
  467. - Maps group id (gid) to a set of users (uid)
  468. - Maps user id (uid) to a set of groups (gid)
  469. NOTE: This could (very likely) be reduced to a single bit in group_user
  470. instead of repeating varchars gid and uid here
  471. -->
  472. <name>*dbprefix*group_admin</name>
  473. <declaration>
  474. <!-- Foreign Key groups::gid -->
  475. <field>
  476. <name>gid</name>
  477. <type>text</type>
  478. <default></default>
  479. <notnull>true</notnull>
  480. <length>64</length>
  481. </field>
  482. <!-- Foreign Key users::uid -->
  483. <field>
  484. <name>uid</name>
  485. <type>text</type>
  486. <default></default>
  487. <notnull>true</notnull>
  488. <length>64</length>
  489. </field>
  490. <index>
  491. <name>group_admin_uid</name>
  492. <field>
  493. <name>uid</name>
  494. <sorting>ascending</sorting>
  495. </field>
  496. </index>
  497. <index>
  498. <name>ga_gid_uid_index</name>
  499. <primary>true</primary>
  500. <unique>true</unique>
  501. <field>
  502. <name>gid</name>
  503. <sorting>ascending</sorting>
  504. </field>
  505. <field>
  506. <name>uid</name>
  507. <sorting>ascending</sorting>
  508. </field>
  509. </index>
  510. </declaration>
  511. </table>
  512. <table>
  513. <!--
  514. A simple list of groups.
  515. -->
  516. <name>*dbprefix*groups</name>
  517. <declaration>
  518. <field>
  519. <name>gid</name>
  520. <type>text</type>
  521. <default></default>
  522. <notnull>true</notnull>
  523. <length>64</length>
  524. </field>
  525. <index>
  526. <name>groups_pKey</name>
  527. <primary>true</primary>
  528. <field>
  529. <name>gid</name>
  530. <sorting>ascending</sorting>
  531. </field>
  532. </index>
  533. </declaration>
  534. </table>
  535. <table>
  536. <!--
  537. Namespaced Key-Value Store for User Preferences
  538. - Keys are namespaced per userid and appid.
  539. - E.g. (admin, files, cache_version) -> 5
  540. -->
  541. <name>*dbprefix*preferences</name>
  542. <declaration>
  543. <!-- Foreign Key users::uid -->
  544. <field>
  545. <name>userid</name>
  546. <type>text</type>
  547. <default></default>
  548. <notnull>true</notnull>
  549. <length>64</length>
  550. </field>
  551. <field>
  552. <name>appid</name>
  553. <type>text</type>
  554. <default></default>
  555. <notnull>true</notnull>
  556. <length>32</length>
  557. </field>
  558. <field>
  559. <name>configkey</name>
  560. <type>text</type>
  561. <default></default>
  562. <notnull>true</notnull>
  563. <length>64</length>
  564. </field>
  565. <field>
  566. <name>configvalue</name>
  567. <type>clob</type>
  568. <notnull>false</notnull>
  569. </field>
  570. <index>
  571. <name>pref_userid_appid_key_index</name>
  572. <primary>true</primary>
  573. <unique>true</unique>
  574. <field>
  575. <name>userid</name>
  576. <sorting>ascending</sorting>
  577. </field>
  578. <field>
  579. <name>appid</name>
  580. <sorting>ascending</sorting>
  581. </field>
  582. <field>
  583. <name>configkey</name>
  584. <sorting>ascending</sorting>
  585. </field>
  586. </index>
  587. </declaration>
  588. </table>
  589. <table>
  590. <!--
  591. WebDAV properties.
  592. -->
  593. <name>*dbprefix*properties</name>
  594. <declaration>
  595. <field>
  596. <name>id</name>
  597. <autoincrement>1</autoincrement>
  598. <type>integer</type>
  599. <default>0</default>
  600. <notnull>true</notnull>
  601. <length>4</length>
  602. </field>
  603. <!-- Foreign Key users::uid -->
  604. <field>
  605. <name>userid</name>
  606. <type>text</type>
  607. <default></default>
  608. <notnull>true</notnull>
  609. <length>64</length>
  610. </field>
  611. <field>
  612. <name>propertypath</name>
  613. <type>text</type>
  614. <default></default>
  615. <notnull>true</notnull>
  616. <length>255</length>
  617. </field>
  618. <field>
  619. <name>propertyname</name>
  620. <type>text</type>
  621. <default></default>
  622. <notnull>true</notnull>
  623. <length>255</length>
  624. </field>
  625. <field>
  626. <name>propertyvalue</name>
  627. <type>clob</type>
  628. <notnull>true</notnull>
  629. </field>
  630. <index>
  631. <name>property_index</name>
  632. <field>
  633. <name>userid</name>
  634. <sorting>ascending</sorting>
  635. </field>
  636. </index>
  637. </declaration>
  638. </table>
  639. <table>
  640. <!--
  641. Shares of all types (user-to-user, external-via-link, etc.)
  642. -->
  643. <name>*dbprefix*share</name>
  644. <declaration>
  645. <field>
  646. <name>id</name>
  647. <autoincrement>1</autoincrement>
  648. <type>integer</type>
  649. <default>0</default>
  650. <notnull>true</notnull>
  651. <length>4</length>
  652. </field>
  653. <!-- Constant OCP\Share::SHARE_TYPE_* -->
  654. <field>
  655. <name>share_type</name>
  656. <type>integer</type>
  657. <default>0</default>
  658. <notnull>true</notnull>
  659. <length>1</length>
  660. </field>
  661. <!-- Foreign Key users::uid or NULL -->
  662. <field>
  663. <name>share_with</name>
  664. <type>text</type>
  665. <default></default>
  666. <notnull>false</notnull>
  667. <length>255</length>
  668. </field>
  669. <field>
  670. <name>password</name>
  671. <type>text</type>
  672. <default></default>
  673. <notnull>false</notnull>
  674. <length>255</length>
  675. </field>
  676. <!-- Foreign Key users::uid -->
  677. <!-- This is the owner of the share
  678. which does not have to be the initiator of the share -->
  679. <field>
  680. <name>uid_owner</name>
  681. <type>text</type>
  682. <default></default>
  683. <notnull>true</notnull>
  684. <length>64</length>
  685. </field>
  686. <!-- Foreign Key users::uid -->
  687. <!-- This is the initiator of the share -->
  688. <field>
  689. <name>uid_initiator</name>
  690. <type>text</type>
  691. <default></default>
  692. <notnull>false</notnull>
  693. <length>64</length>
  694. </field>
  695. <!-- Foreign Key share::id or NULL -->
  696. <field>
  697. <name>parent</name>
  698. <type>integer</type>
  699. <notnull>false</notnull>
  700. <length>4</length>
  701. </field>
  702. <!-- E.g. file or folder -->
  703. <field>
  704. <name>item_type</name>
  705. <type>text</type>
  706. <default></default>
  707. <notnull>true</notnull>
  708. <length>64</length>
  709. </field>
  710. <!-- Foreign Key filecache::fileid -->
  711. <field>
  712. <name>item_source</name>
  713. <type>text</type>
  714. <default></default>
  715. <notnull>false</notnull>
  716. <length>255</length>
  717. </field>
  718. <field>
  719. <name>item_target</name>
  720. <type>text</type>
  721. <default></default>
  722. <notnull>false</notnull>
  723. <length>255</length>
  724. </field>
  725. <!-- Foreign Key filecache::fileid -->
  726. <field>
  727. <name>file_source</name>
  728. <type>integer</type>
  729. <notnull>false</notnull>
  730. <length>4</length>
  731. </field>
  732. <field>
  733. <name>file_target</name>
  734. <type>text</type>
  735. <default></default>
  736. <notnull>false</notnull>
  737. <length>512</length>
  738. </field>
  739. <!-- Permission bitfield -->
  740. <field>
  741. <name>permissions</name>
  742. <type>integer</type>
  743. <default>0</default>
  744. <notnull>true</notnull>
  745. <length>1</length>
  746. </field>
  747. <!-- Time of share creation -->
  748. <field>
  749. <name>stime</name>
  750. <type>integer</type>
  751. <default>0</default>
  752. <notnull>true</notnull>
  753. <length>8</length>
  754. </field>
  755. <!-- Whether the receiver accepted the share, if share_with is set. -->
  756. <field>
  757. <name>accepted</name>
  758. <type>integer</type>
  759. <default>0</default>
  760. <notnull>true</notnull>
  761. <length>1</length>
  762. </field>
  763. <!-- Time of share expiration -->
  764. <field>
  765. <name>expiration</name>
  766. <type>timestamp</type>
  767. <default></default>
  768. <notnull>false</notnull>
  769. </field>
  770. <field>
  771. <name>token</name>
  772. <type>text</type>
  773. <default></default>
  774. <notnull>false</notnull>
  775. <length>32</length>
  776. </field>
  777. <field>
  778. <name>mail_send</name>
  779. <type>integer</type>
  780. <default>0</default>
  781. <notnull>true</notnull>
  782. <length>1</length>
  783. </field>
  784. <field>
  785. <name>share_name</name>
  786. <type>text</type>
  787. <default></default>
  788. <notnull>false</notnull>
  789. <length>64</length>
  790. </field>
  791. <index>
  792. <name>item_share_type_index</name>
  793. <field>
  794. <name>item_type</name>
  795. <sorting>ascending</sorting>
  796. </field>
  797. <field>
  798. <name>share_type</name>
  799. <sorting>ascending</sorting>
  800. </field>
  801. </index>
  802. <index>
  803. <name>file_source_index</name>
  804. <field>
  805. <name>file_source</name>
  806. <sorting>ascending</sorting>
  807. </field>
  808. </index>
  809. <index>
  810. <name>token_index</name>
  811. <field>
  812. <name>token</name>
  813. <sorting>ascending</sorting>
  814. </field>
  815. </index>
  816. </declaration>
  817. </table>
  818. <table>
  819. <!--
  820. Scheduled background jobs.
  821. See OC\BackgroundJob\JobList.
  822. -->
  823. <name>*dbprefix*jobs</name>
  824. <declaration>
  825. <field>
  826. <name>id</name>
  827. <type>integer</type>
  828. <default>0</default>
  829. <notnull>true</notnull>
  830. <autoincrement>1</autoincrement>
  831. <unsigned>true</unsigned>
  832. <length>4</length>
  833. </field>
  834. <field>
  835. <name>class</name>
  836. <type>text</type>
  837. <default></default>
  838. <notnull>true</notnull>
  839. <length>255</length>
  840. </field>
  841. <field>
  842. <name>argument</name>
  843. <type>text</type>
  844. <default></default>
  845. <notnull>true</notnull>
  846. <length>4000</length>
  847. </field>
  848. <field>
  849. <!-- timestamp when the job was executed the last time -->
  850. <name>last_run</name>
  851. <type>integer</type>
  852. <default></default>
  853. <notnull>false</notnull>
  854. </field>
  855. <field>
  856. <!-- timestamp when the job was checked if it needs execution the last time -->
  857. <name>last_checked</name>
  858. <type>integer</type>
  859. <default></default>
  860. <notnull>false</notnull>
  861. </field>
  862. <field>
  863. <!-- timestamp when the job was reserved the last time, 1 day timeout -->
  864. <name>reserved_at</name>
  865. <type>integer</type>
  866. <default></default>
  867. <notnull>false</notnull>
  868. </field>
  869. <field>
  870. <!-- time for execution of the job -->
  871. <name>execution_duration</name>
  872. <type>integer</type>
  873. <default></default>
  874. <notnull>true</notnull>
  875. </field>
  876. <index>
  877. <name>job_class_index</name>
  878. <field>
  879. <name>class</name>
  880. <sorting>ascending</sorting>
  881. </field>
  882. </index>
  883. </declaration>
  884. </table>
  885. <table>
  886. <!--
  887. List of usernames, their display name and login password.
  888. -->
  889. <name>*dbprefix*users</name>
  890. <declaration>
  891. <field>
  892. <name>uid</name>
  893. <type>text</type>
  894. <default></default>
  895. <notnull>true</notnull>
  896. <length>64</length>
  897. </field>
  898. <field>
  899. <name>displayname</name>
  900. <type>text</type>
  901. <default></default>
  902. <length>64</length>
  903. </field>
  904. <field>
  905. <name>password</name>
  906. <type>text</type>
  907. <default></default>
  908. <notnull>true</notnull>
  909. <length>255</length>
  910. </field>
  911. <index>
  912. <name>users_pKey</name>
  913. <primary>true</primary>
  914. <field>
  915. <name>uid</name>
  916. <sorting>ascending</sorting>
  917. </field>
  918. </index>
  919. </declaration>
  920. </table>
  921. <table>
  922. <name>*dbprefix*authtoken</name>
  923. <declaration>
  924. <field>
  925. <name>id</name>
  926. <type>integer</type>
  927. <default>0</default>
  928. <notnull>true</notnull>
  929. <autoincrement>1</autoincrement>
  930. <unsigned>true</unsigned>
  931. <length>4</length>
  932. </field>
  933. <!-- Foreign Key users::uid -->
  934. <field>
  935. <name>uid</name>
  936. <type>text</type>
  937. <default></default>
  938. <notnull>true</notnull>
  939. <length>64</length>
  940. </field>
  941. <field>
  942. <name>login_name</name>
  943. <type>text</type>
  944. <default></default>
  945. <notnull>true</notnull>
  946. <length>64</length>
  947. </field>
  948. <field>
  949. <name>password</name>
  950. <type>clob</type>
  951. <default></default>
  952. <notnull>false</notnull>
  953. </field>
  954. <field>
  955. <name>name</name>
  956. <type>clob</type>
  957. <default></default>
  958. <notnull>true</notnull>
  959. </field>
  960. <field>
  961. <name>token</name>
  962. <type>text</type>
  963. <default></default>
  964. <notnull>true</notnull>
  965. <length>200</length>
  966. </field>
  967. <field>
  968. <name>type</name>
  969. <type>integer</type>
  970. <default>0</default>
  971. <notnull>true</notnull>
  972. <unsigned>true</unsigned>
  973. <length>2</length>
  974. </field>
  975. <field>
  976. <name>remember</name>
  977. <type>integer</type>
  978. <default>0</default>
  979. <notnull>true</notnull>
  980. <unsigned>true</unsigned>
  981. <length>1</length>
  982. </field>
  983. <field>
  984. <name>last_activity</name>
  985. <type>integer</type>
  986. <default>0</default>
  987. <notnull>true</notnull>
  988. <unsigned>true</unsigned>
  989. <length>4</length>
  990. </field>
  991. <field>
  992. <name>last_check</name>
  993. <type>integer</type>
  994. <default>0</default>
  995. <notnull>true</notnull>
  996. <unsigned>true</unsigned>
  997. <length>4</length>
  998. </field>
  999. <field>
  1000. <name>scope</name>
  1001. <type>clob</type>
  1002. <default></default>
  1003. <notnull>false</notnull>
  1004. </field>
  1005. <index>
  1006. <name>authtoken_token_index</name>
  1007. <unique>true</unique>
  1008. <field>
  1009. <name>token</name>
  1010. <sorting>ascending</sorting>
  1011. </field>
  1012. </index>
  1013. <index>
  1014. <name>authtoken_last_activity_index</name>
  1015. <field>
  1016. <name>last_activity</name>
  1017. <sorting>ascending</sorting>
  1018. </field>
  1019. </index>
  1020. </declaration>
  1021. </table>
  1022. <table>
  1023. <!--
  1024. List of usernames, their display name and login password.
  1025. -->
  1026. <name>*dbprefix*bruteforce_attempts</name>
  1027. <declaration>
  1028. <field>
  1029. <name>id</name>
  1030. <type>integer</type>
  1031. <default>0</default>
  1032. <notnull>true</notnull>
  1033. <autoincrement>1</autoincrement>
  1034. <unsigned>true</unsigned>
  1035. <length>4</length>
  1036. </field>
  1037. <field>
  1038. <name>action</name>
  1039. <type>text</type>
  1040. <default></default>
  1041. <notnull>true</notnull>
  1042. <length>64</length>
  1043. </field>
  1044. <field>
  1045. <name>occurred</name>
  1046. <type>integer</type>
  1047. <default>0</default>
  1048. <notnull>true</notnull>
  1049. <unsigned>true</unsigned>
  1050. <length>4</length>
  1051. </field>
  1052. <field>
  1053. <name>ip</name>
  1054. <type>text</type>
  1055. <default></default>
  1056. <notnull>true</notnull>
  1057. <length>255</length>
  1058. </field>
  1059. <field>
  1060. <name>subnet</name>
  1061. <type>text</type>
  1062. <default></default>
  1063. <notnull>true</notnull>
  1064. <length>255</length>
  1065. </field>
  1066. <field>
  1067. <name>metadata</name>
  1068. <type>text</type>
  1069. <default></default>
  1070. <notnull>true</notnull>
  1071. <length>255</length>
  1072. </field>
  1073. <index>
  1074. <name>bruteforce_attempts_ip</name>
  1075. <field>
  1076. <name>ip</name>
  1077. <sorting>ascending</sorting>
  1078. </field>
  1079. </index>
  1080. <index>
  1081. <name>bruteforce_attempts_subnet</name>
  1082. <field>
  1083. <name>subnet</name>
  1084. <sorting>ascending</sorting>
  1085. </field>
  1086. </index>
  1087. </declaration>
  1088. </table>
  1089. <table>
  1090. <!--
  1091. List of tags (category) + a unique tag id (id) per user (uid) and type.
  1092. -->
  1093. <name>*dbprefix*vcategory</name>
  1094. <declaration>
  1095. <field>
  1096. <name>id</name>
  1097. <type>integer</type>
  1098. <default>0</default>
  1099. <notnull>true</notnull>
  1100. <autoincrement>1</autoincrement>
  1101. <unsigned>true</unsigned>
  1102. <length>4</length>
  1103. </field>
  1104. <!-- Foreign Key users::uid -->
  1105. <field>
  1106. <name>uid</name>
  1107. <type>text</type>
  1108. <default></default>
  1109. <notnull>true</notnull>
  1110. <length>64</length>
  1111. </field>
  1112. <field>
  1113. <name>type</name>
  1114. <type>text</type>
  1115. <default></default>
  1116. <notnull>true</notnull>
  1117. <length>64</length>
  1118. </field>
  1119. <field>
  1120. <name>category</name>
  1121. <type>text</type>
  1122. <default></default>
  1123. <notnull>true</notnull>
  1124. <length>255</length>
  1125. </field>
  1126. <index>
  1127. <name>uid_index</name>
  1128. <field>
  1129. <name>uid</name>
  1130. <sorting>ascending</sorting>
  1131. </field>
  1132. </index>
  1133. <index>
  1134. <name>type_index</name>
  1135. <field>
  1136. <name>type</name>
  1137. <sorting>ascending</sorting>
  1138. </field>
  1139. </index>
  1140. <index>
  1141. <name>category_index</name>
  1142. <field>
  1143. <name>category</name>
  1144. <sorting>ascending</sorting>
  1145. </field>
  1146. </index>
  1147. </declaration>
  1148. </table>
  1149. <table>
  1150. <!--
  1151. Object-Tag associations per tag type.
  1152. -->
  1153. <name>*dbprefix*vcategory_to_object</name>
  1154. <declaration>
  1155. <field>
  1156. <name>objid</name>
  1157. <type>integer</type>
  1158. <default>0</default>
  1159. <notnull>true</notnull>
  1160. <unsigned>true</unsigned>
  1161. <length>4</length>
  1162. </field>
  1163. <!-- Foreign Key vcategory::id -->
  1164. <field>
  1165. <name>categoryid</name>
  1166. <type>integer</type>
  1167. <default>0</default>
  1168. <notnull>true</notnull>
  1169. <unsigned>true</unsigned>
  1170. <length>4</length>
  1171. </field>
  1172. <field>
  1173. <name>type</name>
  1174. <type>text</type>
  1175. <default></default>
  1176. <notnull>true</notnull>
  1177. <length>64</length>
  1178. </field>
  1179. <index>
  1180. <primary>true</primary>
  1181. <unique>true</unique>
  1182. <name>category_object_index</name>
  1183. <field>
  1184. <name>categoryid</name>
  1185. <sorting>ascending</sorting>
  1186. </field>
  1187. <field>
  1188. <name>objid</name>
  1189. <sorting>ascending</sorting>
  1190. </field>
  1191. <field>
  1192. <name>type</name>
  1193. <sorting>ascending</sorting>
  1194. </field>
  1195. </index>
  1196. <index>
  1197. <name>vcategory_objectd_index</name>
  1198. <field>
  1199. <name>objid</name>
  1200. <sorting>ascending</sorting>
  1201. </field>
  1202. <field>
  1203. <name>type</name>
  1204. <sorting>ascending</sorting>
  1205. </field>
  1206. </index>
  1207. </declaration>
  1208. </table>
  1209. <table>
  1210. <!--
  1211. List of system-wide tags
  1212. -->
  1213. <name>*dbprefix*systemtag</name>
  1214. <declaration>
  1215. <field>
  1216. <name>id</name>
  1217. <type>integer</type>
  1218. <default>0</default>
  1219. <notnull>true</notnull>
  1220. <autoincrement>1</autoincrement>
  1221. <unsigned>true</unsigned>
  1222. <length>4</length>
  1223. </field>
  1224. <!-- Tag name -->
  1225. <field>
  1226. <name>name</name>
  1227. <type>text</type>
  1228. <default></default>
  1229. <notnull>true</notnull>
  1230. <length>64</length>
  1231. </field>
  1232. <!-- Visibility: 0 user-not-visible, 1 user-visible -->
  1233. <field>
  1234. <name>visibility</name>
  1235. <type>integer</type>
  1236. <default>1</default>
  1237. <notnull>true</notnull>
  1238. <length>1</length>
  1239. </field>
  1240. <!-- Editable: 0 user-not-editable, 1 user-editable -->
  1241. <field>
  1242. <name>editable</name>
  1243. <type>integer</type>
  1244. <default>1</default>
  1245. <notnull>true</notnull>
  1246. <length>1</length>
  1247. </field>
  1248. <index>
  1249. <name>tag_ident</name>
  1250. <unique>true</unique>
  1251. <field>
  1252. <name>name</name>
  1253. <sorting>ascending</sorting>
  1254. </field>
  1255. <field>
  1256. <name>visibility</name>
  1257. <sorting>ascending</sorting>
  1258. </field>
  1259. <field>
  1260. <name>editable</name>
  1261. <sorting>ascending</sorting>
  1262. </field>
  1263. </index>
  1264. </declaration>
  1265. </table>
  1266. <table>
  1267. <!--
  1268. System tag to object associations per object type.
  1269. -->
  1270. <name>*dbprefix*systemtag_object_mapping</name>
  1271. <declaration>
  1272. <!-- object id (ex: file id for files)-->
  1273. <field>
  1274. <name>objectid</name>
  1275. <type>text</type>
  1276. <default></default>
  1277. <notnull>true</notnull>
  1278. <length>64</length>
  1279. </field>
  1280. <!-- object type (ex: "files")-->
  1281. <field>
  1282. <name>objecttype</name>
  1283. <type>text</type>
  1284. <default></default>
  1285. <notnull>true</notnull>
  1286. <length>64</length>
  1287. </field>
  1288. <!-- Foreign Key systemtag::id -->
  1289. <field>
  1290. <name>systemtagid</name>
  1291. <type>integer</type>
  1292. <default>0</default>
  1293. <notnull>true</notnull>
  1294. <unsigned>true</unsigned>
  1295. <length>4</length>
  1296. </field>
  1297. <index>
  1298. <unique>true</unique>
  1299. <name>mapping</name>
  1300. <field>
  1301. <name>objecttype</name>
  1302. <sorting>ascending</sorting>
  1303. </field>
  1304. <field>
  1305. <name>objectid</name>
  1306. <sorting>ascending</sorting>
  1307. </field>
  1308. <field>
  1309. <name>systemtagid</name>
  1310. <sorting>ascending</sorting>
  1311. </field>
  1312. </index>
  1313. </declaration>
  1314. </table>
  1315. <table>
  1316. <!--
  1317. System tag to group mapping
  1318. -->
  1319. <name>*dbprefix*systemtag_group</name>
  1320. <declaration>
  1321. <!-- Foreign Key systemtag::id -->
  1322. <field>
  1323. <name>systemtagid</name>
  1324. <type>integer</type>
  1325. <default>0</default>
  1326. <notnull>true</notnull>
  1327. <unsigned>true</unsigned>
  1328. <length>4</length>
  1329. </field>
  1330. <field>
  1331. <name>gid</name>
  1332. <type>string</type>
  1333. <notnull>true</notnull>
  1334. </field>
  1335. <index>
  1336. <name>systemtag_group</name>
  1337. <primary>true</primary>
  1338. <unique>true</unique>
  1339. <field>
  1340. <name>gid</name>
  1341. <sorting>ascending</sorting>
  1342. </field>
  1343. <field>
  1344. <name>systemtagid</name>
  1345. <sorting>ascending</sorting>
  1346. </field>
  1347. </index>
  1348. </declaration>
  1349. </table>
  1350. <table>
  1351. <!--
  1352. Table for storing transactional file locking
  1353. -->
  1354. <name>*dbprefix*file_locks</name>
  1355. <declaration>
  1356. <field>
  1357. <name>id</name>
  1358. <type>integer</type>
  1359. <default>0</default>
  1360. <notnull>true</notnull>
  1361. <unsigned>true</unsigned>
  1362. <length>4</length>
  1363. <autoincrement>1</autoincrement>
  1364. </field>
  1365. <field>
  1366. <name>lock</name>
  1367. <type>integer</type>
  1368. <default>0</default>
  1369. <notnull>true</notnull>
  1370. <length>4</length>
  1371. </field>
  1372. <field>
  1373. <name>key</name>
  1374. <type>text</type>
  1375. <notnull>true</notnull>
  1376. <length>64</length>
  1377. </field>
  1378. <field>
  1379. <name>ttl</name>
  1380. <type>integer</type>
  1381. <default>-1</default>
  1382. <notnull>true</notnull>
  1383. <length>4</length>
  1384. </field>
  1385. <index>
  1386. <primary>true</primary>
  1387. <unique>true</unique>
  1388. <name>lock_id_index</name>
  1389. <field>
  1390. <name>id</name>
  1391. <sorting>ascending</sorting>
  1392. </field>
  1393. </index>
  1394. <index>
  1395. <unique>true</unique>
  1396. <name>lock_key_index</name>
  1397. <field>
  1398. <name>key</name>
  1399. <sorting>ascending</sorting>
  1400. </field>
  1401. </index>
  1402. <index>
  1403. <name>lock_ttl_index</name>
  1404. <field>
  1405. <name>ttl</name>
  1406. <sorting>ascending</sorting>
  1407. </field>
  1408. </index>
  1409. </declaration>
  1410. </table>
  1411. <table>
  1412. <!--
  1413. default place to store comment data
  1414. -->
  1415. <name>*dbprefix*comments</name>
  1416. <declaration>
  1417. <field>
  1418. <name>id</name>
  1419. <type>integer</type>
  1420. <default>0</default>
  1421. <notnull>true</notnull>
  1422. <unsigned>true</unsigned>
  1423. <length>4</length>
  1424. <autoincrement>1</autoincrement>
  1425. </field>
  1426. <field>
  1427. <name>parent_id</name>
  1428. <type>integer</type>
  1429. <default>0</default>
  1430. <notnull>true</notnull>
  1431. <unsigned>true</unsigned>
  1432. <length>4</length>
  1433. </field>
  1434. <field>
  1435. <name>topmost_parent_id</name>
  1436. <type>integer</type>
  1437. <default>0</default>
  1438. <notnull>true</notnull>
  1439. <unsigned>true</unsigned>
  1440. <length>4</length>
  1441. </field>
  1442. <field>
  1443. <name>children_count</name>
  1444. <type>integer</type>
  1445. <default>0</default>
  1446. <notnull>true</notnull>
  1447. <unsigned>true</unsigned>
  1448. <length>4</length>
  1449. </field>
  1450. <field>
  1451. <name>actor_type</name>
  1452. <type>text</type>
  1453. <default></default>
  1454. <notnull>true</notnull>
  1455. <length>64</length>
  1456. </field>
  1457. <field>
  1458. <name>actor_id</name>
  1459. <type>text</type>
  1460. <default></default>
  1461. <notnull>true</notnull>
  1462. <length>64</length>
  1463. </field>
  1464. <field>
  1465. <name>message</name>
  1466. <type>clob</type>
  1467. <default></default>
  1468. <notnull>false</notnull>
  1469. </field>
  1470. <field>
  1471. <name>verb</name>
  1472. <type>text</type>
  1473. <default></default>
  1474. <notnull>false</notnull>
  1475. <length>64</length>
  1476. </field>
  1477. <field>
  1478. <name>creation_timestamp</name>
  1479. <type>timestamp</type>
  1480. <default></default>
  1481. <notnull>false</notnull>
  1482. </field>
  1483. <field>
  1484. <name>latest_child_timestamp</name>
  1485. <type>timestamp</type>
  1486. <default></default>
  1487. <notnull>false</notnull>
  1488. </field>
  1489. <field>
  1490. <name>object_type</name>
  1491. <type>text</type>
  1492. <default></default>
  1493. <notnull>true</notnull>
  1494. <length>64</length>
  1495. </field>
  1496. <field>
  1497. <name>object_id</name>
  1498. <type>text</type>
  1499. <default></default>
  1500. <notnull>true</notnull>
  1501. <length>64</length>
  1502. </field>
  1503. <index>
  1504. <name>comments_parent_id_index</name>
  1505. <unique>false</unique>
  1506. <field>
  1507. <name>parent_id</name>
  1508. <sorting>descending</sorting>
  1509. </field>
  1510. </index>
  1511. <index>
  1512. <name>comments_topmost_parent_id_idx</name>
  1513. <unique>false</unique>
  1514. <field>
  1515. <name>topmost_parent_id</name>
  1516. <sorting>descending</sorting>
  1517. </field>
  1518. </index>
  1519. <index>
  1520. <name>comments_object_index</name>
  1521. <unique>false</unique>
  1522. <field>
  1523. <name>object_type</name>
  1524. <sorting>ascending</sorting>
  1525. </field>
  1526. <field>
  1527. <name>object_id</name>
  1528. <sorting>ascending</sorting>
  1529. </field>
  1530. <field>
  1531. <name>creation_timestamp</name>
  1532. <sorting>descending</sorting>
  1533. </field>
  1534. </index>
  1535. <index>
  1536. <name>comments_actor_index</name>
  1537. <unique>false</unique>
  1538. <field>
  1539. <name>actor_type</name>
  1540. <sorting>ascending</sorting>
  1541. </field>
  1542. <field>
  1543. <name>actor_id</name>
  1544. <sorting>ascending</sorting>
  1545. </field>
  1546. </index>
  1547. </declaration>
  1548. </table>
  1549. <table>
  1550. <!--
  1551. default place to store per user and object read markers
  1552. -->
  1553. <name>*dbprefix*comments_read_markers</name>
  1554. <declaration>
  1555. <field>
  1556. <name>user_id</name>
  1557. <type>text</type>
  1558. <default></default>
  1559. <notnull>true</notnull>
  1560. <length>64</length>
  1561. </field>
  1562. <field>
  1563. <name>marker_datetime</name>
  1564. <type>timestamp</type>
  1565. <default></default>
  1566. <notnull>false</notnull>
  1567. </field>
  1568. <field>
  1569. <name>object_type</name>
  1570. <type>text</type>
  1571. <default></default>
  1572. <notnull>true</notnull>
  1573. <length>64</length>
  1574. </field>
  1575. <field>
  1576. <name>object_id</name>
  1577. <type>text</type>
  1578. <default></default>
  1579. <notnull>true</notnull>
  1580. <length>64</length>
  1581. </field>
  1582. <index>
  1583. <name>comments_marker_object_index</name>
  1584. <unique>false</unique>
  1585. <field>
  1586. <name>object_type</name>
  1587. <sorting>ascending</sorting>
  1588. </field>
  1589. <field>
  1590. <name>object_id</name>
  1591. <sorting>ascending</sorting>
  1592. </field>
  1593. </index>
  1594. <index>
  1595. <name>comments_marker_index</name>
  1596. <unique>true</unique>
  1597. <field>
  1598. <name>user_id</name>
  1599. <sorting>descending</sorting>
  1600. </field>
  1601. <field>
  1602. <name>object_type</name>
  1603. <sorting>ascending</sorting>
  1604. </field>
  1605. <field>
  1606. <name>object_id</name>
  1607. <sorting>ascending</sorting>
  1608. </field>
  1609. </index>
  1610. </declaration>
  1611. </table>
  1612. <table>
  1613. <!--
  1614. Encrypted credentials storage
  1615. -->
  1616. <name>*dbprefix*credentials</name>
  1617. <declaration>
  1618. <field>
  1619. <name>user</name>
  1620. <type>text</type>
  1621. <default></default>
  1622. <notnull>false</notnull>
  1623. <length>64</length>
  1624. </field>
  1625. <field>
  1626. <name>identifier</name>
  1627. <type>text</type>
  1628. <notnull>true</notnull>
  1629. <length>64</length>
  1630. </field>
  1631. <field>
  1632. <name>credentials</name>
  1633. <type>clob</type>
  1634. <notnull>false</notnull>
  1635. </field>
  1636. <index>
  1637. <name>credentials_user_id</name>
  1638. <primary>true</primary>
  1639. <unique>true</unique>
  1640. <field>
  1641. <name>user</name>
  1642. <sorting>ascending</sorting>
  1643. </field>
  1644. <field>
  1645. <name>identifier</name>
  1646. <sorting>ascending</sorting>
  1647. </field>
  1648. </index>
  1649. <index>
  1650. <name>credentials_user</name>
  1651. <unique>false</unique>
  1652. <field>
  1653. <name>user</name>
  1654. <sorting>ascending</sorting>
  1655. </field>
  1656. </index>
  1657. </declaration>
  1658. </table>
  1659. <table>
  1660. <!-- Extra admin settings sections -->
  1661. <name>*dbprefix*admin_sections</name>
  1662. <declaration>
  1663. <field>
  1664. <name>id</name>
  1665. <type>text</type>
  1666. <default></default>
  1667. <notnull>false</notnull>
  1668. <length>64</length>
  1669. </field>
  1670. <field>
  1671. <name>class</name>
  1672. <type>text</type>
  1673. <default></default>
  1674. <notnull>true</notnull>
  1675. <length>255</length>
  1676. </field>
  1677. <field>
  1678. <name>priority</name>
  1679. <type>integer</type>
  1680. <default></default>
  1681. <notnull>true</notnull>
  1682. <length>1</length>
  1683. </field>
  1684. <index>
  1685. <name>admin_sections_id_index</name>
  1686. <primary>true</primary>
  1687. <field>
  1688. <name>id</name>
  1689. <sorting>ascending</sorting>
  1690. </field>
  1691. </index>
  1692. <index>
  1693. <name>admin_sections_class</name>
  1694. <unique>true</unique>
  1695. <field>
  1696. <name>class</name>
  1697. <sorting>ascending</sorting>
  1698. </field>
  1699. </index>
  1700. </declaration>
  1701. </table>
  1702. <table>
  1703. <!-- Extra admin settings -->
  1704. <name>*dbprefix*admin_settings</name>
  1705. <declaration>
  1706. <field>
  1707. <name>id</name>
  1708. <type>integer</type>
  1709. <default>0</default>
  1710. <notnull>true</notnull>
  1711. <autoincrement>1</autoincrement>
  1712. <length>4</length>
  1713. </field>
  1714. <field>
  1715. <name>class</name>
  1716. <type>text</type>
  1717. <default></default>
  1718. <notnull>true</notnull>
  1719. <length>255</length>
  1720. </field>
  1721. <!-- id of the section, foreign key: admin_sections.id -->
  1722. <field>
  1723. <name>section</name>
  1724. <type>text</type>
  1725. <default></default>
  1726. <notnull>false</notnull>
  1727. <length>64</length>
  1728. </field>
  1729. <field>
  1730. <name>priority</name>
  1731. <type>integer</type>
  1732. <default></default>
  1733. <notnull>true</notnull>
  1734. <length>1</length>
  1735. </field>
  1736. <index>
  1737. <name>admin_settings_id_index</name>
  1738. <primary>true</primary>
  1739. <field>
  1740. <name>id</name>
  1741. <sorting>ascending</sorting>
  1742. </field>
  1743. </index>
  1744. <index>
  1745. <name>admin_settings_class</name>
  1746. <unique>true</unique>
  1747. <field>
  1748. <name>class</name>
  1749. <sorting>ascending</sorting>
  1750. </field>
  1751. </index>
  1752. <index>
  1753. <name>admin_settings_section</name>
  1754. <unique>false</unique>
  1755. <field>
  1756. <name>section</name>
  1757. <sorting>ascending</sorting>
  1758. </field>
  1759. </index>
  1760. </declaration>
  1761. </table>
  1762. <table>
  1763. <!-- Extra personal settings sections -->
  1764. <name>*dbprefix*personal_sections</name>
  1765. <declaration>
  1766. <field>
  1767. <name>id</name>
  1768. <type>text</type>
  1769. <default></default>
  1770. <notnull>false</notnull>
  1771. <length>64</length>
  1772. </field>
  1773. <field>
  1774. <name>class</name>
  1775. <type>text</type>
  1776. <default></default>
  1777. <notnull>true</notnull>
  1778. <length>255</length>
  1779. </field>
  1780. <field>
  1781. <name>priority</name>
  1782. <type>integer</type>
  1783. <default></default>
  1784. <notnull>true</notnull>
  1785. <length>1</length>
  1786. </field>
  1787. <index>
  1788. <name>personal_sections_id_index</name>
  1789. <primary>true</primary>
  1790. <field>
  1791. <name>id</name>
  1792. <sorting>ascending</sorting>
  1793. </field>
  1794. </index>
  1795. <index>
  1796. <name>personal_sections_class</name>
  1797. <unique>true</unique>
  1798. <field>
  1799. <name>class</name>
  1800. <sorting>ascending</sorting>
  1801. </field>
  1802. </index>
  1803. </declaration>
  1804. </table>
  1805. <table>
  1806. <!-- Extra personal settings -->
  1807. <name>*dbprefix*personal_settings</name>
  1808. <declaration>
  1809. <field>
  1810. <name>id</name>
  1811. <type>integer</type>
  1812. <default>0</default>
  1813. <notnull>true</notnull>
  1814. <autoincrement>1</autoincrement>
  1815. <length>4</length>
  1816. </field>
  1817. <field>
  1818. <name>class</name>
  1819. <type>text</type>
  1820. <default></default>
  1821. <notnull>true</notnull>
  1822. <length>255</length>
  1823. </field>
  1824. <!-- id of the section, foreign key: admin_sections.id -->
  1825. <field>
  1826. <name>section</name>
  1827. <type>text</type>
  1828. <default></default>
  1829. <notnull>false</notnull>
  1830. <length>64</length>
  1831. </field>
  1832. <field>
  1833. <name>priority</name>
  1834. <type>integer</type>
  1835. <default></default>
  1836. <notnull>true</notnull>
  1837. <length>1</length>
  1838. </field>
  1839. <index>
  1840. <name>personal_settings_id_index</name>
  1841. <primary>true</primary>
  1842. <field>
  1843. <name>id</name>
  1844. <sorting>ascending</sorting>
  1845. </field>
  1846. </index>
  1847. <index>
  1848. <name>personal_settings_class</name>
  1849. <unique>true</unique>
  1850. <field>
  1851. <name>class</name>
  1852. <sorting>ascending</sorting>
  1853. </field>
  1854. </index>
  1855. <index>
  1856. <name>personal_settings_section</name>
  1857. <unique>false</unique>
  1858. <field>
  1859. <name>section</name>
  1860. <sorting>ascending</sorting>
  1861. </field>
  1862. </index>
  1863. </declaration>
  1864. </table>
  1865. <table>
  1866. <name>*dbprefix*accounts</name>
  1867. <declaration>
  1868. <field>
  1869. <name>uid</name>
  1870. <type>text</type>
  1871. <default></default>
  1872. <notnull>true</notnull>
  1873. <length>64</length>
  1874. </field>
  1875. <field>
  1876. <name>data</name>
  1877. <type>clob</type>
  1878. <default></default>
  1879. <notnull>true</notnull>
  1880. </field>
  1881. <index>
  1882. <name>uid_index</name>
  1883. <primary>true</primary>
  1884. <unique>true</unique>
  1885. <field>
  1886. <name>uid</name>
  1887. <sorting>ascending</sorting>
  1888. </field>
  1889. </index>
  1890. </declaration>
  1891. </table>
  1892. </database>