29 lines
794 B
PHP
29 lines
794 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AddNotificationPreferencesToAuthUsers extends AbstractMigration
|
|
{
|
|
public function change(): void
|
|
{
|
|
$table = $this->table('auth_users');
|
|
|
|
$table
|
|
->addColumn('notify_email', 'boolean', [
|
|
'default' => true,
|
|
'null' => false,
|
|
'after' => 'announcements_last_read_at',
|
|
'comment' => 'Preferenza notifiche via email',
|
|
])
|
|
->addColumn('notify_webapp', 'boolean', [
|
|
'default' => true,
|
|
'null' => false,
|
|
'after' => 'notify_email',
|
|
'comment' => 'Preferenza notifiche in webapp',
|
|
])
|
|
->update();
|
|
}
|
|
}
|