buildadmin/database/migrations/20230719211338_version201.php
2023-12-29 12:29:24 +08:00

17 lines
327 B
PHP

<?php
use think\migration\Migrator;
class Version201 extends Migrator
{
public function up(): void
{
$user = $this->table('user');
if ($user->hasIndex('email')) {
$user->removeIndexByName('email')
->removeIndexByName('mobile')
->update();
}
}
}