WoltLab Suite 6.2 Handbuch
Deutsch/PHP-Version: Die Website-Struktur, Navigation und Überschriften sind auf Deutsch vorbereitet. Code-Beispiele und technische Namen bleiben unverändert.

Datenbank Paket Installation Plugin

Update the database layout using the PHP API.

!!! warning "You must install the PHP script through the file package installation plugin."

!!! warning "The installation will attempt to delete the script after successful execution."

Attributes

application

The application attribute must have the same value as the application attribute of the file package installation plugin instruction so that the correct file in the intended application directory is executed.

For further information about the application attribute, refer to its documentation on the acpTemplate package installation plugin page.

Expected value

The database-PIP expects a relative path to a .php file that returns an array of DatabaseTable objects.

Naming convention

The PHP script is deployed by using the file package installation plugin.

To prevent it from colliding with other install script (remember: You cannot overwrite files created by another plugin), we highly recommend to make use of these naming conventions:

<targetVersion> equals the version number of the current package being installed.

If you're updating from 1.0.0 to 1.0.1, <targetVersion> should read 1.0.1.

If you run multiple update scripts, you can append additional information in the filename.

Execution environment

The script is included using include() within DatabasePackageInstallationPlugin::updateDatabase().