Documentation

Updating the database

Thanks to “migrations”, jumping around between different versions of FluxBB is simple. When updating the Git repository, you might want to

To the latest version

In your forum's root directory, simply run the following command from your command line:

php artisan --env=local fluxbb::update

The –env=local part can probably be omitted, or local needs to be replaced with the name of the Laravel environment you have configured for the forum.

To a specific version

Updating / rolling back to a specific version is just as easy - simply append the target version to the above command.

php artisan --env=local fluxbb::update 1.4.9

This would change your database structure to reflect a v1.4.9 forum.

Running single migrations

The updates for a specific versions are split into so-called “migrations”. The migrations for the current version (as stored in the database and in bundles/fluxbb/core/start.php) can each be run on their own - either in forward or in backward direction.

This is useful when you are running code that is currently in development and somebody else added a single migration along with their code. As you have already run the other migrations for the current version, you only want to run that one migration:

php artisan --env=local fluxbb::update:up migration_name

Or, for reverting single migrations:

php artisan --env=local fluxbb::update:down migration_name

The migration name is the same as the file names without the extensions in the folder bundles/fluxbb/core/migrations/update/1.2.3 (where 1.2.3 is your current version's name).