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