protected function build(array $options = array())
{
$this->schema($options);
// postSchema is added for mixin that needs all schema information, for example LocalizeMixin
foreach ($this->mixinSchemas as $mixin) {
$mixin->postSchema();
}
$this->primaryKey = $this->findPrimaryKey();
// if the primary key is not define, we should append the default primary key => id
// AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY
if (false === $this->primaryKey) {
if ($config = ConfigLoader::getInstance()) {
if ($config->hasAutoId() && !isset($this->columns['id'])) {
$this->insertAutoIdPrimaryColumn();
}
}
}
}