From fc3fa75ac164020bc458e276e9beaae60b318029 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:26:05 +0200 Subject: [PATCH] Fix feedback --- webapp/migrations/Version20240629154640.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/webapp/migrations/Version20240629154640.php b/webapp/migrations/Version20240629154640.php index ebd80b86b8..57cce3ead4 100644 --- a/webapp/migrations/Version20240629154640.php +++ b/webapp/migrations/Version20240629154640.php @@ -20,13 +20,10 @@ public function getDescription(): string public function up(Schema $schema): void { foreach(self::NEW_ROLES as $role => $description) { - $existingRole = $this->connection->fetchAssociative('SELECT * FROM role WHERE role = :role', ['role' => $role]); - if (!$existingRole) { - $this->addSql( - 'INSERT INTO role (`role`, `description`) VALUES (:role, :desc)', - ['role' => $role, 'desc' => $description] - ); - } + $this->addSql( + 'INSERT INTO role (`role`, `description`) VALUES (:role, :desc)', + ['role' => $role, 'desc' => $description]* + ); } }