mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
24 lines
361 B
PHP
24 lines
361 B
PHP
|
<?php
|
||
|
/**
|
||
|
* A migration task is a build task that is reversible.
|
||
|
*
|
||
|
* Up and Down methods must be implemented.
|
||
|
*
|
||
|
*/
|
||
|
abstract class MigrationTask extends BuildTask {
|
||
|
|
||
|
function run($request) {
|
||
|
if ($request->param('Direction') == 'down') {
|
||
|
$this->down();
|
||
|
} else {
|
||
|
$this->up();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
abstract function up();
|
||
|
|
||
|
abstract function down();
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|