Version: current

     1 <?php
     2 /**
     3  * A migration task is a build task that is reversible.
     4  *
     5  * Up and Down methods must be implemented.
     6  *
     7  * @package sapphire
     8  * @subpackage dev
     9  */
    10 class MigrationTask extends BuildTask {
    11
    12     protected $title = "Database Migrations";
    13
    14     protected $description = "Provide atomic database changes (not implemented yet)";
    15
    16     function run($request) {
    17         if ($request->param('Direction') == 'down') {
    18             $this->down();
    19         } else {
    20             $this->up();
    21         }
    22     }
    23
    24     function up() {}
    25
    26     function down() {}
    27
    28 }
    29
    30 ?>

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -