From phpBB Development Wiki
Using Migrations in your Extension is a very simple thing to do.
Automatically install/revert Migrations when enabled/purged
If you wish to have your Migrations installed and removed automatically when your extension is enabled and purged respectively, all you need to do is put your Migration files in ext/(your extension name)/migrations/
Check if latest Migration is installed
To check if the latest Migration is installed that is included with your extension (to, for example, make sure all updates have been applied) call the following function:
phpbb_db_migrator->migration_state(migration name (e.g. 'phpbb_db_migration_data_30x_3_0_11'))
If the returned value is boolean false (compare to === false), then the migration is not installed, otherwise it is at least partially installed (assuming everything went well during the install process, it should be fully installed or not installed at all).
To check if fully installed, if bool false is not returned, an array will be containing the two keys "migration_schema_done" and "migration_data_done". If both of these are true (== true) then it is fully installed.
If the user has updated your extension and new migration files were added, you can call the following function:
Any new migration files included in the migrations/ directory in your extension will then be automatically installed.