mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-07 19:40:49 +08:00
21 lines
469 B
PHP
21 lines
469 B
PHP
<?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();
|
|
}
|
|
}
|
|
}
|