feat(notice): 通知三表与 SystemAdmin email 字段 Scheme 及迁移

This commit is contained in:
augushong
2026-10-12 10:37:23 +00:00
parent 19c61ebad5
commit f03e06276c
6 changed files with 223 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
/**
* system_admin 追加电子邮箱字段(幂等,已存在则跳过).
*/
class SystemAdminEmail extends Migrator
{
public function change()
{
$table = $this->table('system_admin');
if(!$table->hasColumn('email')){
$table->addColumn(Column::char('email', 100)->setDefault('')->setComment('电子邮箱'));
$table->update();
}
}
}