mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-26 17:09:11 +01:00
33 lines
631 B
PHP
33 lines
631 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
||
|
return new class extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::table('users', function (Blueprint $table) {
|
||
|
$table->unique('name');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::table('users', function (Blueprint $table) {
|
||
|
$table->dropUnique('users_name_unique');
|
||
|
});
|
||
|
}
|
||
|
};
|