Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gms8994/framework into gm…
Browse files Browse the repository at this point in the history
…s8994-master
  • Loading branch information
taylorotwell committed Dec 8, 2017
2 parents ee54d12 + 8ef2fce commit 57bcf63
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Illuminate/Database/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ public function toSql(Connection $connection, Grammar $grammar)

$statements = [];

if ($connection instanceof \Illuminate\Database\SQLiteConnection) {
$badDDLCount = collect($this->commands)
->filter(function($item, $key) {
return in_array($item->name, [ 'dropColumn', 'renameColumn' ]);
})
->count();

if ($badDDLCount > 1) {
throw new \BadMethodCallException("Multiple calls to dropColumn/renameColumn in a single table modification are not supported.");
}
}


// Each type of command has a corresponding compiler function on the schema
// grammar which is used to build the necessary SQL statements to build
// the blueprint element, so we'll just call that compilers function.
Expand Down

0 comments on commit 57bcf63

Please sign in to comment.