laravel/framework · error · RuntimeException
This database driver does not support fulltext index…
Error message
This database driver does not support fulltext index removal.
What it means
Grammar::compileDropFullText() throws RuntimeException on the base. PostgresGrammar and MySqlGrammar override it; SQLiteGrammar and SqlServerGrammar inherit the stub. It compiles a dropFullText()/dropIndex() command targeting a fulltext index.
Solutions
- Run dropFullText on Postgres or MySQL only.
- In tests on SQLite, skip the dropFullText call or avoid creating fulltext indexes there in the first place.
- Drop the index with raw DDL appropriate to the engine as a fallback.
Example fix
// before - throws on SQLite/SQL Server
Schema::table('posts', function (Blueprint $t) {
$t->dropFullText(['title', 'body']);
});
// after - gate by driver
Schema::table('posts', function (Blueprint $t) {
if (in_array(config('database.default'), ['pgsql', 'mysql'])) {
$t->dropFullText(['title', 'body']);
}
}); Defensive patterns
Strategy: validation
Validate before calling
$driver = Schema::getConnection()->getDriverName(); // 'pgsql','mysql','sqlite','sqlsrv'
if (! in_array($driver, ['pgsql', 'mysql'], true)) {
throw new \DomainException("dropFullText is unsupported on driver '{$driver}'.");
} Type guard
function supportsDropFullText(string $driverName): bool
{
return in_array($driverName, ['pgsql', 'mysql'], true);
} Try / catch
try {
Schema::table('posts', fn ($t) => $t->dropFullText(['title', 'body']));
} catch (\RuntimeException $e) {
if (str_contains($e->getMessage(), 'fulltext index removal')) {
DB::statement('ALTER TABLE posts DROP INDEX ft_title_body');
} else {
throw $e;
}
} Prevention
- Run dropFullText only on Postgres or MySQL.
- Avoid creating fulltext indexes on SQLite test DBs so rollback does not need dropFullText.
- Gate dropFullText by driver in cross-engine migrations.
When it happens
Trigger: Calling $table->dropFullText(...) or dropping an index named as fulltext on SQLite or SQL Server - engines whose grammars in this codebase do not override compileDropFullText.
Common situations: Rolling back a migration that created a fulltext index while testing on SQLite; a cross-engine migration set that drops fulltext indexes without gating by driver.
Related errors
- This database driver does not support fulltext index…
- The database driver in use does not support vector indexes.
- This database driver does not support dropping foreign keys.
- This database driver does not support modifying columns.
- This database driver does not support retrieving columns.
AI-assisted analysis of laravel/framework@e0f6eb3518 (2026-08-11).
Data as JSON: /api/errors/dab1fb6c6d981af5.
Report an issue: GitHub.
Appendix: source
Thrown at src/Illuminate/Database/Schema/Grammars/Grammar.php:240
* @throws \RuntimeException
*/
public function compileFulltext(Blueprint $blueprint, Fluent $command)
{
throw new RuntimeException('This database driver does not support fulltext index creation.');
}
/**
* Compile a drop fulltext index command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return string
*
* @throws \RuntimeException
*/
public function compileDropFullText(Blueprint $blueprint, Fluent $command)
{
throw new RuntimeException('This database driver does not support fulltext index removal.');
}
/**
* Compile a foreign key command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
* @return string
*/
public function compileForeign(Blueprint $blueprint, Fluent $command)
{
// We need to prepare several of the elements of the foreign key definition
// before we can create the SQL, such as wrapping the tables and convert
// an array of columns to comma-delimited strings for the SQL queries.
$sql = sprintf('alter table %s add constraint %s ',
$this->wrapTable($blueprint),
$this->wrap($command->index)
);View on GitHub (pinned to e0f6eb3518)