phpBB

Development Wiki

Difference between revisions of "Migrations/Extensions"

From phpBB Development Wiki

m
Line 1: Line 1:
Using Migrations in your Extension is very simple to do.
+
Using Migrations in your Extension is a very simple thing to do.
  
 
==Automatically install/revert Migrations when enabled/purged==
 
==Automatically install/revert Migrations when enabled/purged==
Line 10: Line 10:
 
Any new migration files included in the migrations/ directory in your extension will then be automatically installed.
 
Any new migration files included in the migrations/ directory in your extension will then be automatically installed.
  
[Category:Migrations]
+
[[Category:Migrations]]

Revision as of 21:35, 31 January 2013

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/

Run Updates

If the user has updated your extension and new migration files were added, you can call the following function:

phpbb_extension_manager->handle_migrations($extension_name'enable');


Any new migration files included in the migrations/ directory in your extension will then be automatically installed.