Removed unique constrain from usernames
This commit is contained in:
parent
ab3812b5a0
commit
19c6097a1c
|
@ -34,7 +34,7 @@ class RegisteredUserController extends Controller
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'name' => 'required|string|max:255|unique:users',
|
'name' => 'required|string|max:255',
|
||||||
'email' => 'required|string|email|max:255|unique:users',
|
'email' => 'required|string|email|max:255|unique:users',
|
||||||
'password' => 'required|string|confirmed|min:8',
|
'password' => 'required|string|confirmed|min:8',
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -145,6 +145,28 @@ use Illuminate\Support\Facades\File;
|
||||||
]);
|
]);
|
||||||
} catch (exception $e) {}
|
} catch (exception $e) {}
|
||||||
|
|
||||||
|
// Remove unique constrain from user names
|
||||||
|
class UpdateNameColumnInUsersTable extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropUnique('users_name_unique');
|
||||||
|
$table->string('name')->unique(false)->change();
|
||||||
|
});
|
||||||
|
} catch (\Throwable $th) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->string('name')->unique()->change();
|
||||||
|
});
|
||||||
|
} catch (\Throwable $th) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Changes saved profile images from littlelink_name to IDs.
|
// Changes saved profile images from littlelink_name to IDs.
|
||||||
// This runs every time the updater runs.
|
// This runs every time the updater runs.
|
||||||
|
|
Loading…
Reference in New Issue