PHP code example of asko / migrator

1. Go to this page and download the library: Download asko/migrator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

asko / migrator example snippets


use Asko\Migrator\Migrator;
use Asko\Migrator\Drivers\MysqlDriver;

$migrator = new Migrator('migrations_path', new MysqlDriver(...));

// Run migrations
$migrator->migrate();

// Revert last migration
$migrator->revert();