Files
CRM/database/migrations/2018_06_10_221746_migrate_entries_objects.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

28 lines
742 B
PHP

<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Migrations\Migration;
class MigrateEntriesObjects extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('journal_entries')
->where('journalable_type', 'App\Activity')
->update(['journalable_type' => 'App\Models\Contact\Activity']);
DB::table('journal_entries')
->where('journalable_type', 'App\Day')
->update(['journalable_type' => 'App\Models\Journal\Day']);
DB::table('journal_entries')
->where('journalable_type', 'App\Entry')
->update(['journalable_type' => 'App\Models\Journal\Entry']);
}
}