Skip to content

Commit

Permalink
Change "Renaming a table" section to match Phinx documentation
Browse files Browse the repository at this point in the history
Original example doesn't work as it calls save() when update() is required.

https://book.cakephp.org/phinx/0/en/migrations.html#renaming-a-table
  • Loading branch information
kalnado authored Aug 26, 2022
1 parent e0b0547 commit 178c7aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,17 @@ method. In your migration file, you can do the following::
{
$this->table('old_table_name')
->rename('new_table_name')
->save();
->update();
}

public function down()
{
$this->table('new_table_name')
->rename('old_table_name')
->update();
}


Skipping the ``schema.lock`` file generation
--------------------------------------------

Expand Down

0 comments on commit 178c7aa

Please sign in to comment.