Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 23, 2013
@sourcejedi sourcejedi Fix install failure in 003_Permission_system_upgrade.php (issue #760)
My version of MySQL "forgave" inserting NULL in what turned out to be a
NOT NULL varchar, converting it to the empty string.  But I didn't mean
to do that, and it breaks elsewhere with the error

"Field 'description' doesn't have a default value".
d77585a
@sourcejedi sourcejedi 003_Permission_system_upgrade.php: status field shouldn't permit NULLs
It has a sensible default value anyway, so this shouldn't cause any
difficulty.
707e2ea
Showing with 4 additions and 2 deletions.
  1. +4 −2 bonfire/migrations/003_Permission_system_upgrade.php
View
6 bonfire/migrations/003_Permission_system_upgrade.php
@@ -64,7 +64,6 @@ public function up()
'status' => array(
'type' => 'ENUM',
'constraint' => "'active','inactive','deleted'",
- 'null' => TRUE,
'default' => 'active'
),
);
@@ -76,7 +75,10 @@ public function up()
{
if($field != 'role_id' && $field != 'permission_id')
{
- $this->db->insert('permissions', array('name' => $field));
+ $this->db->insert('permissions', array(
+ 'name' => $field,
+ 'description' => ''
+ ));
}
}
$this->db->insert('permissions', array(

No commit comments for this range

Something went wrong with that request. Please try again.