2017-10-03 22:05:35 -04:00
|
|
|
<?php
|
|
|
|
|
2017-10-18 13:02:48 -04:00
|
|
|
class UpdateMigration extends AbstractUpdatableMigration {
|
2017-10-03 22:05:35 -04:00
|
|
|
private $upVersion;
|
|
|
|
private $downVersion;
|
|
|
|
|
2017-10-18 13:02:48 -04:00
|
|
|
public function __construct($upVersion, $downVersion, $migrationNumber) {
|
|
|
|
parent::__construct($migrationNumber);
|
|
|
|
|
2017-10-03 22:05:35 -04:00
|
|
|
$this->upVersion = $upVersion;
|
|
|
|
$this->downVersion = $downVersion;
|
|
|
|
}
|
|
|
|
|
2017-10-18 13:02:48 -04:00
|
|
|
function innerUp($hesk_settings) {
|
2017-10-03 22:05:35 -04:00
|
|
|
$this->updateVersion($this->upVersion, $hesk_settings);
|
|
|
|
}
|
|
|
|
|
2017-10-18 13:02:48 -04:00
|
|
|
function innerDown($hesk_settings) {
|
2017-10-03 22:05:35 -04:00
|
|
|
$this->updateVersion($this->downVersion, $hesk_settings);
|
|
|
|
}
|
|
|
|
}
|