Admin can now open a message via a per-row "View" page (which stamps read_at the first time it's opened), see a sortable Read column on the list instead of the raw message text, and soft-delete messages via a Delete button on both the list and detail view. Deleted messages are excluded from the default list so it doesn't pile up over time.
27 lines
640 B
PHP
27 lines
640 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260829140000 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Add deleted_at to contact_message for soft-deleting messages from the admin list';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE contact_message ADD deleted_at DATETIME DEFAULT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE contact_message DROP deleted_at');
|
|
}
|
|
}
|