/** * {@inheritdoc} */ public function primary() { $this->autoIncrement = true; //Changing type of already created primary key (we can't use "serial" alias here) if (!empty($this->type) && $this->type != 'serial') { $this->type = 'integer'; return $this; } return parent::primary(); }