Catch getType

Hopefully fixes #19
This commit is contained in:
Barry vd. Heuvel
2013-05-29 18:24:43 +03:00
parent a5c16b0751
commit 9090aeb766
@@ -146,7 +146,12 @@ class ModelsCommand extends Command {
if($columns){
foreach ($columns as $column) {
$name = $column->getName();
$type = $column->getType()->getName();
try{
$type = $column->getType()->getName();
}catch(\Exception $e){
$type = "string";
$this->info("Could not determine type of column '$name', defaulting to string.");
}
switch($type){
case 'string':
case 'text':