1: <?php
2:
3: class FixConfigurationKeysPrimaryKey extends CakeMigration {
4:
5: /**
6: * Migration description
7: *
8: * @var string
9: * @access public
10: */
11: public $description = '';
12:
13: /**
14: * Actions to be performed
15: *
16: * @var array $migration
17: * @access public
18: */
19: public $migration = array(
20: 'up' => array(
21: 'alter_field' => array(
22: 'configuration_keys' => array(
23: 'id' => array('key' => 'primary'),
24: 'name' => array('key' => ''),
25: )
26: ),
27: ),
28: 'down' => array(
29: 'alter_field' => array(
30: 'configuration_keys' => array(
31: 'id' => array('key' => 'primary'),
32: 'name' => array('key' => 'primary'),
33: )
34: ),
35: ),
36: );
37:
38: /**
39: * Before migration callback
40: *
41: * @param string $direction, up or down direction of migration process
42: * @return boolean Should process continue
43: * @access public
44: */
45: public function before($direction) {
46: return true;
47: }
48:
49: /**
50: * After migration callback
51: *
52: * @param string $direction, up or down direction of migration process
53: * @return boolean Should process continue
54: * @access public
55: */
56: public function after($direction) {
57: return true;
58: }
59:
60: }
61: