/** * Execute schema update. */ protected function synchroniseSchema() { if ($this->getName() != $this->initial->getName()) { //Executing renaming $this->commander->renameTable($this->initial->getName(), $this->getName()); } //Some data has to be dropped before column updates $this->dropForeigns()->dropIndexes(); //Generate update flow $this->synchroniseColumns()->synchroniseIndexes()->synchroniseForeigns(); }
/** * @return array */ public function __debugInfo() { return ['name' => ['initial' => $this->initial->getName(), 'current' => $this->current->getName()], 'columns' => ['added' => $this->addedColumns(), 'dropped' => $this->droppedColumns(), 'altered' => $this->alteredColumns()], 'indexes' => ['added' => $this->addedIndexes(), 'dropped' => $this->droppedIndexes(), 'altered' => $this->alteredIndexes()], 'foreignKeys' => ['added' => $this->addedForeigns(), 'dropped' => $this->droppedForeigns(), 'altered' => $this->alteredForeigns()]]; }