diff --git a/src/Illuminate/Database/Console/ShowCommand.php b/src/Illuminate/Database/Console/ShowCommand.php index 05dc2138f521..d711a01bc685 100644 --- a/src/Illuminate/Database/Console/ShowCommand.php +++ b/src/Illuminate/Database/Console/ShowCommand.php @@ -21,7 +21,7 @@ class ShowCommand extends DatabaseInspectionCommand {--json : Output the database information as JSON} {--counts : Show the table row count Note: This can be slow on large databases } {--views : Show the database views Note: This can be slow on large databases } - {--types : Show the user-defined types}'; + {--types : Show the user defined types}'; /** * The console command description. diff --git a/src/Illuminate/Database/Console/TableCommand.php b/src/Illuminate/Database/Console/TableCommand.php index 5a86c0c81cd0..0bd67e1fdba1 100644 --- a/src/Illuminate/Database/Console/TableCommand.php +++ b/src/Illuminate/Database/Console/TableCommand.php @@ -38,9 +38,7 @@ class TableCommand extends DatabaseInspectionCommand public function handle(ConnectionResolverInterface $connections) { $connection = $connections->connection($this->input->getOption('database')); - $schema = $connection->getSchemaBuilder(); - $tables = $schema->getTables(); $tableName = $this->argument('table') ?: select( diff --git a/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php b/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php index 0415132b5ad9..123718eb1ba0 100644 --- a/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php +++ b/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php @@ -35,9 +35,11 @@ public function processColumns($results, $sql = '') $type = strtolower($result->type); - $collation = preg_match('/\b'.preg_quote($result->name) - .'\b[^,(]+(?:\([^()]+\)[^,]*)?(?:(?:default|check|as)\s*(?:\(.*?\))?[^,]*)*collate\s+["\'`]?(\w+)/i', - $sql, $matches) === 1 ? strtolower($matches[1]) : null; + $collation = preg_match( + '/\b'.preg_quote($result->name).'\b[^,(]+(?:\([^()]+\)[^,]*)?(?:(?:default|check|as)\s*(?:\(.*?\))?[^,]*)*collate\s+["\'`]?(\w+)/i', + $sql, + $matches + ) === 1 ? strtolower($matches[1]) : null; return [ 'name' => $result->name, diff --git a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 3d4d4c42d154..07bd41291414 100755 --- a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -359,9 +359,8 @@ public function compileRenameColumn(Blueprint $blueprint, Fluent $command, Conne { $version = $connection->getServerVersion(); - if (($connection->isMaria() && version_compare($version, '10.5.2', '<')) - || (! $connection->isMaria() && version_compare($version, '8.0.3', '<')) - ) { + if (($connection->isMaria() && version_compare($version, '10.5.2', '<')) || + (! $connection->isMaria() && version_compare($version, '8.0.3', '<'))) { $column = collect($connection->getSchemaBuilder()->getColumns($blueprint->getTable())) ->firstWhere('name', $command->from); diff --git a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php index bf03157e3885..fcbaf0798685 100644 --- a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php @@ -237,7 +237,7 @@ protected function getForeignKey($foreign) // If this foreign key specifies the action to be taken on update we will add // that to the statement here. We'll append it to this SQL and then return - // the SQL so we can keep adding any other foreign constraints onto this. + // this SQL so we can keep adding any other foreign constraints to this. if (! is_null($foreign->onUpdate)) { $sql .= " on update {$foreign->onUpdate}"; } @@ -572,7 +572,7 @@ public function compileRenameIndex(Blueprint $blueprint, Fluent $command, Connec } if ($index['primary']) { - throw new RuntimeException('Sqlite does not support alter primary key.'); + throw new RuntimeException('SQLite does not support altering primary keys.'); } if ($index['unique']) {