feat: allow selecting tls or ssl for email notifications (#237)

This commit is contained in:
Miguel Ribeiro
2024-03-17 22:56:30 +01:00
committed by GitHub
parent e1cc9254ac
commit 2462435743
19 changed files with 63 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
<?php
// This migration adds a "encryption" column to the notifications table so that the encryption type can be stored.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('notifications') WHERE name='encryption'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE notifications ADD COLUMN `encryption` TEXT DEFAULT "tls"');
$db->exec('UPDATE notifications SET `encryption` = "tls"');
}
?>