fixes
This commit is contained in:
@@ -18,13 +18,13 @@ return new class extends Migration
|
||||
['team_id' => $team->id],
|
||||
[
|
||||
'smtp_enabled' => $team->smtp_enabled ?? false,
|
||||
'smtp_from_address' => Crypt::encryptString($team->smtp_from_address),
|
||||
'smtp_from_name' => Crypt::encryptString($team->smtp_from_name),
|
||||
'smtp_recipients' => Crypt::encryptString($team->smtp_recipients),
|
||||
'smtp_host' => Crypt::encryptString($team->smtp_host),
|
||||
'smtp_from_address' => $team->smtp_from_address ? Crypt::encryptString($team->smtp_from_address) : null,
|
||||
'smtp_from_name' => $team->smtp_from_name ? Crypt::encryptString($team->smtp_from_name) : null,
|
||||
'smtp_recipients' => $team->smtp_recipients ? Crypt::encryptString($team->smtp_recipients) : null,
|
||||
'smtp_host' => $team->smtp_host ? Crypt::encryptString($team->smtp_host) : null,
|
||||
'smtp_port' => $team->smtp_port,
|
||||
'smtp_encryption' => $team->smtp_encryption,
|
||||
'smtp_username' => Crypt::encryptString($team->smtp_username),
|
||||
'smtp_username' => $team->smtp_username ? Crypt::encryptString($team->smtp_username) : null,
|
||||
'smtp_password' => $team->smtp_password,
|
||||
'smtp_timeout' => $team->smtp_timeout,
|
||||
|
||||
|
@@ -92,8 +92,8 @@ return new class extends Migration
|
||||
->where('id', $setting->team_id)
|
||||
->update([
|
||||
'telegram_enabled' => $setting->telegram_enabled,
|
||||
'telegram_token' => Crypt::decryptString($setting->telegram_token),
|
||||
'telegram_chat_id' => Crypt::decryptString($setting->telegram_chat_id),
|
||||
'telegram_token' => $setting->telegram_token ? Crypt::decryptString($setting->telegram_token) : null,
|
||||
'telegram_chat_id' => $setting->telegram_chat_id ? Crypt::decryptString($setting->telegram_chat_id) : null,
|
||||
|
||||
'telegram_notifications_deployments' => $setting->deployment_success_telegram_notifications || $setting->deployment_failure_telegram_notifications,
|
||||
'telegram_notifications_status_changes' => $setting->status_change_telegram_notifications,
|
||||
@@ -101,10 +101,10 @@ return new class extends Migration
|
||||
'telegram_notifications_scheduled_tasks' => $setting->scheduled_task_success_telegram_notifications || $setting->scheduled_task_failure_telegram_notifications,
|
||||
'telegram_notifications_server_disk_usage' => $setting->server_disk_usage_telegram_notifications,
|
||||
|
||||
'telegram_notifications_deployments_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_deployment_success_topic_id),
|
||||
'telegram_notifications_status_changes_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_status_change_topic_id),
|
||||
'telegram_notifications_database_backups_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_backup_success_topic_id),
|
||||
'telegram_notifications_scheduled_tasks_thread_id' => Crypt::decryptString($setting->telegram_notifications_scheduled_task_success_topic_id),
|
||||
'telegram_notifications_deployments_message_thread_id' => $setting->telegram_notifications_deployment_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_deployment_success_topic_id) : null,
|
||||
'telegram_notifications_status_changes_message_thread_id' => $setting->telegram_notifications_status_change_topic_id ? Crypt::decryptString($setting->telegram_notifications_status_change_topic_id) : null,
|
||||
'telegram_notifications_database_backups_message_thread_id' => $setting->telegram_notifications_backup_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_backup_success_topic_id) : null,
|
||||
'telegram_notifications_scheduled_tasks_thread_id' => $setting->telegram_notifications_scheduled_task_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_scheduled_task_success_topic_id) : null,
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
\Log::error('Error migrating telegram notification settings from teams table: '.$e->getMessage());
|
||||
|
Reference in New Issue
Block a user