App migration support.

1.0.1 2022-04-02 16:57 UTC

This package is auto-updated.

Last update: 2022-10-02 17:58:22 UTC


App migration support.

Table of Contents

Getting Started

Add the latest version of the app migration project running this command.

composer require tobento/app-migration


  • PHP 8.0 or greater



Check out the App Skeleton if you are using the skeleton.

You may also check out the App to learn more about the app in general.

Migration Boot

The migration boot does the following:

  • definition of \Tobento\Service\Migration\MigratorInterface::class
  • definition of \Tobento\Service\Migration\MigrationResultsInterface::class
  • installs and loads migration config file
  • adds install and uninstall app macros
use Tobento\App\AppFactory;

// Create the app
$app = (new AppFactory())->createApp();

// Adding boots

// Run the app

Install and Uninstall Migration

Once the Migration Boot has been booted you may install migrations by the following ways:

use Tobento\App\Boot;
use Tobento\App\Migration\Boot\Migration;

class AnyServiceBoot extends Boot
    public const BOOT = [
        // you may ensure the migration boot.
    public function boot(Migration $migration)
        // Install migrations
        // Uninstall migrations
        // Install migrations with app macro
        // Uninstall migrations with app macro

Create Migration

Check out the Migration Service to learn more about creating migration classes.