-
-
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.
Add default value to activity.parent_changed column. Fixes #1283
- Loading branch information
1 parent
c87ad22
commit 9a2ac70
Showing
4 changed files
with
31 additions
and
3 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
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
28 changes: 28 additions & 0 deletions
28
api/migrations/upgrades/20161019115703_AddDirectusActivityParentChangedDefault.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,28 @@ | ||
<?php | ||
use Ruckusing\Migration\Base as Ruckusing_Migration_Base; | ||
|
||
class ChangeDirectusPrivilegesNavListedDefaultValue extends Ruckusing_Migration_Base | ||
{ | ||
public function up() | ||
{ | ||
if ($this->has_column('directus_activity', 'parent_changed')) { | ||
$this->change_column('directus_activity', 'parent_changed', 'tinyinteger', [ | ||
'limit' => 1, | ||
'null' => false, | ||
'default' => 0, | ||
'comment' => 'Did the top-level record in the change set alter (scalar values/many-to-one relationships)? Or only the data within its related foreign collection records? (*toMany)' | ||
]); | ||
} | ||
}//up() | ||
|
||
public function down() | ||
{ | ||
if ($this->has_column('directus_activity', 'parent_changed')) { | ||
$this->change_column('directus_activity', 'parent_changed', 'tinyinteger', [ | ||
'limit' => 1, | ||
'null' => false, | ||
'comment' => 'Did the top-level record in the change set alter (scalar values/many-to-one relationships)? Or only the data within its related foreign collection records? (*toMany)' | ||
]); | ||
} | ||
}//down() | ||
} |
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