Skip to content

Commit

Permalink
privileges nav_listed column must be true by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Aug 26, 2016
1 parent 74c4ae6 commit b4cb8b1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function up()
$t->column('nav_listed', 'tinyinteger', array(
'null' => false,
'limit' => 1,
'default' => 0
'default' => 1
)
);
$t->column('status_id', 'tinyinteger', array(
Expand Down
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()
}

0 comments on commit b4cb8b1

Please sign in to comment.