Commit d1de7b9f by Phill Sparks

Fix named keys on Schema columns.

Signed-off-by: Phill Sparks <me@phills.me.uk>
parent f27027d3
...@@ -120,10 +120,17 @@ class Schema { ...@@ -120,10 +120,17 @@ 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))
{
if ($column->$key === true)
{ {
$table->$key($column->name); $table->$key($column->name);
} }
else
{
$table->$key($column->name, $column->$key);
}
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment