modcontext.map.inc.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage mysql
  5. */
  6. $xpdo_meta_map['modContext']= array (
  7. 'package' => 'modx',
  8. 'version' => '1.1',
  9. 'table' => 'context',
  10. 'extends' => 'modAccessibleObject',
  11. 'tableMeta' =>
  12. array (
  13. 'engine' => 'InnoDB',
  14. ),
  15. 'fields' =>
  16. array (
  17. 'key' => NULL,
  18. 'name' => NULL,
  19. 'description' => NULL,
  20. 'rank' => 0,
  21. ),
  22. 'fieldMeta' =>
  23. array (
  24. 'key' =>
  25. array (
  26. 'dbtype' => 'varchar',
  27. 'precision' => '100',
  28. 'phptype' => 'string',
  29. 'null' => false,
  30. 'index' => 'pk',
  31. ),
  32. 'name' =>
  33. array (
  34. 'dbtype' => 'varchar',
  35. 'precision' => '191',
  36. 'phptype' => 'string',
  37. 'index' => 'index',
  38. ),
  39. 'description' =>
  40. array (
  41. 'dbtype' => 'tinytext',
  42. 'phptype' => 'string',
  43. ),
  44. 'rank' =>
  45. array (
  46. 'dbtype' => 'int',
  47. 'precision' => '11',
  48. 'phptype' => 'integer',
  49. 'null' => false,
  50. 'default' => 0,
  51. 'index' => 'index',
  52. ),
  53. ),
  54. 'indexes' =>
  55. array (
  56. 'PRIMARY' =>
  57. array (
  58. 'alias' => 'PRIMARY',
  59. 'primary' => true,
  60. 'unique' => true,
  61. 'type' => 'BTREE',
  62. 'columns' =>
  63. array (
  64. 'key' =>
  65. array (
  66. 'length' => '',
  67. 'collation' => 'A',
  68. 'null' => false,
  69. ),
  70. ),
  71. ),
  72. 'name' =>
  73. array (
  74. 'alias' => 'name',
  75. 'primary' => false,
  76. 'unique' => false,
  77. 'type' => 'BTREE',
  78. 'columns' =>
  79. array (
  80. 'name' =>
  81. array (
  82. 'length' => '',
  83. 'collation' => 'A',
  84. 'null' => false,
  85. ),
  86. ),
  87. ),
  88. 'rank' =>
  89. array (
  90. 'alias' => 'rank',
  91. 'primary' => false,
  92. 'unique' => false,
  93. 'type' => 'BTREE',
  94. 'columns' =>
  95. array (
  96. 'rank' =>
  97. array (
  98. 'length' => '',
  99. 'collation' => 'A',
  100. 'null' => false,
  101. ),
  102. ),
  103. ),
  104. ),
  105. 'composites' =>
  106. array (
  107. 'ContextResources' =>
  108. array (
  109. 'class' => 'modContextResource',
  110. 'local' => 'key',
  111. 'foreign' => 'context_key',
  112. 'cardinality' => 'many',
  113. 'owner' => 'local',
  114. ),
  115. 'ContextSettings' =>
  116. array (
  117. 'class' => 'modContextSetting',
  118. 'local' => 'key',
  119. 'foreign' => 'context_key',
  120. 'cardinality' => 'many',
  121. 'owner' => 'local',
  122. ),
  123. 'SourceElements' =>
  124. array (
  125. 'class' => 'sources.modMediaSourceElement',
  126. 'local' => 'key',
  127. 'foreign' => 'context_key',
  128. 'cardinality' => 'many',
  129. 'owner' => 'local',
  130. ),
  131. 'Acls' =>
  132. array (
  133. 'class' => 'modAccessContext',
  134. 'local' => 'key',
  135. 'foreign' => 'target',
  136. 'owner' => 'local',
  137. 'cardinality' => 'many',
  138. ),
  139. ),
  140. 'validation' =>
  141. array (
  142. 'rules' =>
  143. array (
  144. 'key' =>
  145. array (
  146. 'key' =>
  147. array (
  148. 'type' => 'preg_match',
  149. 'rule' => '/^[a-zA-Z\\x7f-\\xff][a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff]*$/',
  150. 'message' => 'context_err_ns_key',
  151. ),
  152. ),
  153. ),
  154. ),
  155. );