Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Skiptir Engu committed Jun 2, 2017
2 parents 9c2e97f + 5f96429 commit 7e0bdbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ To use this extension, just change the database configuration of your applicatio

and you're set!

Known issues
------------
+ The schema does not load comments (sp_help does not support)
TODO
----
+ Backport this to PHP 5.4?
+ Figure out a way to load table comments

License
-------
Expand Down
4 changes: 2 additions & 2 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ protected function loadColumnSchema($info)
$column->phpType = $this->getColumnPhpType($column);

$default = $info['Column_default'];
if (!$column->isPrimaryKey && ($column->type !== 'timestamp' || $default !== 'CURRENT_TIMESTAMP')) {
if (!$column->isPrimaryKey && ($column->type !== self::TYPE_TIMESTAMP || $default !== 'CURRENT_TIMESTAMP')) {
$column->defaultValue = $column->phpTypecast($default);
}

Expand Down Expand Up @@ -257,4 +257,4 @@ public function findUniqueIndexes($table)
$this->resetTableInfo();
return $indexes;
}
}
}

0 comments on commit 7e0bdbc

Please sign in to comment.