Files
CRM/database/migrations/2018_05_24_160546_fix-inconsistant-reminder-time.php
Kroonk a213a1dba0
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
refactor: replace custom CRM with Monica fork
2026-05-22 16:19:55 +02:00

25 lines
631 B
PHP

<?php
use App\Models\Account\Account;
use Illuminate\Database\Migrations\Migration;
class FixInconsistantReminderTime extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Account::chunk(200, function ($accounts) {
foreach ($accounts as $account) {
if (strlen($account->default_time_reminder_is_sent) == 4) {
$account->default_time_reminder_is_sent = date('H:i', strtotime($account->default_time_reminder_is_sent));
$account->save();
}
}
});
}
}