Schema comparison and migration

Last modified: 25 March 2024

In PhpStorm, you can compare two database objects of the same type. For example, you can compare two schemas, two tables, or two routines. Databases with objects can be hosted on different servers. PhpStorm shows you the differences in the structures of these two objects in the Migration dialog.

Migration is a process of transferring structure and changes from one object to another (for example, from one schema to another). In PhpStorm, these objects are called Origin and Target. The migration script is generated to make Target equal to Origin. But you can modify the script to satisfy your requirements.

Compare the structure in Migration dialog

For changes, PhpStorm uses the following color coding.

See the description of the dialog controls in the reference section.