Skip to content

Commit fc3fa75

Browse files
committed
Fix feedback
1 parent 0ddd1ad commit fc3fa75

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

webapp/migrations/Version20240629154640.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ public function getDescription(): string
2020
public function up(Schema $schema): void
2121
{
2222
foreach(self::NEW_ROLES as $role => $description) {
23-
$existingRole = $this->connection->fetchAssociative('SELECT * FROM role WHERE role = :role', ['role' => $role]);
24-
if (!$existingRole) {
25-
$this->addSql(
26-
'INSERT INTO role (`role`, `description`) VALUES (:role, :desc)',
27-
['role' => $role, 'desc' => $description]
28-
);
29-
}
23+
$this->addSql(
24+
'INSERT INTO role (`role`, `description`) VALUES (:role, :desc)',
25+
['role' => $role, 'desc' => $description]*
26+
);
3027
}
3128
}
3229

0 commit comments

Comments
 (0)