public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('username');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->foreignId('current_team_id')->nullable();
$table->string('profile_photo_path', 2048)->nullable();
$table->timestamps();
$table->index(['username'], 'username_fulltext_index', 'FULLTEXT');
$table->index(['name'], 'name_fulltext_index', 'FULLTEXT');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropIndex('username_fulltext_index');
$table->dropIndex('name_fulltext_index');
});
}
böyle bir şey yaptım fakat hata aldım
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FULLTEXT(`username`)' at line 1 (Connection: mysql, SQL: alter table `users` add index `username_fulltext_index` using FULLTEXT(`username`))