Skip to content

Commit

Permalink
fix various formatting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 31, 2017
1 parent 29de659 commit e2d178c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
7 changes: 7 additions & 0 deletions src/Illuminate/Database/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public function toSql(Connection $connection, Grammar $grammar)
/**
* Add the commands that are implied by the blueprint's state.
*
* @param \Illuminate\Database\Grammar $grammer
* @return void
*/
protected function addImpliedCommands(Grammar $grammar)
Expand Down Expand Up @@ -166,6 +167,12 @@ protected function addFluentIndexes()
}
}

/**
* Add the fluent commands specified on any columns.
*
* @param \Illuminate\Database\Grammar $grammer
* @param
*/
public function addFluentCommands(Grammar $grammar)
{
foreach ($this->columns as $column) {
Expand Down
20 changes: 11 additions & 9 deletions src/Illuminate/Database/Schema/Grammars/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class Grammar extends BaseGrammar
protected $transactions = false;

/**
* Enable other commands to be executed outside of create or alter command (like indexes).
* The commands to be executed outside of create or alter command.
*
* @var array
*/
Expand Down Expand Up @@ -127,14 +127,6 @@ protected function getType(Fluent $column)
return $this->{'type'.ucfirst($column->type)}($column);
}

/**
* @return array
*/
public function getFluentCommands()
{
return $this->fluentCommands;
}

/**
* Add the column modifiers to the definition.
*
Expand Down Expand Up @@ -258,6 +250,16 @@ public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema
});
}

/**
* Get the fluent commands for the grammar.
*
* @return array
*/
public function getFluentCommands()
{
return $this->fluentCommands;
}

/**
* Check if this Grammar supports schema changes wrapped in a transaction.
*
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ class PostgresGrammar extends Grammar
protected $modifiers = ['Increment', 'Nullable', 'Default'];

/**
* Enable other commands to be executed outside of create or alter command (like indexes).
* The columns available as serials.
*
* @var array
*/
protected $fluentCommands = ['Comment'];
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];

/**
* The columns available as serials.
* The commands to be executed outside of create or alter command.
*
* @var array
*/
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];
protected $fluentCommands = ['Comment'];

/**
* Compile the query to determine if a table exists.
Expand Down Expand Up @@ -305,7 +305,7 @@ public function compileDisableForeignKeyConstraints()
}

/**
* Compile a plain index key command.
* Compile a comment command.
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
Expand Down

0 comments on commit e2d178c

Please sign in to comment.