-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
privileges nav_listed column must be true by default.
- Loading branch information
1 parent
74c4ae6
commit b4cb8b1
Showing
2 changed files
with
28 additions
and
1 deletion.
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
27 changes: 27 additions & 0 deletions
27
api/migrations/upgrades/20160826132455_ChangeDirectusPrivilegesNavListedDefaultValue.php
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,27 @@ | ||
<?php | ||
use Ruckusing\Migration\Base as Ruckusing_Migration_Base; | ||
|
||
class ChangeDirectusPrivilegesNavListedDefaultValue extends Ruckusing_Migration_Base | ||
{ | ||
public function up() | ||
{ | ||
if ($this->has_column('directus_privileges', 'nav_listed')) { | ||
$this->change_column('directus_privileges', 'nav_listed', 'tinyinteger', array( | ||
'null' => false, | ||
'limit' => 1, | ||
'default' => 1 | ||
)); | ||
} | ||
}//up() | ||
|
||
public function down() | ||
{ | ||
if ($this->has_column('directus_privileges', 'nav_listed')) { | ||
$this->change_column('directus_privileges', 'nav_listed', 'tinyinteger', array( | ||
'null' => false, | ||
'limit' => 1, | ||
'default' => 0 | ||
)); | ||
} | ||
}//down() | ||
} |