Skip to content

Commit

Permalink
StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
slava-vishnyakov committed May 8, 2018
1 parent 6cc9aaa commit ba2eb53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Database\Schema\Grammars;

use Doctrine\DBAL\Schema\Index;
use RuntimeException;
use Illuminate\Support\Fluent;
use Doctrine\DBAL\Schema\Index;
use Illuminate\Database\Connection;
use Illuminate\Database\Schema\Blueprint;

Expand Down Expand Up @@ -322,7 +322,7 @@ public function compileRenameIndex(Blueprint $blueprint, Fluent $command, Connec
$indexes = $schemaManager->listTableIndexes($this->getTablePrefix().$blueprint->getTable());
$index = array_get($indexes, $command->from);

if(!$index) {
if (! $index) {
throw new RuntimeException("Index '{$command->from}' doesn't seem to exist");
}

Expand All @@ -334,7 +334,7 @@ public function compileRenameIndex(Blueprint $blueprint, Fluent $command, Connec

return [
$platform->getDropIndexSQL($command->from, $this->getTablePrefix().$blueprint->getTable()),
$platform->getCreateIndexSQL($newIndex, $this->getTablePrefix().$blueprint->getTable())
$platform->getCreateIndexSQL($newIndex, $this->getTablePrefix().$blueprint->getTable()),
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function compileRename(Blueprint $blueprint, Fluent $command)
public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
{
return sprintf("sp_rename N'%s', %s, N'INDEX'",
$this->wrap($blueprint->getTable() . '.' . $command->from),
$this->wrap($blueprint->getTable().'.'.$command->from),
$this->wrap($command->to)
);
}
Expand Down
1 change: 0 additions & 1 deletion tests/Database/DatabaseSchemaBlueprintIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,5 @@ public function testRenameIndexWorks()
];

$this->assertEquals($expected, $queries);

}
}

0 comments on commit ba2eb53

Please sign in to comment.