phpBB

Development Wiki

Difference between revisions of "Migrations/Extensions"

From phpBB Development Wiki

(Created page with "Using Migrations in your Extension is simple.<br /> <br /> ==Automatically install/revert Migrations when enabled/purged== If you wish to have your Migrations installed and re...")
 
Line 1: Line 1:
Using Migrations in your Extension is simple.<br />
+
Using Migrations in your Extension is very simple to do.
<br />
+
 
 
==Automatically install/revert Migrations when enabled/purged==
 
==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/
 
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/
Line 9: Line 9:
 
<br />
 
<br />
 
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]

Revision as of 21:35, 31 January 2013

Using Migrations in your Extension is very simple 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.

[Category:Migrations]