Skip to content

Commit

Permalink
Fix potential migration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Nov 11, 2018
1 parent ff14a75 commit d8afef6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/migrations/m180826_000000_propagate_nav_setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class m180826_000000_propagate_nav_setting extends Migration
{
public function safeUp()
{
$this->addColumn('{{%navigation_navs}}', 'propagateNodes', $this->boolean()->after('sortOrder')->notNull()->defaultValue(false));
if (!$this->db->columnExists('{{%navigation_navs}}', 'propagateNodes')) {
$this->addColumn('{{%navigation_navs}}', 'propagateNodes', $this->boolean()->after('sortOrder')->notNull()->defaultValue(false));
}

return true;
}
Expand Down

0 comments on commit d8afef6

Please sign in to comment.