db_structure.xml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887
  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. <index>
  144. <name>mounts_user_index</name>
  145. <unique>false</unique>
  146. <field>
  147. <name>user_id</name>
  148. <sorting>ascending</sorting>
  149. </field>
  150. </index>
  151. <index>
  152. <name>mounts_storage_index</name>
  153. <unique>false</unique>
  154. <field>
  155. <name>storage_id</name>
  156. <sorting>ascending</sorting>
  157. </field>
  158. </index>
  159. <index>
  160. <name>mounts_root_index</name>
  161. <unique>false</unique>
  162. <field>
  163. <name>root_id</name>
  164. <sorting>ascending</sorting>
  165. </field>
  166. </index>
  167. <index>
  168. <name>mounts_user_root_index</name>
  169. <unique>true</unique>
  170. <field>
  171. <name>user_id</name>
  172. <sorting>ascending</sorting>
  173. </field>
  174. <field>
  175. <name>root_id</name>
  176. <sorting>ascending</sorting>
  177. </field>
  178. </index>
  179. </declaration>
  180. </table>
  181. <table>
  182. <!--
  183. Bidirectional Map for Mimetypes and Mimetype Id
  184. - Assigns each mimetype (and supertype) a unique mimetype id integer.
  185. - E.g. application <-> 5
  186. - E.g. application/pdf <-> 6
  187. -->
  188. <name>*dbprefix*mimetypes</name>
  189. <declaration>
  190. <field>
  191. <name>id</name>
  192. <type>integer</type>
  193. <default>0</default>
  194. <notnull>true</notnull>
  195. <autoincrement>1</autoincrement>
  196. <length>4</length>
  197. </field>
  198. <field>
  199. <name>mimetype</name>
  200. <type>text</type>
  201. <default></default>
  202. <notnull>true</notnull>
  203. <length>255</length>
  204. </field>
  205. <index>
  206. <name>mimetype_id_index</name>
  207. <unique>true</unique>
  208. <field>
  209. <name>mimetype</name>
  210. <sorting>ascending</sorting>
  211. </field>
  212. </index>
  213. </declaration>
  214. </table>
  215. <table>
  216. <!--
  217. Main file table containing one row for each directory and file.
  218. - Assigns a unique integer fileid to each file (and directory)
  219. - Assigns an etag to each file (and directory)
  220. - Caches various file/dir properties such as:
  221. - path (filename, e.g. files/combinatoricslib-2.0_doc.zip)
  222. - path_hash = md5(path)
  223. - name (basename, e.g. combinatoricslib-2.0_doc.zip)
  224. - size (for directories this is the sum of all contained file sizes)
  225. -->
  226. <name>*dbprefix*filecache</name>
  227. <declaration>
  228. <field>
  229. <name>fileid</name>
  230. <type>integer</type>
  231. <default>0</default>
  232. <notnull>true</notnull>
  233. <autoincrement>1</autoincrement>
  234. <length>4</length>
  235. </field>
  236. <!-- Foreign Key storages::numeric_id -->
  237. <field>
  238. <name>storage</name>
  239. <type>integer</type>
  240. <default></default>
  241. <notnull>true</notnull>
  242. <length>4</length>
  243. </field>
  244. <field>
  245. <name>path</name>
  246. <type>text</type>
  247. <default></default>
  248. <notnull>false</notnull>
  249. <length>4000</length>
  250. </field>
  251. <field>
  252. <name>path_hash</name>
  253. <type>text</type>
  254. <default></default>
  255. <notnull>true</notnull>
  256. <length>32</length>
  257. </field>
  258. <!-- Foreign Key filecache::fileid -->
  259. <field>
  260. <name>parent</name>
  261. <type>integer</type>
  262. <default></default>
  263. <notnull>true</notnull>
  264. <length>4</length>
  265. </field>
  266. <field>
  267. <name>name</name>
  268. <type>text</type>
  269. <default></default>
  270. <notnull>false</notnull>
  271. <length>250</length>
  272. </field>
  273. <!-- Foreign Key mimetypes::id -->
  274. <field>
  275. <name>mimetype</name>
  276. <type>integer</type>
  277. <default></default>
  278. <notnull>true</notnull>
  279. <length>4</length>
  280. </field>
  281. <!-- Foreign Key mimetypes::id -->
  282. <field>
  283. <name>mimepart</name>
  284. <type>integer</type>
  285. <default></default>
  286. <notnull>true</notnull>
  287. <length>4</length>
  288. </field>
  289. <field>
  290. <name>size</name>
  291. <type>integer</type>
  292. <default></default>
  293. <notnull>true</notnull>
  294. <length>8</length>
  295. </field>
  296. <field>
  297. <name>mtime</name>
  298. <type>integer</type>
  299. <default></default>
  300. <notnull>true</notnull>
  301. <length>4</length>
  302. </field>
  303. <field>
  304. <name>storage_mtime</name>
  305. <type>integer</type>
  306. <default></default>
  307. <notnull>true</notnull>
  308. <length>4</length>
  309. </field>
  310. <field>
  311. <name>encrypted</name>
  312. <type>integer</type>
  313. <default>0</default>
  314. <notnull>true</notnull>
  315. <length>4</length>
  316. </field>
  317. <field>
  318. <name>unencrypted_size</name>
  319. <type>integer</type>
  320. <default>0</default>
  321. <notnull>true</notnull>
  322. <length>8</length>
  323. </field>
  324. <field>
  325. <name>etag</name>
  326. <type>text</type>
  327. <default></default>
  328. <notnull>false</notnull>
  329. <length>40</length>
  330. </field>
  331. <field>
  332. <name>permissions</name>
  333. <type>integer</type>
  334. <default>0</default>
  335. <notnull>false</notnull>
  336. <length>4</length>
  337. </field>
  338. <field>
  339. <name>checksum</name>
  340. <type>text</type>
  341. <default></default>
  342. <notnull>false</notnull>
  343. <length>255</length>
  344. </field>
  345. <index>
  346. <name>fs_storage_path_hash</name>
  347. <unique>true</unique>
  348. <field>
  349. <name>storage</name>
  350. <sorting>ascending</sorting>
  351. </field>
  352. <field>
  353. <name>path_hash</name>
  354. <sorting>ascending</sorting>
  355. </field>
  356. </index>
  357. <index>
  358. <name>fs_parent_name_hash</name>
  359. <field>
  360. <name>parent</name>
  361. <sorting>ascending</sorting>
  362. </field>
  363. <field>
  364. <name>name</name>
  365. <sorting>ascending</sorting>
  366. </field>
  367. </index>
  368. <index>
  369. <name>fs_storage_mimetype</name>
  370. <field>
  371. <name>storage</name>
  372. <sorting>ascending</sorting>
  373. </field>
  374. <field>
  375. <name>mimetype</name>
  376. <sorting>ascending</sorting>
  377. </field>
  378. </index>
  379. <index>
  380. <name>fs_storage_mimepart</name>
  381. <field>
  382. <name>storage</name>
  383. <sorting>ascending</sorting>
  384. </field>
  385. <field>
  386. <name>mimepart</name>
  387. <sorting>ascending</sorting>
  388. </field>
  389. </index>
  390. <index>
  391. <name>fs_storage_size</name>
  392. <field>
  393. <name>storage</name>
  394. <sorting>ascending</sorting>
  395. </field>
  396. <field>
  397. <name>size</name>
  398. <sorting>ascending</sorting>
  399. </field>
  400. <field>
  401. <name>fileid</name>
  402. </field>
  403. </index>
  404. </declaration>
  405. </table>
  406. <table>
  407. <!--
  408. Stores which groups have which users as members in an n:m relationship.
  409. - Maps group id (gid) to a set of users (uid)
  410. - Maps user id (uid) to a set of groups (gid) (but without index)
  411. -->
  412. <name>*dbprefix*group_user</name>
  413. <declaration>
  414. <!-- Foreign Key groups::gid -->
  415. <field>
  416. <name>gid</name>
  417. <type>text</type>
  418. <default></default>
  419. <notnull>true</notnull>
  420. <length>64</length>
  421. </field>
  422. <!-- Foreign Key users::uid -->
  423. <field>
  424. <name>uid</name>
  425. <type>text</type>
  426. <default></default>
  427. <notnull>true</notnull>
  428. <length>64</length>
  429. </field>
  430. <index>
  431. <name>gu_gid_uid_index</name>
  432. <primary>true</primary>
  433. <unique>true</unique>
  434. <field>
  435. <name>gid</name>
  436. <sorting>ascending</sorting>
  437. </field>
  438. <field>
  439. <name>uid</name>
  440. <sorting>ascending</sorting>
  441. </field>
  442. </index>
  443. <index>
  444. <name>gu_uid_index</name>
  445. <field>
  446. <name>uid</name>
  447. <sorting>ascending</sorting>
  448. </field>
  449. </index>
  450. </declaration>
  451. </table>
  452. <table>
  453. <!--
  454. Stores which groups have which users as admins in an n:m relationship.
  455. - Maps group id (gid) to a set of users (uid)
  456. - Maps user id (uid) to a set of groups (gid)
  457. NOTE: This could (very likely) be reduced to a single bit in group_user
  458. instead of repeating varchars gid and uid here
  459. -->
  460. <name>*dbprefix*group_admin</name>
  461. <declaration>
  462. <!-- Foreign Key groups::gid -->
  463. <field>
  464. <name>gid</name>
  465. <type>text</type>
  466. <default></default>
  467. <notnull>true</notnull>
  468. <length>64</length>
  469. </field>
  470. <!-- Foreign Key users::uid -->
  471. <field>
  472. <name>uid</name>
  473. <type>text</type>
  474. <default></default>
  475. <notnull>true</notnull>
  476. <length>64</length>
  477. </field>
  478. <index>
  479. <name>group_admin_uid</name>
  480. <field>
  481. <name>uid</name>
  482. <sorting>ascending</sorting>
  483. </field>
  484. </index>
  485. <index>
  486. <name>ga_gid_uid_index</name>
  487. <primary>true</primary>
  488. <unique>true</unique>
  489. <field>
  490. <name>gid</name>
  491. <sorting>ascending</sorting>
  492. </field>
  493. <field>
  494. <name>uid</name>
  495. <sorting>ascending</sorting>
  496. </field>
  497. </index>
  498. </declaration>
  499. </table>
  500. <table>
  501. <!--
  502. A simple list of groups.
  503. -->
  504. <name>*dbprefix*groups</name>
  505. <declaration>
  506. <field>
  507. <name>gid</name>
  508. <type>text</type>
  509. <default></default>
  510. <notnull>true</notnull>
  511. <length>64</length>
  512. </field>
  513. <index>
  514. <name>groups_pKey</name>
  515. <primary>true</primary>
  516. <field>
  517. <name>gid</name>
  518. <sorting>ascending</sorting>
  519. </field>
  520. </index>
  521. </declaration>
  522. </table>
  523. <table>
  524. <!--
  525. Namespaced Key-Value Store for User Preferences
  526. - Keys are namespaced per userid and appid.
  527. - E.g. (admin, files, cache_version) -> 5
  528. -->
  529. <name>*dbprefix*preferences</name>
  530. <declaration>
  531. <!-- Foreign Key users::uid -->
  532. <field>
  533. <name>userid</name>
  534. <type>text</type>
  535. <default></default>
  536. <notnull>true</notnull>
  537. <length>64</length>
  538. </field>
  539. <field>
  540. <name>appid</name>
  541. <type>text</type>
  542. <default></default>
  543. <notnull>true</notnull>
  544. <length>32</length>
  545. </field>
  546. <field>
  547. <name>configkey</name>
  548. <type>text</type>
  549. <default></default>
  550. <notnull>true</notnull>
  551. <length>64</length>
  552. </field>
  553. <field>
  554. <name>configvalue</name>
  555. <type>clob</type>
  556. <notnull>false</notnull>
  557. </field>
  558. <index>
  559. <name>pref_userid_appid_key_index</name>
  560. <primary>true</primary>
  561. <unique>true</unique>
  562. <field>
  563. <name>userid</name>
  564. <sorting>ascending</sorting>
  565. </field>
  566. <field>
  567. <name>appid</name>
  568. <sorting>ascending</sorting>
  569. </field>
  570. <field>
  571. <name>configkey</name>
  572. <sorting>ascending</sorting>
  573. </field>
  574. </index>
  575. </declaration>
  576. </table>
  577. <table>
  578. <!--
  579. WebDAV properties.
  580. -->
  581. <name>*dbprefix*properties</name>
  582. <declaration>
  583. <field>
  584. <name>id</name>
  585. <autoincrement>1</autoincrement>
  586. <type>integer</type>
  587. <default>0</default>
  588. <notnull>true</notnull>
  589. <length>4</length>
  590. </field>
  591. <!-- Foreign Key users::uid -->
  592. <field>
  593. <name>userid</name>
  594. <type>text</type>
  595. <default></default>
  596. <notnull>true</notnull>
  597. <length>64</length>
  598. </field>
  599. <field>
  600. <name>propertypath</name>
  601. <type>text</type>
  602. <default></default>
  603. <notnull>true</notnull>
  604. <length>255</length>
  605. </field>
  606. <field>
  607. <name>propertyname</name>
  608. <type>text</type>
  609. <default></default>
  610. <notnull>true</notnull>
  611. <length>255</length>
  612. </field>
  613. <field>
  614. <name>propertyvalue</name>
  615. <type>text</type>
  616. <notnull>true</notnull>
  617. <length>255</length>
  618. </field>
  619. <index>
  620. <name>property_index</name>
  621. <field>
  622. <name>userid</name>
  623. <sorting>ascending</sorting>
  624. </field>
  625. </index>
  626. </declaration>
  627. </table>
  628. <table>
  629. <!--
  630. Shares of all types (user-to-user, external-via-link, etc.)
  631. -->
  632. <name>*dbprefix*share</name>
  633. <declaration>
  634. <field>
  635. <name>id</name>
  636. <autoincrement>1</autoincrement>
  637. <type>integer</type>
  638. <default>0</default>
  639. <notnull>true</notnull>
  640. <length>4</length>
  641. </field>
  642. <!-- Constant OCP\Share::SHARE_TYPE_* -->
  643. <field>
  644. <name>share_type</name>
  645. <type>integer</type>
  646. <default>0</default>
  647. <notnull>true</notnull>
  648. <length>1</length>
  649. </field>
  650. <!-- Foreign Key users::uid or NULL -->
  651. <field>
  652. <name>share_with</name>
  653. <type>text</type>
  654. <default></default>
  655. <notnull>false</notnull>
  656. <length>255</length>
  657. </field>
  658. <!-- Foreign Key users::uid -->
  659. <!-- This is the owner of the share
  660. which does not have to be the initiator of the share -->
  661. <field>
  662. <name>uid_owner</name>
  663. <type>text</type>
  664. <default></default>
  665. <notnull>true</notnull>
  666. <length>64</length>
  667. </field>
  668. <!-- Foreign Key users::uid -->
  669. <!-- This is the initiator of the share -->
  670. <field>
  671. <name>uid_initiator</name>
  672. <type>text</type>
  673. <default></default>
  674. <notnull>false</notnull>
  675. <length>64</length>
  676. </field>
  677. <!-- Foreign Key share::id or NULL -->
  678. <field>
  679. <name>parent</name>
  680. <type>integer</type>
  681. <notnull>false</notnull>
  682. <length>4</length>
  683. </field>
  684. <!-- E.g. file or folder -->
  685. <field>
  686. <name>item_type</name>
  687. <type>text</type>
  688. <default></default>
  689. <notnull>true</notnull>
  690. <length>64</length>
  691. </field>
  692. <!-- Foreign Key filecache::fileid -->
  693. <field>
  694. <name>item_source</name>
  695. <type>text</type>
  696. <default></default>
  697. <notnull>false</notnull>
  698. <length>255</length>
  699. </field>
  700. <field>
  701. <name>item_target</name>
  702. <type>text</type>
  703. <default></default>
  704. <notnull>false</notnull>
  705. <length>255</length>
  706. </field>
  707. <!-- Foreign Key filecache::fileid -->
  708. <field>
  709. <name>file_source</name>
  710. <type>integer</type>
  711. <notnull>false</notnull>
  712. <length>4</length>
  713. </field>
  714. <field>
  715. <name>file_target</name>
  716. <type>text</type>
  717. <default></default>
  718. <notnull>false</notnull>
  719. <length>512</length>
  720. </field>
  721. <!-- Permission bitfield -->
  722. <field>
  723. <name>permissions</name>
  724. <type>integer</type>
  725. <default>0</default>
  726. <notnull>true</notnull>
  727. <length>1</length>
  728. </field>
  729. <!-- Time of share creation -->
  730. <field>
  731. <name>stime</name>
  732. <type>integer</type>
  733. <default>0</default>
  734. <notnull>true</notnull>
  735. <length>8</length>
  736. </field>
  737. <!-- Whether the receiver accepted the share, if share_with is set. -->
  738. <field>
  739. <name>accepted</name>
  740. <type>integer</type>
  741. <default>0</default>
  742. <notnull>true</notnull>
  743. <length>1</length>
  744. </field>
  745. <!-- Time of share expiration -->
  746. <field>
  747. <name>expiration</name>
  748. <type>timestamp</type>
  749. <default></default>
  750. <notnull>false</notnull>
  751. </field>
  752. <field>
  753. <name>token</name>
  754. <type>text</type>
  755. <default></default>
  756. <notnull>false</notnull>
  757. <length>32</length>
  758. </field>
  759. <field>
  760. <name>mail_send</name>
  761. <type>integer</type>
  762. <default>0</default>
  763. <notnull>true</notnull>
  764. <length>1</length>
  765. </field>
  766. <index>
  767. <name>item_share_type_index</name>
  768. <field>
  769. <name>item_type</name>
  770. <sorting>ascending</sorting>
  771. </field>
  772. <field>
  773. <name>share_type</name>
  774. <sorting>ascending</sorting>
  775. </field>
  776. </index>
  777. <index>
  778. <name>file_source_index</name>
  779. <field>
  780. <name>file_source</name>
  781. <sorting>ascending</sorting>
  782. </field>
  783. </index>
  784. <index>
  785. <name>token_index</name>
  786. <field>
  787. <name>token</name>
  788. <sorting>ascending</sorting>
  789. </field>
  790. </index>
  791. </declaration>
  792. </table>
  793. <table>
  794. <!--
  795. Scheduled background jobs.
  796. See OC\BackgroundJob\JobList.
  797. -->
  798. <name>*dbprefix*jobs</name>
  799. <declaration>
  800. <field>
  801. <name>id</name>
  802. <type>integer</type>
  803. <default>0</default>
  804. <notnull>true</notnull>
  805. <autoincrement>1</autoincrement>
  806. <unsigned>true</unsigned>
  807. <length>4</length>
  808. </field>
  809. <field>
  810. <name>class</name>
  811. <type>text</type>
  812. <default></default>
  813. <notnull>true</notnull>
  814. <length>255</length>
  815. </field>
  816. <field>
  817. <name>argument</name>
  818. <type>text</type>
  819. <default></default>
  820. <notnull>true</notnull>
  821. <length>4000</length>
  822. </field>
  823. <field>
  824. <!-- timestamp when the job was executed the last time -->
  825. <name>last_run</name>
  826. <type>integer</type>
  827. <default></default>
  828. <notnull>false</notnull>
  829. </field>
  830. <field>
  831. <!-- timestamp when the job was checked if it needs execution the last time -->
  832. <name>last_checked</name>
  833. <type>integer</type>
  834. <default></default>
  835. <notnull>false</notnull>
  836. </field>
  837. <field>
  838. <!-- timestamp when the job was reserved the last time, 1 day timeout -->
  839. <name>reserved_at</name>
  840. <type>integer</type>
  841. <default></default>
  842. <notnull>false</notnull>
  843. </field>
  844. <index>
  845. <name>job_class_index</name>
  846. <field>
  847. <name>class</name>
  848. <sorting>ascending</sorting>
  849. </field>
  850. </index>
  851. </declaration>
  852. </table>
  853. <table>
  854. <!--
  855. List of usernames, their display name and login password.
  856. -->
  857. <name>*dbprefix*users</name>
  858. <declaration>
  859. <field>
  860. <name>uid</name>
  861. <type>text</type>
  862. <default></default>
  863. <notnull>true</notnull>
  864. <length>64</length>
  865. </field>
  866. <field>
  867. <name>displayname</name>
  868. <type>text</type>
  869. <default></default>
  870. <length>64</length>
  871. </field>
  872. <field>
  873. <name>password</name>
  874. <type>text</type>
  875. <default></default>
  876. <notnull>true</notnull>
  877. <length>255</length>
  878. </field>
  879. <index>
  880. <name>users_pKey</name>
  881. <primary>true</primary>
  882. <field>
  883. <name>uid</name>
  884. <sorting>ascending</sorting>
  885. </field>
  886. </index>
  887. </declaration>
  888. </table>
  889. <table>
  890. <name>*dbprefix*authtoken</name>
  891. <declaration>
  892. <field>
  893. <name>id</name>
  894. <type>integer</type>
  895. <default>0</default>
  896. <notnull>true</notnull>
  897. <autoincrement>1</autoincrement>
  898. <unsigned>true</unsigned>
  899. <length>4</length>
  900. </field>
  901. <!-- Foreign Key users::uid -->
  902. <field>
  903. <name>uid</name>
  904. <type>text</type>
  905. <default></default>
  906. <notnull>true</notnull>
  907. <length>64</length>
  908. </field>
  909. <field>
  910. <name>login_name</name>
  911. <type>text</type>
  912. <default></default>
  913. <notnull>true</notnull>
  914. <length>64</length>
  915. </field>
  916. <field>
  917. <name>password</name>
  918. <type>clob</type>
  919. <default></default>
  920. <notnull>false</notnull>
  921. </field>
  922. <field>
  923. <name>name</name>
  924. <type>clob</type>
  925. <default></default>
  926. <notnull>true</notnull>
  927. </field>
  928. <field>
  929. <name>token</name>
  930. <type>text</type>
  931. <default></default>
  932. <notnull>true</notnull>
  933. <length>200</length>
  934. </field>
  935. <field>
  936. <name>type</name>
  937. <type>integer</type>
  938. <default>0</default>
  939. <notnull>true</notnull>
  940. <unsigned>true</unsigned>
  941. <length>2</length>
  942. </field>
  943. <field>
  944. <name>last_activity</name>
  945. <type>integer</type>
  946. <default>0</default>
  947. <notnull>true</notnull>
  948. <unsigned>true</unsigned>
  949. <length>4</length>
  950. </field>
  951. <field>
  952. <name>last_check</name>
  953. <type>integer</type>
  954. <default>0</default>
  955. <notnull>true</notnull>
  956. <unsigned>true</unsigned>
  957. <length>4</length>
  958. </field>
  959. <index>
  960. <name>authtoken_token_index</name>
  961. <unique>true</unique>
  962. <field>
  963. <name>token</name>
  964. <sorting>ascending</sorting>
  965. </field>
  966. </index>
  967. <index>
  968. <name>authtoken_last_activity_index</name>
  969. <field>
  970. <name>last_activity</name>
  971. <sorting>ascending</sorting>
  972. </field>
  973. </index>
  974. </declaration>
  975. </table>
  976. <table>
  977. <!--
  978. List of tags (category) + a unique tag id (id) per user (uid) and type.
  979. -->
  980. <name>*dbprefix*vcategory</name>
  981. <declaration>
  982. <field>
  983. <name>id</name>
  984. <type>integer</type>
  985. <default>0</default>
  986. <notnull>true</notnull>
  987. <autoincrement>1</autoincrement>
  988. <unsigned>true</unsigned>
  989. <length>4</length>
  990. </field>
  991. <!-- Foreign Key users::uid -->
  992. <field>
  993. <name>uid</name>
  994. <type>text</type>
  995. <default></default>
  996. <notnull>true</notnull>
  997. <length>64</length>
  998. </field>
  999. <field>
  1000. <name>type</name>
  1001. <type>text</type>
  1002. <default></default>
  1003. <notnull>true</notnull>
  1004. <length>64</length>
  1005. </field>
  1006. <field>
  1007. <name>category</name>
  1008. <type>text</type>
  1009. <default></default>
  1010. <notnull>true</notnull>
  1011. <length>255</length>
  1012. </field>
  1013. <index>
  1014. <name>uid_index</name>
  1015. <field>
  1016. <name>uid</name>
  1017. <sorting>ascending</sorting>
  1018. </field>
  1019. </index>
  1020. <index>
  1021. <name>type_index</name>
  1022. <field>
  1023. <name>type</name>
  1024. <sorting>ascending</sorting>
  1025. </field>
  1026. </index>
  1027. <index>
  1028. <name>category_index</name>
  1029. <field>
  1030. <name>category</name>
  1031. <sorting>ascending</sorting>
  1032. </field>
  1033. </index>
  1034. </declaration>
  1035. </table>
  1036. <table>
  1037. <!--
  1038. Object-Tag associations per tag type.
  1039. -->
  1040. <name>*dbprefix*vcategory_to_object</name>
  1041. <declaration>
  1042. <field>
  1043. <name>objid</name>
  1044. <type>integer</type>
  1045. <default>0</default>
  1046. <notnull>true</notnull>
  1047. <unsigned>true</unsigned>
  1048. <length>4</length>
  1049. </field>
  1050. <!-- Foreign Key vcategory::id -->
  1051. <field>
  1052. <name>categoryid</name>
  1053. <type>integer</type>
  1054. <default>0</default>
  1055. <notnull>true</notnull>
  1056. <unsigned>true</unsigned>
  1057. <length>4</length>
  1058. </field>
  1059. <field>
  1060. <name>type</name>
  1061. <type>text</type>
  1062. <default></default>
  1063. <notnull>true</notnull>
  1064. <length>64</length>
  1065. </field>
  1066. <index>
  1067. <primary>true</primary>
  1068. <unique>true</unique>
  1069. <name>category_object_index</name>
  1070. <field>
  1071. <name>categoryid</name>
  1072. <sorting>ascending</sorting>
  1073. </field>
  1074. <field>
  1075. <name>objid</name>
  1076. <sorting>ascending</sorting>
  1077. </field>
  1078. <field>
  1079. <name>type</name>
  1080. <sorting>ascending</sorting>
  1081. </field>
  1082. </index>
  1083. <index>
  1084. <name>vcategory_objectd_index</name>
  1085. <field>
  1086. <name>objid</name>
  1087. <sorting>ascending</sorting>
  1088. </field>
  1089. <field>
  1090. <name>type</name>
  1091. <sorting>ascending</sorting>
  1092. </field>
  1093. </index>
  1094. </declaration>
  1095. </table>
  1096. <table>
  1097. <!--
  1098. List of system-wide tags
  1099. -->
  1100. <name>*dbprefix*systemtag</name>
  1101. <declaration>
  1102. <field>
  1103. <name>id</name>
  1104. <type>integer</type>
  1105. <default>0</default>
  1106. <notnull>true</notnull>
  1107. <autoincrement>1</autoincrement>
  1108. <unsigned>true</unsigned>
  1109. <length>4</length>
  1110. </field>
  1111. <!-- Tag name -->
  1112. <field>
  1113. <name>name</name>
  1114. <type>text</type>
  1115. <default></default>
  1116. <notnull>true</notnull>
  1117. <length>64</length>
  1118. </field>
  1119. <!-- Visibility: 0 user-not-visible, 1 user-visible -->
  1120. <field>
  1121. <name>visibility</name>
  1122. <type>integer</type>
  1123. <default>1</default>
  1124. <notnull>true</notnull>
  1125. <length>1</length>
  1126. </field>
  1127. <!-- Editable: 0 user-not-editable, 1 user-editable -->
  1128. <field>
  1129. <name>editable</name>
  1130. <type>integer</type>
  1131. <default>1</default>
  1132. <notnull>true</notnull>
  1133. <length>1</length>
  1134. </field>
  1135. <index>
  1136. <name>tag_ident</name>
  1137. <unique>true</unique>
  1138. <field>
  1139. <name>name</name>
  1140. <sorting>ascending</sorting>
  1141. </field>
  1142. <field>
  1143. <name>visibility</name>
  1144. <sorting>ascending</sorting>
  1145. </field>
  1146. <field>
  1147. <name>editable</name>
  1148. <sorting>ascending</sorting>
  1149. </field>
  1150. </index>
  1151. </declaration>
  1152. </table>
  1153. <table>
  1154. <!--
  1155. System tag to object associations per object type.
  1156. -->
  1157. <name>*dbprefix*systemtag_object_mapping</name>
  1158. <declaration>
  1159. <!-- object id (ex: file id for files)-->
  1160. <field>
  1161. <name>objectid</name>
  1162. <type>text</type>
  1163. <default></default>
  1164. <notnull>true</notnull>
  1165. <length>64</length>
  1166. </field>
  1167. <!-- object type (ex: "files")-->
  1168. <field>
  1169. <name>objecttype</name>
  1170. <type>text</type>
  1171. <default></default>
  1172. <notnull>true</notnull>
  1173. <length>64</length>
  1174. </field>
  1175. <!-- Foreign Key systemtag::id -->
  1176. <field>
  1177. <name>systemtagid</name>
  1178. <type>integer</type>
  1179. <default>0</default>
  1180. <notnull>true</notnull>
  1181. <unsigned>true</unsigned>
  1182. <length>4</length>
  1183. </field>
  1184. <index>
  1185. <unique>true</unique>
  1186. <name>mapping</name>
  1187. <field>
  1188. <name>objecttype</name>
  1189. <sorting>ascending</sorting>
  1190. </field>
  1191. <field>
  1192. <name>objectid</name>
  1193. <sorting>ascending</sorting>
  1194. </field>
  1195. <field>
  1196. <name>systemtagid</name>
  1197. <sorting>ascending</sorting>
  1198. </field>
  1199. </index>
  1200. </declaration>
  1201. </table>
  1202. <table>
  1203. <!--
  1204. System tag to group mapping
  1205. -->
  1206. <name>*dbprefix*systemtag_group</name>
  1207. <declaration>
  1208. <!-- Foreign Key systemtag::id -->
  1209. <field>
  1210. <name>systemtagid</name>
  1211. <type>integer</type>
  1212. <default>0</default>
  1213. <notnull>true</notnull>
  1214. <unsigned>true</unsigned>
  1215. <length>4</length>
  1216. </field>
  1217. <field>
  1218. <name>gid</name>
  1219. <type>string</type>
  1220. <notnull>true</notnull>
  1221. </field>
  1222. <index>
  1223. <name>systemtag_group</name>
  1224. <primary>true</primary>
  1225. <unique>true</unique>
  1226. <field>
  1227. <name>gid</name>
  1228. <sorting>ascending</sorting>
  1229. </field>
  1230. <field>
  1231. <name>systemtagid</name>
  1232. <sorting>ascending</sorting>
  1233. </field>
  1234. </index>
  1235. </declaration>
  1236. </table>
  1237. <table>
  1238. <!--
  1239. Namespaced Key-Value Store for arbitrary data.
  1240. - Keys are namespaced per userid and appid.
  1241. - E.g. (admin, files, foo) -> bar
  1242. -->
  1243. <name>*dbprefix*privatedata</name>
  1244. <declaration>
  1245. <field>
  1246. <name>keyid</name>
  1247. <type>integer</type>
  1248. <default>0</default>
  1249. <notnull>true</notnull>
  1250. <unsigned>true</unsigned>
  1251. <length>4</length>
  1252. <autoincrement>1</autoincrement>
  1253. </field>
  1254. <!-- Foreign Key users::uid -->
  1255. <field>
  1256. <name>user</name>
  1257. <type>text</type>
  1258. <default></default>
  1259. <notnull>true</notnull>
  1260. <length>64</length>
  1261. </field>
  1262. <field>
  1263. <name>app</name>
  1264. <type>text</type>
  1265. <default></default>
  1266. <notnull>true</notnull>
  1267. <length>255</length>
  1268. </field>
  1269. <field>
  1270. <name>key</name>
  1271. <type>text</type>
  1272. <default></default>
  1273. <notnull>true</notnull>
  1274. <length>255</length>
  1275. </field>
  1276. <field>
  1277. <name>value</name>
  1278. <type>text</type>
  1279. <default></default>
  1280. <notnull>true</notnull>
  1281. <length>255</length>
  1282. </field>
  1283. <index>
  1284. <primary>true</primary>
  1285. <unique>true</unique>
  1286. <name>keyid_index</name>
  1287. <field>
  1288. <name>keyid</name>
  1289. <sorting>ascending</sorting>
  1290. </field>
  1291. </index>
  1292. </declaration>
  1293. </table>
  1294. <table>
  1295. <!--
  1296. Table for storing transactional file locking
  1297. -->
  1298. <name>*dbprefix*file_locks</name>
  1299. <declaration>
  1300. <field>
  1301. <name>id</name>
  1302. <type>integer</type>
  1303. <default>0</default>
  1304. <notnull>true</notnull>
  1305. <unsigned>true</unsigned>
  1306. <length>4</length>
  1307. <autoincrement>1</autoincrement>
  1308. </field>
  1309. <field>
  1310. <name>lock</name>
  1311. <type>integer</type>
  1312. <default>0</default>
  1313. <notnull>true</notnull>
  1314. <length>4</length>
  1315. </field>
  1316. <field>
  1317. <name>key</name>
  1318. <type>text</type>
  1319. <notnull>true</notnull>
  1320. <length>64</length>
  1321. </field>
  1322. <field>
  1323. <name>ttl</name>
  1324. <type>integer</type>
  1325. <default>-1</default>
  1326. <notnull>true</notnull>
  1327. <length>4</length>
  1328. </field>
  1329. <index>
  1330. <primary>true</primary>
  1331. <unique>true</unique>
  1332. <name>lock_id_index</name>
  1333. <field>
  1334. <name>id</name>
  1335. <sorting>ascending</sorting>
  1336. </field>
  1337. </index>
  1338. <index>
  1339. <unique>true</unique>
  1340. <name>lock_key_index</name>
  1341. <field>
  1342. <name>key</name>
  1343. <sorting>ascending</sorting>
  1344. </field>
  1345. </index>
  1346. <index>
  1347. <name>lock_ttl_index</name>
  1348. <field>
  1349. <name>ttl</name>
  1350. <sorting>ascending</sorting>
  1351. </field>
  1352. </index>
  1353. </declaration>
  1354. </table>
  1355. <table>
  1356. <!--
  1357. default place to store comment data
  1358. -->
  1359. <name>*dbprefix*comments</name>
  1360. <declaration>
  1361. <field>
  1362. <name>id</name>
  1363. <type>integer</type>
  1364. <default>0</default>
  1365. <notnull>true</notnull>
  1366. <unsigned>true</unsigned>
  1367. <length>4</length>
  1368. <autoincrement>1</autoincrement>
  1369. </field>
  1370. <field>
  1371. <name>parent_id</name>
  1372. <type>integer</type>
  1373. <default>0</default>
  1374. <notnull>true</notnull>
  1375. <unsigned>true</unsigned>
  1376. <length>4</length>
  1377. </field>
  1378. <field>
  1379. <name>topmost_parent_id</name>
  1380. <type>integer</type>
  1381. <default>0</default>
  1382. <notnull>true</notnull>
  1383. <unsigned>true</unsigned>
  1384. <length>4</length>
  1385. </field>
  1386. <field>
  1387. <name>children_count</name>
  1388. <type>integer</type>
  1389. <default>0</default>
  1390. <notnull>true</notnull>
  1391. <unsigned>true</unsigned>
  1392. <length>4</length>
  1393. </field>
  1394. <field>
  1395. <name>actor_type</name>
  1396. <type>text</type>
  1397. <default></default>
  1398. <notnull>true</notnull>
  1399. <length>64</length>
  1400. </field>
  1401. <field>
  1402. <name>actor_id</name>
  1403. <type>text</type>
  1404. <default></default>
  1405. <notnull>true</notnull>
  1406. <length>64</length>
  1407. </field>
  1408. <field>
  1409. <name>message</name>
  1410. <type>clob</type>
  1411. <default></default>
  1412. <notnull>false</notnull>
  1413. </field>
  1414. <field>
  1415. <name>verb</name>
  1416. <type>text</type>
  1417. <default></default>
  1418. <notnull>false</notnull>
  1419. <length>64</length>
  1420. </field>
  1421. <field>
  1422. <name>creation_timestamp</name>
  1423. <type>timestamp</type>
  1424. <default></default>
  1425. <notnull>false</notnull>
  1426. </field>
  1427. <field>
  1428. <name>latest_child_timestamp</name>
  1429. <type>timestamp</type>
  1430. <default></default>
  1431. <notnull>false</notnull>
  1432. </field>
  1433. <field>
  1434. <name>object_type</name>
  1435. <type>text</type>
  1436. <default></default>
  1437. <notnull>true</notnull>
  1438. <length>64</length>
  1439. </field>
  1440. <field>
  1441. <name>object_id</name>
  1442. <type>text</type>
  1443. <default></default>
  1444. <notnull>true</notnull>
  1445. <length>64</length>
  1446. </field>
  1447. <index>
  1448. <name>comments_parent_id_index</name>
  1449. <unique>false</unique>
  1450. <field>
  1451. <name>parent_id</name>
  1452. <sorting>descending</sorting>
  1453. </field>
  1454. </index>
  1455. <index>
  1456. <name>comments_topmost_parent_id_idx</name>
  1457. <unique>false</unique>
  1458. <field>
  1459. <name>topmost_parent_id</name>
  1460. <sorting>descending</sorting>
  1461. </field>
  1462. </index>
  1463. <index>
  1464. <name>comments_object_index</name>
  1465. <unique>false</unique>
  1466. <field>
  1467. <name>object_type</name>
  1468. <sorting>ascending</sorting>
  1469. </field>
  1470. <field>
  1471. <name>object_id</name>
  1472. <sorting>ascending</sorting>
  1473. </field>
  1474. <field>
  1475. <name>creation_timestamp</name>
  1476. <sorting>descending</sorting>
  1477. </field>
  1478. </index>
  1479. <index>
  1480. <name>comments_actor_index</name>
  1481. <unique>false</unique>
  1482. <field>
  1483. <name>actor_type</name>
  1484. <sorting>ascending</sorting>
  1485. </field>
  1486. <field>
  1487. <name>actor_id</name>
  1488. <sorting>ascending</sorting>
  1489. </field>
  1490. </index>
  1491. </declaration>
  1492. </table>
  1493. <table>
  1494. <!--
  1495. default place to store per user and object read markers
  1496. -->
  1497. <name>*dbprefix*comments_read_markers</name>
  1498. <declaration>
  1499. <field>
  1500. <name>user_id</name>
  1501. <type>text</type>
  1502. <default></default>
  1503. <notnull>true</notnull>
  1504. <length>64</length>
  1505. </field>
  1506. <field>
  1507. <name>marker_datetime</name>
  1508. <type>timestamp</type>
  1509. <default></default>
  1510. <notnull>false</notnull>
  1511. </field>
  1512. <field>
  1513. <name>object_type</name>
  1514. <type>text</type>
  1515. <default></default>
  1516. <notnull>true</notnull>
  1517. <length>64</length>
  1518. </field>
  1519. <field>
  1520. <name>object_id</name>
  1521. <type>text</type>
  1522. <default></default>
  1523. <notnull>true</notnull>
  1524. <length>64</length>
  1525. </field>
  1526. <index>
  1527. <name>comments_marker_object_index</name>
  1528. <unique>false</unique>
  1529. <field>
  1530. <name>object_type</name>
  1531. <sorting>ascending</sorting>
  1532. </field>
  1533. <field>
  1534. <name>object_id</name>
  1535. <sorting>ascending</sorting>
  1536. </field>
  1537. </index>
  1538. <index>
  1539. <name>comments_marker_index</name>
  1540. <unique>true</unique>
  1541. <field>
  1542. <name>user_id</name>
  1543. <sorting>descending</sorting>
  1544. </field>
  1545. <field>
  1546. <name>object_type</name>
  1547. <sorting>ascending</sorting>
  1548. </field>
  1549. <field>
  1550. <name>object_id</name>
  1551. <sorting>ascending</sorting>
  1552. </field>
  1553. </index>
  1554. </declaration>
  1555. </table>
  1556. <table>
  1557. <!--
  1558. Encrypted credentials storage
  1559. -->
  1560. <name>*dbprefix*credentials</name>
  1561. <declaration>
  1562. <field>
  1563. <name>user</name>
  1564. <type>text</type>
  1565. <default></default>
  1566. <notnull>false</notnull>
  1567. <length>64</length>
  1568. </field>
  1569. <field>
  1570. <name>identifier</name>
  1571. <type>text</type>
  1572. <notnull>true</notnull>
  1573. <length>64</length>
  1574. </field>
  1575. <field>
  1576. <name>credentials</name>
  1577. <type>clob</type>
  1578. <notnull>false</notnull>
  1579. </field>
  1580. <index>
  1581. <name>credentials_user_id</name>
  1582. <primary>true</primary>
  1583. <unique>true</unique>
  1584. <field>
  1585. <name>user</name>
  1586. <sorting>ascending</sorting>
  1587. </field>
  1588. <field>
  1589. <name>identifier</name>
  1590. <sorting>ascending</sorting>
  1591. </field>
  1592. </index>
  1593. <index>
  1594. <name>credentials_user</name>
  1595. <unique>false</unique>
  1596. <field>
  1597. <name>user</name>
  1598. <sorting>ascending</sorting>
  1599. </field>
  1600. </index>
  1601. </declaration>
  1602. </table>
  1603. </database>