db_structure.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260
  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. <index>
  89. <name>storages_id_index</name>
  90. <unique>true</unique>
  91. <field>
  92. <name>id</name>
  93. <sorting>ascending</sorting>
  94. </field>
  95. </index>
  96. </declaration>
  97. </table>
  98. <table>
  99. <name>*dbprefix*file_map</name>
  100. <declaration>
  101. <field>
  102. <name>logic_path</name>
  103. <type>text</type>
  104. <default></default>
  105. <notnull>true</notnull>
  106. <length>512</length>
  107. </field>
  108. <field>
  109. <name>logic_path_hash</name>
  110. <type>text</type>
  111. <default></default>
  112. <notnull>true</notnull>
  113. <length>32</length>
  114. </field>
  115. <field>
  116. <name>physic_path</name>
  117. <type>text</type>
  118. <default></default>
  119. <notnull>true</notnull>
  120. <length>512</length>
  121. </field>
  122. <field>
  123. <name>physic_path_hash</name>
  124. <type>text</type>
  125. <default></default>
  126. <notnull>true</notnull>
  127. <length>32</length>
  128. </field>
  129. <index>
  130. <name>file_map_lp_index</name>
  131. <primary>true</primary>
  132. <unique>true</unique>
  133. <field>
  134. <name>logic_path_hash</name>
  135. <sorting>ascending</sorting>
  136. </field>
  137. </index>
  138. <index>
  139. <name>file_map_pp_index</name>
  140. <unique>true</unique>
  141. <field>
  142. <name>physic_path_hash</name>
  143. <sorting>ascending</sorting>
  144. </field>
  145. </index>
  146. </declaration>
  147. </table>
  148. <table>
  149. <!--
  150. Bidirectional Map for Mimetypes and Mimetype Id
  151. - Assigns each mimetype (and supertype) a unique mimetype id integer.
  152. - E.g. application <-> 5
  153. - E.g. application/pdf <-> 6
  154. -->
  155. <name>*dbprefix*mimetypes</name>
  156. <declaration>
  157. <field>
  158. <name>id</name>
  159. <type>integer</type>
  160. <default>0</default>
  161. <notnull>true</notnull>
  162. <autoincrement>1</autoincrement>
  163. <length>4</length>
  164. </field>
  165. <field>
  166. <name>mimetype</name>
  167. <type>text</type>
  168. <default></default>
  169. <notnull>true</notnull>
  170. <length>255</length>
  171. </field>
  172. <index>
  173. <name>mimetype_id_index</name>
  174. <unique>true</unique>
  175. <field>
  176. <name>mimetype</name>
  177. <sorting>ascending</sorting>
  178. </field>
  179. </index>
  180. </declaration>
  181. </table>
  182. <table>
  183. <!--
  184. Main file table containing one row for each directory and file.
  185. - Assigns a unique integer fileid to each file (and directory)
  186. - Assigns an etag to each file (and directory)
  187. - Caches various file/dir properties such as:
  188. - path (filename, e.g. files/combinatoricslib-2.0_doc.zip)
  189. - path_hash = md5(path)
  190. - name (basename, e.g. combinatoricslib-2.0_doc.zip)
  191. - size (for directories this is the sum of all contained file sizes)
  192. -->
  193. <name>*dbprefix*filecache</name>
  194. <declaration>
  195. <field>
  196. <name>fileid</name>
  197. <type>integer</type>
  198. <default>0</default>
  199. <notnull>true</notnull>
  200. <autoincrement>1</autoincrement>
  201. <length>4</length>
  202. </field>
  203. <!-- Foreign Key storages::numeric_id -->
  204. <field>
  205. <name>storage</name>
  206. <type>integer</type>
  207. <default></default>
  208. <notnull>true</notnull>
  209. <length>4</length>
  210. </field>
  211. <field>
  212. <name>path</name>
  213. <type>text</type>
  214. <default></default>
  215. <notnull>false</notnull>
  216. <length>4000</length>
  217. </field>
  218. <field>
  219. <name>path_hash</name>
  220. <type>text</type>
  221. <default></default>
  222. <notnull>true</notnull>
  223. <length>32</length>
  224. </field>
  225. <!-- Foreign Key filecache::fileid -->
  226. <field>
  227. <name>parent</name>
  228. <type>integer</type>
  229. <default></default>
  230. <notnull>true</notnull>
  231. <length>4</length>
  232. </field>
  233. <field>
  234. <name>name</name>
  235. <type>text</type>
  236. <default></default>
  237. <notnull>false</notnull>
  238. <length>250</length>
  239. </field>
  240. <!-- Foreign Key mimetypes::id -->
  241. <field>
  242. <name>mimetype</name>
  243. <type>integer</type>
  244. <default></default>
  245. <notnull>true</notnull>
  246. <length>4</length>
  247. </field>
  248. <!-- Foreign Key mimetypes::id -->
  249. <field>
  250. <name>mimepart</name>
  251. <type>integer</type>
  252. <default></default>
  253. <notnull>true</notnull>
  254. <length>4</length>
  255. </field>
  256. <field>
  257. <name>size</name>
  258. <type>integer</type>
  259. <default></default>
  260. <notnull>true</notnull>
  261. <length>8</length>
  262. </field>
  263. <field>
  264. <name>mtime</name>
  265. <type>integer</type>
  266. <default></default>
  267. <notnull>true</notnull>
  268. <length>4</length>
  269. </field>
  270. <field>
  271. <name>storage_mtime</name>
  272. <type>integer</type>
  273. <default></default>
  274. <notnull>true</notnull>
  275. <length>4</length>
  276. </field>
  277. <field>
  278. <name>encrypted</name>
  279. <type>integer</type>
  280. <default>0</default>
  281. <notnull>true</notnull>
  282. <length>4</length>
  283. </field>
  284. <field>
  285. <name>unencrypted_size</name>
  286. <type>integer</type>
  287. <default>0</default>
  288. <notnull>true</notnull>
  289. <length>8</length>
  290. </field>
  291. <field>
  292. <name>etag</name>
  293. <type>text</type>
  294. <default></default>
  295. <notnull>false</notnull>
  296. <length>40</length>
  297. </field>
  298. <field>
  299. <name>permissions</name>
  300. <type>integer</type>
  301. <default>0</default>
  302. <notnull>false</notnull>
  303. <length>4</length>
  304. </field>
  305. <index>
  306. <name>fs_storage_path_hash</name>
  307. <unique>true</unique>
  308. <field>
  309. <name>storage</name>
  310. <sorting>ascending</sorting>
  311. </field>
  312. <field>
  313. <name>path_hash</name>
  314. <sorting>ascending</sorting>
  315. </field>
  316. </index>
  317. <index>
  318. <name>fs_parent_name_hash</name>
  319. <field>
  320. <name>parent</name>
  321. <sorting>ascending</sorting>
  322. </field>
  323. <field>
  324. <name>name</name>
  325. <sorting>ascending</sorting>
  326. </field>
  327. </index>
  328. <index>
  329. <name>fs_storage_mimetype</name>
  330. <field>
  331. <name>storage</name>
  332. <sorting>ascending</sorting>
  333. </field>
  334. <field>
  335. <name>mimetype</name>
  336. <sorting>ascending</sorting>
  337. </field>
  338. </index>
  339. <index>
  340. <name>fs_storage_mimepart</name>
  341. <field>
  342. <name>storage</name>
  343. <sorting>ascending</sorting>
  344. </field>
  345. <field>
  346. <name>mimepart</name>
  347. <sorting>ascending</sorting>
  348. </field>
  349. </index>
  350. <index>
  351. <name>fs_storage_size</name>
  352. <field>
  353. <name>storage</name>
  354. <sorting>ascending</sorting>
  355. </field>
  356. <field>
  357. <name>size</name>
  358. <sorting>ascending</sorting>
  359. </field>
  360. <field>
  361. <name>fileid</name>
  362. </field>
  363. </index>
  364. </declaration>
  365. </table>
  366. <table>
  367. <!--
  368. Stores which groups have which users as members in an n:m relationship.
  369. - Maps group id (gid) to a set of users (uid)
  370. - Maps user id (uid) to a set of groups (gid) (but without index)
  371. -->
  372. <name>*dbprefix*group_user</name>
  373. <declaration>
  374. <!-- Foreign Key groups::gid -->
  375. <field>
  376. <name>gid</name>
  377. <type>text</type>
  378. <default></default>
  379. <notnull>true</notnull>
  380. <length>64</length>
  381. </field>
  382. <!-- Foreign Key users::uid -->
  383. <field>
  384. <name>uid</name>
  385. <type>text</type>
  386. <default></default>
  387. <notnull>true</notnull>
  388. <length>64</length>
  389. </field>
  390. <index>
  391. <name>gu_gid_uid_index</name>
  392. <primary>true</primary>
  393. <unique>true</unique>
  394. <field>
  395. <name>gid</name>
  396. <sorting>ascending</sorting>
  397. </field>
  398. <field>
  399. <name>uid</name>
  400. <sorting>ascending</sorting>
  401. </field>
  402. </index>
  403. </declaration>
  404. </table>
  405. <table>
  406. <!--
  407. Stores which groups have which users as admins in an n:m relationship.
  408. - Maps group id (gid) to a set of users (uid)
  409. - Maps user id (uid) to a set of groups (gid)
  410. NOTE: This could (very likely) be reduced to a single bit in group_user
  411. instead of repeating varchars gid and uid here
  412. -->
  413. <name>*dbprefix*group_admin</name>
  414. <declaration>
  415. <!-- Foreign Key groups::gid -->
  416. <field>
  417. <name>gid</name>
  418. <type>text</type>
  419. <default></default>
  420. <notnull>true</notnull>
  421. <length>64</length>
  422. </field>
  423. <!-- Foreign Key users::uid -->
  424. <field>
  425. <name>uid</name>
  426. <type>text</type>
  427. <default></default>
  428. <notnull>true</notnull>
  429. <length>64</length>
  430. </field>
  431. <index>
  432. <name>group_admin_uid</name>
  433. <field>
  434. <name>uid</name>
  435. <sorting>ascending</sorting>
  436. </field>
  437. </index>
  438. <index>
  439. <name>ga_gid_uid_index</name>
  440. <primary>true</primary>
  441. <unique>true</unique>
  442. <field>
  443. <name>gid</name>
  444. <sorting>ascending</sorting>
  445. </field>
  446. <field>
  447. <name>uid</name>
  448. <sorting>ascending</sorting>
  449. </field>
  450. </index>
  451. </declaration>
  452. </table>
  453. <table>
  454. <!--
  455. A simple list of groups.
  456. -->
  457. <name>*dbprefix*groups</name>
  458. <declaration>
  459. <field>
  460. <name>gid</name>
  461. <type>text</type>
  462. <default></default>
  463. <notnull>true</notnull>
  464. <length>64</length>
  465. </field>
  466. <index>
  467. <name>groups_pKey</name>
  468. <primary>true</primary>
  469. <field>
  470. <name>gid</name>
  471. <sorting>ascending</sorting>
  472. </field>
  473. </index>
  474. </declaration>
  475. </table>
  476. <table>
  477. <!--
  478. Locks held by WebDAV clients via OC_Connector_Sabre_Locks.
  479. -->
  480. <name>*dbprefix*locks</name>
  481. <declaration>
  482. <field>
  483. <name>id</name>
  484. <type>integer</type>
  485. <default>0</default>
  486. <notnull>true</notnull>
  487. <autoincrement>1</autoincrement>
  488. <unsigned>true</unsigned>
  489. <length>4</length>
  490. </field>
  491. <!-- Foreign Key users::uid -->
  492. <field>
  493. <name>userid</name>
  494. <type>text</type>
  495. <default></default>
  496. <notnull>false</notnull>
  497. <length>64</length>
  498. </field>
  499. <field>
  500. <name>owner</name>
  501. <type>text</type>
  502. <default></default>
  503. <notnull>false</notnull>
  504. <length>100</length>
  505. </field>
  506. <field>
  507. <name>timeout</name>
  508. <type>integer</type>
  509. <notnull>false</notnull>
  510. <unsigned>true</unsigned>
  511. <length>4</length>
  512. </field>
  513. <field>
  514. <name>created</name>
  515. <type>integer</type>
  516. <notnull>false</notnull>
  517. <length>8</length>
  518. </field>
  519. <field>
  520. <name>token</name>
  521. <type>text</type>
  522. <default></default>
  523. <notnull>false</notnull>
  524. <length>100</length>
  525. </field>
  526. <field>
  527. <name>scope</name>
  528. <type>integer</type>
  529. <notnull>false</notnull>
  530. <length>1</length>
  531. </field>
  532. <field>
  533. <name>depth</name>
  534. <type>integer</type>
  535. <notnull>false</notnull>
  536. <length>1</length>
  537. </field>
  538. <field>
  539. <name>uri</name>
  540. <type>clob</type>
  541. <notnull>false</notnull>
  542. </field>
  543. </declaration>
  544. </table>
  545. <table>
  546. <!--
  547. Namespaced Key-Value Store for User Preferences
  548. - Keys are namespaced per userid and appid.
  549. - E.g. (admin, files, cache_version) -> 5
  550. -->
  551. <name>*dbprefix*preferences</name>
  552. <declaration>
  553. <!-- Foreign Key users::uid -->
  554. <field>
  555. <name>userid</name>
  556. <type>text</type>
  557. <default></default>
  558. <notnull>true</notnull>
  559. <length>64</length>
  560. </field>
  561. <field>
  562. <name>appid</name>
  563. <type>text</type>
  564. <default></default>
  565. <notnull>true</notnull>
  566. <length>32</length>
  567. </field>
  568. <field>
  569. <name>configkey</name>
  570. <type>text</type>
  571. <default></default>
  572. <notnull>true</notnull>
  573. <length>64</length>
  574. </field>
  575. <field>
  576. <name>configvalue</name>
  577. <type>clob</type>
  578. <notnull>false</notnull>
  579. </field>
  580. <index>
  581. <name>pref_userid_appid_key_index</name>
  582. <primary>true</primary>
  583. <unique>true</unique>
  584. <field>
  585. <name>userid</name>
  586. <sorting>ascending</sorting>
  587. </field>
  588. <field>
  589. <name>appid</name>
  590. <sorting>ascending</sorting>
  591. </field>
  592. <field>
  593. <name>configkey</name>
  594. <sorting>ascending</sorting>
  595. </field>
  596. </index>
  597. </declaration>
  598. </table>
  599. <table>
  600. <!--
  601. WebDAV properties.
  602. -->
  603. <name>*dbprefix*properties</name>
  604. <declaration>
  605. <field>
  606. <name>id</name>
  607. <autoincrement>1</autoincrement>
  608. <type>integer</type>
  609. <default>0</default>
  610. <notnull>true</notnull>
  611. <length>4</length>
  612. </field>
  613. <!-- Foreign Key users::uid -->
  614. <field>
  615. <name>userid</name>
  616. <type>text</type>
  617. <default></default>
  618. <notnull>true</notnull>
  619. <length>64</length>
  620. </field>
  621. <field>
  622. <name>propertypath</name>
  623. <type>text</type>
  624. <default></default>
  625. <notnull>true</notnull>
  626. <length>255</length>
  627. </field>
  628. <field>
  629. <name>propertyname</name>
  630. <type>text</type>
  631. <default></default>
  632. <notnull>true</notnull>
  633. <length>255</length>
  634. </field>
  635. <field>
  636. <name>propertyvalue</name>
  637. <type>text</type>
  638. <notnull>true</notnull>
  639. <length>255</length>
  640. </field>
  641. <index>
  642. <name>property_index</name>
  643. <field>
  644. <name>userid</name>
  645. <sorting>ascending</sorting>
  646. </field>
  647. </index>
  648. </declaration>
  649. </table>
  650. <table>
  651. <!--
  652. Shares of all types (user-to-user, external-via-link, etc.)
  653. -->
  654. <name>*dbprefix*share</name>
  655. <declaration>
  656. <field>
  657. <name>id</name>
  658. <autoincrement>1</autoincrement>
  659. <type>integer</type>
  660. <default>0</default>
  661. <notnull>true</notnull>
  662. <length>4</length>
  663. </field>
  664. <!-- Constant OCP\Share::SHARE_TYPE_* -->
  665. <field>
  666. <name>share_type</name>
  667. <type>integer</type>
  668. <default>0</default>
  669. <notnull>true</notnull>
  670. <length>1</length>
  671. </field>
  672. <!-- Foreign Key users::uid or NULL -->
  673. <field>
  674. <name>share_with</name>
  675. <type>text</type>
  676. <default></default>
  677. <notnull>false</notnull>
  678. <length>255</length>
  679. </field>
  680. <!-- Foreign Key users::uid -->
  681. <field>
  682. <name>uid_owner</name>
  683. <type>text</type>
  684. <default></default>
  685. <notnull>true</notnull>
  686. <length>64</length>
  687. </field>
  688. <!-- Foreign Key share::id or NULL -->
  689. <field>
  690. <name>parent</name>
  691. <type>integer</type>
  692. <notnull>false</notnull>
  693. <length>4</length>
  694. </field>
  695. <!-- E.g. file or folder -->
  696. <field>
  697. <name>item_type</name>
  698. <type>text</type>
  699. <default></default>
  700. <notnull>true</notnull>
  701. <length>64</length>
  702. </field>
  703. <!-- Foreign Key filecache::fileid -->
  704. <field>
  705. <name>item_source</name>
  706. <type>text</type>
  707. <default></default>
  708. <notnull>false</notnull>
  709. <length>255</length>
  710. </field>
  711. <field>
  712. <name>item_target</name>
  713. <type>text</type>
  714. <default></default>
  715. <notnull>false</notnull>
  716. <length>255</length>
  717. </field>
  718. <!-- Foreign Key filecache::fileid -->
  719. <field>
  720. <name>file_source</name>
  721. <type>integer</type>
  722. <notnull>false</notnull>
  723. <length>4</length>
  724. </field>
  725. <field>
  726. <name>file_target</name>
  727. <type>text</type>
  728. <default></default>
  729. <notnull>false</notnull>
  730. <length>512</length>
  731. </field>
  732. <!-- Permission bitfield -->
  733. <field>
  734. <name>permissions</name>
  735. <type>integer</type>
  736. <default>0</default>
  737. <notnull>true</notnull>
  738. <length>1</length>
  739. </field>
  740. <!-- Time of share creation -->
  741. <field>
  742. <name>stime</name>
  743. <type>integer</type>
  744. <default>0</default>
  745. <notnull>true</notnull>
  746. <length>8</length>
  747. </field>
  748. <!-- Whether the receiver accepted the share, if share_with is set. -->
  749. <field>
  750. <name>accepted</name>
  751. <type>integer</type>
  752. <default>0</default>
  753. <notnull>true</notnull>
  754. <length>1</length>
  755. </field>
  756. <!-- Time of share expiration -->
  757. <field>
  758. <name>expiration</name>
  759. <type>timestamp</type>
  760. <default></default>
  761. <notnull>false</notnull>
  762. </field>
  763. <field>
  764. <name>token</name>
  765. <type>text</type>
  766. <default></default>
  767. <notnull>false</notnull>
  768. <length>32</length>
  769. </field>
  770. <field>
  771. <name>mail_send</name>
  772. <type>integer</type>
  773. <default>0</default>
  774. <notnull>true</notnull>
  775. <length>1</length>
  776. </field>
  777. <index>
  778. <name>item_share_type_index</name>
  779. <field>
  780. <name>item_type</name>
  781. <sorting>ascending</sorting>
  782. </field>
  783. <field>
  784. <name>share_type</name>
  785. <sorting>ascending</sorting>
  786. </field>
  787. </index>
  788. <index>
  789. <name>file_source_index</name>
  790. <field>
  791. <name>file_source</name>
  792. <sorting>ascending</sorting>
  793. </field>
  794. </index>
  795. <index>
  796. <name>token_index</name>
  797. <field>
  798. <name>token</name>
  799. <sorting>ascending</sorting>
  800. </field>
  801. </index>
  802. </declaration>
  803. </table>
  804. <table>
  805. <!--
  806. Scheduled background jobs.
  807. See OC\BackgroundJob\JobList.
  808. -->
  809. <name>*dbprefix*jobs</name>
  810. <declaration>
  811. <field>
  812. <name>id</name>
  813. <type>integer</type>
  814. <default>0</default>
  815. <notnull>true</notnull>
  816. <autoincrement>1</autoincrement>
  817. <unsigned>true</unsigned>
  818. <length>4</length>
  819. </field>
  820. <field>
  821. <name>class</name>
  822. <type>text</type>
  823. <default></default>
  824. <notnull>true</notnull>
  825. <length>255</length>
  826. </field>
  827. <field>
  828. <name>argument</name>
  829. <type>text</type>
  830. <default></default>
  831. <notnull>true</notnull>
  832. <length>256</length>
  833. </field>
  834. <field>
  835. <name>last_run</name>
  836. <type>integer</type>
  837. <default></default>
  838. <notnull>false</notnull>
  839. </field>
  840. <index>
  841. <name>job_class_index</name>
  842. <field>
  843. <name>class</name>
  844. <sorting>ascending</sorting>
  845. </field>
  846. </index>
  847. </declaration>
  848. </table>
  849. <table>
  850. <!--
  851. List of usernames, their display name and login password.
  852. -->
  853. <name>*dbprefix*users</name>
  854. <declaration>
  855. <field>
  856. <name>uid</name>
  857. <type>text</type>
  858. <default></default>
  859. <notnull>true</notnull>
  860. <length>64</length>
  861. </field>
  862. <field>
  863. <name>displayname</name>
  864. <type>text</type>
  865. <default></default>
  866. <length>64</length>
  867. </field>
  868. <field>
  869. <name>password</name>
  870. <type>text</type>
  871. <default></default>
  872. <notnull>true</notnull>
  873. <length>255</length>
  874. </field>
  875. <index>
  876. <name>users_pKey</name>
  877. <primary>true</primary>
  878. <field>
  879. <name>uid</name>
  880. <sorting>ascending</sorting>
  881. </field>
  882. </index>
  883. </declaration>
  884. </table>
  885. <table>
  886. <!--
  887. List of tags (category) + a unique tag id (id) per user (uid) and type.
  888. -->
  889. <name>*dbprefix*vcategory</name>
  890. <declaration>
  891. <field>
  892. <name>id</name>
  893. <type>integer</type>
  894. <default>0</default>
  895. <notnull>true</notnull>
  896. <autoincrement>1</autoincrement>
  897. <unsigned>true</unsigned>
  898. <length>4</length>
  899. </field>
  900. <!-- Foreign Key users::uid -->
  901. <field>
  902. <name>uid</name>
  903. <type>text</type>
  904. <default></default>
  905. <notnull>true</notnull>
  906. <length>64</length>
  907. </field>
  908. <field>
  909. <name>type</name>
  910. <type>text</type>
  911. <default></default>
  912. <notnull>true</notnull>
  913. <length>64</length>
  914. </field>
  915. <field>
  916. <name>category</name>
  917. <type>text</type>
  918. <default></default>
  919. <notnull>true</notnull>
  920. <length>255</length>
  921. </field>
  922. <index>
  923. <name>uid_index</name>
  924. <field>
  925. <name>uid</name>
  926. <sorting>ascending</sorting>
  927. </field>
  928. </index>
  929. <index>
  930. <name>type_index</name>
  931. <field>
  932. <name>type</name>
  933. <sorting>ascending</sorting>
  934. </field>
  935. </index>
  936. <index>
  937. <name>category_index</name>
  938. <field>
  939. <name>category</name>
  940. <sorting>ascending</sorting>
  941. </field>
  942. </index>
  943. </declaration>
  944. </table>
  945. <table>
  946. <!--
  947. Object-Tag associations per tag type.
  948. -->
  949. <name>*dbprefix*vcategory_to_object</name>
  950. <declaration>
  951. <field>
  952. <name>objid</name>
  953. <type>integer</type>
  954. <default>0</default>
  955. <notnull>true</notnull>
  956. <unsigned>true</unsigned>
  957. <length>4</length>
  958. </field>
  959. <!-- Foreign Key vcategory::id -->
  960. <field>
  961. <name>categoryid</name>
  962. <type>integer</type>
  963. <default>0</default>
  964. <notnull>true</notnull>
  965. <unsigned>true</unsigned>
  966. <length>4</length>
  967. </field>
  968. <field>
  969. <name>type</name>
  970. <type>text</type>
  971. <default></default>
  972. <notnull>true</notnull>
  973. <length>64</length>
  974. </field>
  975. <index>
  976. <primary>true</primary>
  977. <unique>true</unique>
  978. <name>category_object_index</name>
  979. <field>
  980. <name>categoryid</name>
  981. <sorting>ascending</sorting>
  982. </field>
  983. <field>
  984. <name>objid</name>
  985. <sorting>ascending</sorting>
  986. </field>
  987. <field>
  988. <name>type</name>
  989. <sorting>ascending</sorting>
  990. </field>
  991. </index>
  992. <index>
  993. <name>vcategory_objectd_index</name>
  994. <field>
  995. <name>objid</name>
  996. <sorting>ascending</sorting>
  997. </field>
  998. <field>
  999. <name>type</name>
  1000. <sorting>ascending</sorting>
  1001. </field>
  1002. </index>
  1003. </declaration>
  1004. </table>
  1005. <table>
  1006. <!--
  1007. Namespaced Key-Value Store for arbitrary data.
  1008. - Keys are namespaced per userid and appid.
  1009. - E.g. (admin, files, foo) -> bar
  1010. -->
  1011. <name>*dbprefix*privatedata</name>
  1012. <declaration>
  1013. <field>
  1014. <name>keyid</name>
  1015. <type>integer</type>
  1016. <default>0</default>
  1017. <notnull>true</notnull>
  1018. <unsigned>true</unsigned>
  1019. <length>4</length>
  1020. <autoincrement>1</autoincrement>
  1021. </field>
  1022. <!-- Foreign Key users::uid -->
  1023. <field>
  1024. <name>user</name>
  1025. <type>text</type>
  1026. <default></default>
  1027. <notnull>true</notnull>
  1028. <length>64</length>
  1029. </field>
  1030. <field>
  1031. <name>app</name>
  1032. <type>text</type>
  1033. <default></default>
  1034. <notnull>true</notnull>
  1035. <length>255</length>
  1036. </field>
  1037. <field>
  1038. <name>key</name>
  1039. <type>text</type>
  1040. <default></default>
  1041. <notnull>true</notnull>
  1042. <length>255</length>
  1043. </field>
  1044. <field>
  1045. <name>value</name>
  1046. <type>text</type>
  1047. <default></default>
  1048. <notnull>true</notnull>
  1049. <length>255</length>
  1050. </field>
  1051. <index>
  1052. <primary>true</primary>
  1053. <unique>true</unique>
  1054. <name>keyid_index</name>
  1055. <field>
  1056. <name>keyid</name>
  1057. <sorting>ascending</sorting>
  1058. </field>
  1059. </index>
  1060. </declaration>
  1061. </table>
  1062. </database>