Skip to content

Commit

Permalink
Merge pull request propelorm#891 from robin850/patch-1
Browse files Browse the repository at this point in the history
Fix a few typos [ci skip]
  • Loading branch information
marcj committed Mar 14, 2015
2 parents a1295a1 + 412e897 commit aec84f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Propel/Generator/Platform/MysqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ public function getModifyColumnsDDL($columnDiffs)
}

/**
* Builds the DDL SQL to add a a column
* Builds the DDL SQL to add a column
*
* @param Column $column
*
Expand All @@ -697,12 +697,12 @@ public function getAddColumnDDL(Column $column)
";
$tableColumns = $column->getTable()->getColumns();

//default to add to top if the before-column cannot be found
// Default to add first if no column is found before the current one
$insertPositionDDL = "FIRST";
foreach ($tableColumns as $i => $tableColumn) {
//we found the column, use the column before it, if its not the first
// We found the column, use the one before it if it's not the first
if ($tableColumn->getName() == $column->getName()) {
//we have a column that is not the first column
// We have a column that is not the first one
if ($i > 0) {
$insertPositionDDL = "AFTER " . $this->quoteIdentifier($tableColumns[$i - 1]->getName());
}
Expand Down Expand Up @@ -730,7 +730,7 @@ public function getAddColumnsDDL($columns)
foreach ($columns as $column) {
$lines .= $this->getAddColumnDDL($column);
}

return $lines;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ public function testSelectAllWithColumn()
BookstoreDataPopulator::populate($this->con);

$c = new ModelCriteria('bookstore', 'Propel\Tests\Bookstore\Book');
// $c->distinct();
$c->join('Propel\Tests\Bookstore\Book.Author');
$c->useQuery('Author')
->withColumn('Propel\Tests\Bookstore\Author.LastName', 'authorLastName')
Expand Down

0 comments on commit aec84f3

Please sign in to comment.