buildadmin/database/migrations/20230719211338_version201.php

17 lines
327 B
PHP
Raw Normal View History

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