You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Schema::hasColumn('table','column') doesnt work for SQLite connections when using prefix since first Schema\Builder->getColumnListing adds the prefix, but it also gets added once more in Schema\Grammars\SQLiteGrammar->compileColumnListing by Grammar\wrapTable I'm guessing.
Using other drivers work since they dont add the prefix in compileColumnListing.
Description:
Schema::hasColumn('table','column') doesnt work for SQLite connections when using prefix since first Schema\Builder->getColumnListing adds the prefix, but it also gets added once more in Schema\Grammars\SQLiteGrammar->compileColumnListing by Grammar\wrapTable I'm guessing.
Using other drivers work since they dont add the prefix in compileColumnListing.
Steps To Reproduce:
config/database.php:
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => 'test',
],
migration:
Schema::create('table', function (Blueprint $table) {
$table->string('column');
}
Later calling Schema::hasColumn('table','column')
will end up executing
pragma table_info("test_test_table")
in Schema\Builder->getColumnListing
The text was updated successfully, but these errors were encountered: