diff --git a/en/migrations.rst b/en/migrations.rst index ea14482cee..d438f888ce 100644 --- a/en/migrations.rst +++ b/en/migrations.rst @@ -387,13 +387,20 @@ creates the file:: class RemovePriceFromProducts extends AbstractMigration { - public function change() + public function up() { $table = $this->table('products'); - $table->removeColumn('price'); + $table->removeColumn('price') + ->save(); } } +.. note:: + + The `removeColumn` command is not reversible, so must be called in the + `up` method. A corresponding `addColumn` call should be added to the + `down` method. + Generating migrations from an existing database ===============================================