buildadmin/database/migrations/20230719211338_version201.php

18 lines
343 B
PHP
Raw Normal View History

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