Skip to content

Commit

Permalink
Added migration for feature #8
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamminf committed Apr 28, 2016
1 parent 4d1c977 commit 9e1e31c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions neo/migrations/m160428_202308_Neo_UpdateBlockLevels.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
namespace Craft;

class m160428_202308_Neo_UpdateBlockLevels extends BaseMigration
{
public function safeUp()
{
$tableName = (new Neo_BlockRecord())->getTableName();
craft()->db->createCommand()->update($tableName, ['level' => new \CDbExpression('level + 1')]);

return true;
}
}

0 comments on commit 9e1e31c

Please sign in to comment.