初始化
This commit is contained in:
16
database/migrations/20230719211338_version201.php
Normal file
16
database/migrations/20230719211338_version201.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user