show the chat again
Some checks failed
linter / quality (push) Failing after 1m6s
tests / ci (8.3) (push) Failing after 49s
tests / ci (8.4) (push) Failing after 1m6s
tests / ci (8.5) (push) Failing after 1m4s

This commit is contained in:
Daan Meijer 2026-06-24 09:59:39 +02:00
parent d0b173fe76
commit 806d17842f
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,34 @@
<?php
use App\Models\Chat;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Chat::unguard();
\App\Models\Chat::all()->each(function (Chat $chat) {
$newType = match($chat->chatable_type) {
\App\Models\Mutation::class => 'mutation',
\App\Models\Ledger::class => 'ledger',
\App\Models\Dynamic::class => 'dynamic',
default => $chat->chatable_type,
};
$chat->update(['chatable_type' => $newType]);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

View File

@ -24,7 +24,7 @@
} }
.c-chat__message { .c-chat__message {
@apply overflow-hidden p-4 shadow-sm sm:rounded-lg; @apply p-4 shadow-sm sm:rounded-lg;
border: 1px solid var(--border); border: 1px solid var(--border);
&.c-chat__message--system { &.c-chat__message--system {