Skip to content

Commit

Permalink
Fix usergroup_rel_user during migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 24, 2016
1 parent 95af515 commit a377c0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Migrations/Schema/V110/Version110.php
Expand Up @@ -56,6 +56,9 @@ public function up(Schema $schema)
// Delete info of session_rel_user if session does not exists;
$this->addSql("DELETE FROM session_rel_user WHERE id_session NOT IN (SELECT id FROM session)");

// Delete info of usergroup_rel_user if usergroup does not exists;
$this->addSql("DELETE FROM usergroup_rel_user WHERE usergroup_id NOT IN (SELECT id FROM usergroup)");

$session = $schema->getTable('session');
$session->getColumn('id')->setType(Type::getType(Type::INTEGER))->setUnsigned(false);
if (!$session->hasColumn('description')) {
Expand Down

0 comments on commit a377c0f

Please sign in to comment.