Support index options

This commit is contained in:
Kijin Sung 2020-07-11 18:00:36 +09:00
parent 25373e6540
commit 4ad35bff8c
6 changed files with 25 additions and 6 deletions

View file

@ -10,4 +10,5 @@ class Index
public $name;
public $columns = array();
public $type = null;
public $options = null;
}

View file

@ -92,6 +92,10 @@ class Table
}
$idxtype = $index->type ? ($index->type . ' INDEX') : 'INDEX';
$idxdef = ' ' . $idxtype . ' `' . $index->name . '` (' . implode(', ', $idxcolumns) . ')';
if ($index->options)
{
$idxdef .= ' ' . $index->options;
}
$columns[] = $idxdef;
}