mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-08 12:00:49 +08:00
feat(notice): 通知三表与 SystemAdmin email 字段 Scheme 及迁移
This commit is contained in:
20
database/migrations/20261012000002_system_admin_email.php
Normal file
20
database/migrations/20261012000002_system_admin_email.php
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user