1: <?php
2:
3: class StuffreposPluginsRename 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: ),
22: 'down' => array(
23: ),
24: );
25:
26: /**
27: * Before migration callback
28: *
29: * @param string $direction, up or down direction of migration process
30: * @return boolean Should process continue
31: * @access public
32: */
33: public function before($direction) {
34: if ($direction == 'up') {
35: $SchemaMigration = $this->generateModel('SchemaMigration');
36: $SchemaMigration->updateAll(array(
37: 'type' => "'ConfigurationKeys'"
38: ), array(
39: 'type' => 'StuffreposConfigurationKeys'
40: )
41: );
42: $SchemaMigration->updateAll(array(
43: 'type' => "'UserAccounts'"
44: ), array(
45: 'type' => 'StuffreposUserAccounts'
46: )
47: );
48: }
49: return true;
50: }
51:
52: /**
53: * After migration callback
54: *
55: * @param string $direction, up or down direction of migration process
56: * @return boolean Should process continue
57: * @access public
58: */
59: public function after($direction) {
60: return true;
61: }
62:
63: }
64: