modmediasourcecontext.map.inc.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage sources.sqlsrv
  5. */
  6. $xpdo_meta_map['modMediaSourceContext']= array (
  7. 'package' => 'modx.sources',
  8. 'version' => '1.1',
  9. 'table' => 'media_sources_contexts',
  10. 'extends' => 'xPDOObject',
  11. 'fields' =>
  12. array (
  13. 'source' => 0,
  14. 'context_key' => 'web',
  15. ),
  16. 'fieldMeta' =>
  17. array (
  18. 'source' =>
  19. array (
  20. 'dbtype' => 'int',
  21. 'phptype' => 'integer',
  22. 'null' => false,
  23. 'default' => 0,
  24. 'index' => 'pk',
  25. ),
  26. 'context_key' =>
  27. array (
  28. 'dbtype' => 'nvarchar',
  29. 'precision' => '100',
  30. 'phptype' => 'string',
  31. 'null' => false,
  32. 'default' => 'web',
  33. 'index' => 'pk',
  34. ),
  35. ),
  36. 'indexes' =>
  37. array (
  38. 'PRIMARY' =>
  39. array (
  40. 'alias' => 'PRIMARY',
  41. 'primary' => true,
  42. 'unique' => true,
  43. 'type' => 'BTREE',
  44. 'columns' =>
  45. array (
  46. 'source' =>
  47. array (
  48. 'length' => '',
  49. 'collation' => 'A',
  50. 'null' => false,
  51. ),
  52. 'context_key' =>
  53. array (
  54. 'length' => '',
  55. 'collation' => 'A',
  56. 'null' => false,
  57. ),
  58. ),
  59. ),
  60. ),
  61. 'aggregates' =>
  62. array (
  63. 'Source' =>
  64. array (
  65. 'class' => 'sources.modMediaSource',
  66. 'local' => 'source',
  67. 'foreign' => 'id',
  68. 'cardinality' => 'one',
  69. 'owner' => 'foreign',
  70. ),
  71. 'Context' =>
  72. array (
  73. 'class' => 'modContext',
  74. 'local' => 'context_key',
  75. 'foreign' => 'key',
  76. 'cardinality' => 'one',
  77. 'owner' => 'foreign',
  78. ),
  79. ),
  80. );