Fix named keys on Schema columns.
Signed-off-by: Phill Sparks <me@phills.me.uk>
This commit is contained in:
@@ -120,9 +120,16 @@ class Schema {
|
|||||||
{
|
{
|
||||||
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
|
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
|
||||||
{
|
{
|
||||||
if (isset($column->attributes[$key]))
|
if (isset($column->$key))
|
||||||
{
|
{
|
||||||
$table->$key($column->name);
|
if ($column->$key === true)
|
||||||
|
{
|
||||||
|
$table->$key($column->name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$table->$key($column->name, $column->$key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user