addColumn('book', 'alias_id', $this->integer()); $this->addForeignKey('book_alias_fk', 'book', 'alias_id', 'alias', 'id', 'CASCADE', 'CASCADE'); } /** * {@inheritdoc} */ public function safeDown() { $this->dropForeignKey('book_alias_fk', 'book'); $this->dropColumn('book', 'alias_id'); } }