Skip to content

Commit 2cf9c3e

Browse files
committed
Fix id_coach in session table - refs #8200
1 parent 22bf412 commit 2cf9c3e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/Migrations/Schema/V110/Version110.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function preUp(Schema $schema)
2424
$this->addSql("ALTER TABLE session_rel_course ENGINE=InnoDB");
2525
$this->addSql("ALTER TABLE session_rel_course_rel_user ENGINE=InnoDB");
2626
$this->addSql("ALTER TABLE session_rel_user ENGINE=InnoDB");
27+
$this->addSql("UPDATE session SET session.id_coach = 1 WHERE id_coach NOT IN ( SELECT user_id FROM user)");
2728
}
2829

2930
/**

0 commit comments

Comments
 (0)