Skip to content

Commit bf43e5a

Browse files
authored
fix: Allow to create databases with dots. (#44436)
1 parent dc64b70 commit bf43e5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Console/Migrations/MigrateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected function createMissingMysqlDatabase($connection)
212212

213213
$freshConnection = $this->migrator->resolveConnection($this->option('database'));
214214

215-
return tap($freshConnection->unprepared("CREATE DATABASE IF NOT EXISTS {$connection->getDatabaseName()}"), function () {
215+
return tap($freshConnection->unprepared("CREATE DATABASE IF NOT EXISTS `{$connection->getDatabaseName()}`"), function () {
216216
$this->laravel['db']->purge();
217217
});
218218
} finally {

0 commit comments

Comments
 (0)