database.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <database>
  2. <name>*dbname*</name>
  3. <create>true</create>
  4. <overwrite>false</overwrite>
  5. <charset>utf8</charset>
  6. <table>
  7. <name>*dbprefix*external_mounts</name>
  8. <declaration>
  9. <field>
  10. <name>mount_id</name>
  11. <type>integer</type>
  12. <default>0</default>
  13. <notnull>true</notnull>
  14. <autoincrement>1</autoincrement>
  15. <length>6</length>
  16. </field>
  17. <field>
  18. <name>mount_point</name>
  19. <type>text</type>
  20. <length>128</length>
  21. <notnull>true</notnull>
  22. </field>
  23. <field>
  24. <name>storage_backend</name>
  25. <type>text</type>
  26. <length>64</length>
  27. <notnull>true</notnull>
  28. </field>
  29. <field>
  30. <name>auth_backend</name>
  31. <type>text</type>
  32. <length>64</length>
  33. <notnull>true</notnull>
  34. </field>
  35. <field>
  36. <name>priority</name>
  37. <type>integer</type>
  38. <default>100</default>
  39. <length>4</length>
  40. <notnull>true</notnull>
  41. </field>
  42. <!-- admin = 1, personal = 2-->
  43. <field>
  44. <name>type</name>
  45. <type>integer</type>
  46. <length>4</length>
  47. <notnull>true</notnull>
  48. </field>
  49. </declaration>
  50. </table>
  51. <table>
  52. <name>*dbprefix*external_applicable</name>
  53. <declaration>
  54. <field>
  55. <name>applicable_id</name>
  56. <type>integer</type>
  57. <default>0</default>
  58. <notnull>true</notnull>
  59. <autoincrement>1</autoincrement>
  60. <length>6</length>
  61. </field>
  62. <field>
  63. <!--foreign key: external_mounts.mount_id-->
  64. <name>mount_id</name>
  65. <type>integer</type>
  66. <notnull>true</notnull>
  67. <length>6</length>
  68. </field>
  69. <field>
  70. <!-- possible mount types: global = 1, group = 2, user = 3 -->
  71. <name>type</name>
  72. <type>integer</type>
  73. <length>4</length>
  74. <notnull>true</notnull>
  75. </field>
  76. <field>
  77. <!-- user_id, group_id or null for global mounts -->
  78. <name>value</name>
  79. <type>text</type>
  80. <length>64</length>
  81. </field>
  82. <index>
  83. <name>applicable_mount</name>
  84. <field>
  85. <name>mount_id</name>
  86. <sorting>ascending</sorting>
  87. </field>
  88. </index>
  89. <index>
  90. <name>applicable_type_value</name>
  91. <field>
  92. <name>type</name>
  93. <sorting>ascending</sorting>
  94. </field>
  95. <field>
  96. <name>value</name>
  97. <sorting>ascending</sorting>
  98. </field>
  99. </index>
  100. <index>
  101. <name>applicable_type_value_mount</name>
  102. <unique>true</unique>
  103. <field>
  104. <name>type</name>
  105. <sorting>ascending</sorting>
  106. </field>
  107. <field>
  108. <name>value</name>
  109. <sorting>ascending</sorting>
  110. </field>
  111. <field>
  112. <name>mount_id</name>
  113. <sorting>ascending</sorting>
  114. </field>
  115. </index>
  116. </declaration>
  117. </table>
  118. <table>
  119. <name>*dbprefix*external_config</name>
  120. <declaration>
  121. <field>
  122. <name>config_id</name>
  123. <type>integer</type>
  124. <default>0</default>
  125. <notnull>true</notnull>
  126. <autoincrement>1</autoincrement>
  127. <length>6</length>
  128. </field>
  129. <field>
  130. <!--foreign key: external_mounts.mount_id-->
  131. <name>mount_id</name>
  132. <type>integer</type>
  133. <notnull>true</notnull>
  134. <length>6</length>
  135. </field>
  136. <field>
  137. <name>key</name>
  138. <type>text</type>
  139. <notnull>true</notnull>
  140. <length>64</length>
  141. </field>
  142. <field>
  143. <name>value</name>
  144. <type>text</type>
  145. <notnull>false</notnull>
  146. <length>4096</length>
  147. </field>
  148. <index>
  149. <name>config_mount</name>
  150. <field>
  151. <name>mount_id</name>
  152. <sorting>ascending</sorting>
  153. </field>
  154. </index>
  155. <index>
  156. <name>config_mount_key</name>
  157. <unique>true</unique>
  158. <field>
  159. <name>mount_id</name>
  160. <sorting>ascending</sorting>
  161. </field>
  162. <field>
  163. <name>key</name>
  164. <sorting>ascending</sorting>
  165. </field>
  166. </index>
  167. </declaration>
  168. </table>
  169. <table>
  170. <name>*dbprefix*external_options</name>
  171. <declaration>
  172. <field>
  173. <name>option_id</name>
  174. <type>integer</type>
  175. <default>0</default>
  176. <notnull>true</notnull>
  177. <autoincrement>1</autoincrement>
  178. <length>6</length>
  179. </field>
  180. <field>
  181. <!--foreign key: external_mounts.mount_id-->
  182. <name>mount_id</name>
  183. <type>integer</type>
  184. <notnull>true</notnull>
  185. <length>6</length>
  186. </field>
  187. <field>
  188. <name>key</name>
  189. <type>text</type>
  190. <notnull>true</notnull>
  191. <length>64</length>
  192. </field>
  193. <field>
  194. <name>value</name>
  195. <type>text</type>
  196. <notnull>true</notnull>
  197. <length>256</length>
  198. </field>
  199. <index>
  200. <name>option_mount</name>
  201. <field>
  202. <name>mount_id</name>
  203. <sorting>ascending</sorting>
  204. </field>
  205. </index>
  206. <index>
  207. <name>option_mount_key</name>
  208. <unique>true</unique>
  209. <field>
  210. <name>mount_id</name>
  211. <sorting>ascending</sorting>
  212. </field>
  213. <field>
  214. <name>key</name>
  215. <sorting>ascending</sorting>
  216. </field>
  217. </index>
  218. </declaration>
  219. </table>
  220. </database>