1

Does Phinx support pt-online-schema-change?

I realize Phinx is supposed to handle DB migrations. But in the live environment, running a simple ALTER TABLE command on a huge table might lead to a table lock and temporary service unavailability.

There is a tool from Percona Toolkit called pt-online-schema-change which can handle the schema migration without any downtime, by creating a temporary table, copying the data and re-applying the log.

Is there a way to easily integrate these two, in order to get nice DB migration management from Phinx, and the production zero downtime from Percona Toolkit? Is there any other DB migration management tool, which supports pt-online-schema-change?

Pavel S.
  • 11,892
  • 18
  • 75
  • 113

1 Answers1

1

Phinx doesn't support 'pt-online-schema-change' at the moment. You could try opening an issue on the Github project for future support (if it proves to be popular). Somebody has been hacking on something similar (see: https://github.com/masom/lhm_php). It is a port of a ruby-based SoundCloud project.

Pavel S.
  • 11,892
  • 18
  • 75
  • 113
Rob Morgan
  • 346
  • 2
  • 4