-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
use yii\db\Expression; | ||
|
||
/** | ||
* Class m210320_190011_version_bump_v0_16 | ||
*/ | ||
class m210320_190011_version_bump_v0_16 extends Migration | ||
{ | ||
public function safeUp() | ||
{ | ||
$this->db->createCommand("INSERT INTO sysconfig (id,val) values ('platform_version','v0.16') ON DUPLICATE KEY UPDATE val=values(val)")->execute(); | ||
$this->update('sysconfig', ['val'=>new Expression('REPLACE(val,"v0.15","v0.16")')], ['id' => 'frontpage_scenario']); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
$this->db->createCommand("INSERT INTO sysconfig (id,val) values ('platform_version','v0.15') ON DUPLICATE KEY UPDATE val=values(val)")->execute(); | ||
$this->update('sysconfig', ['val'=>new Expression('REPLACE(val,"v0.16","v0.15")')], ['id' => 'frontpage_scenario']); | ||
} | ||
} |