key_value.php 1.3 KB

12345678910111213141516171819202122232425
  1. <?php
  2. class KeyValueSchema extends CakeSchema {
  3. public function before($event = array()) {
  4. return true;
  5. }
  6. public function after($event = array()) {
  7. }
  8. public $keyValues = array(
  9. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  10. 'foreign_id' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 36, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
  11. 'model' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
  12. 'key' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
  13. 'value' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'comment' => 'option setting', 'charset' => 'utf8'),
  14. 'created' => array('type' => 'datetime', 'null' => false, 'default' => null),
  15. 'modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
  16. 'indexes' => array(
  17. 'PRIMARY' => array('column' => 'id', 'unique' => 1),
  18. 'foreign_id' => array('column' => 'foreign_id', 'unique' => 0)
  19. ),
  20. 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM')
  21. );
  22. }