Fix named keys on Schema columns.

Signed-off-by: Phill Sparks <me@phills.me.uk>
This commit is contained in:
Phill Sparks 2012-03-22 14:27:37 +00:00
parent f27027d3a8
commit d1de7b9ffe
1 changed files with 9 additions and 2 deletions

View File

@ -120,10 +120,17 @@ protected static function implications($table)
{
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
{
if (isset($column->attributes[$key]))
if (isset($column->$key))
{
if ($column->$key === true)
{
$table->$key($column->name);
}
else
{
$table->$key($column->name, $column->$key);
}
}
}
}
}