Skip to content

Commit

Permalink
Fixed issue #18384: Update fails on Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 29, 2022
1 parent 5e5de4f commit 32aa344
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/helpers/update/updates/Update_491.php
Expand Up @@ -8,14 +8,18 @@ public function up()
{
// Upate 489 belongs with this update. Due to a faulty deployment, we start from scratch here with failed_emails table.
try {
setTransactionBookmark();
$this->db->createCommand()->dropTable('{{failed_emails}}');
} catch (\Exception $e) {
// Ignore
rollBackToTransactionBookmark();
}
try {
setTransactionBookmark();
$this->db->createCommand()->dropTable('{{failed_email}}');
} catch (\Exception $e) {
// Ignore
rollBackToTransactionBookmark();
}
$update = new Update_489($this->db, $this->options);
$update->up(); // up() instead of safeUp() to not nest database transactions
Expand Down

0 comments on commit 32aa344

Please sign in to comment.