PHP code example of astylodon / migrations

1. Go to this page and download the library: Download astylodon/migrations 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/ */

    

astylodon / migrations example snippets




use Astylodon\Migrations\Migrate;

$migrate = new Migrate($database, "mysql");

$migrate->findMigrations(__DIR__ . "/migrations");
$migrate->migrate();



// 0001_initial_create.php

use Astylodon\Migrations\Database\DatabaseInterface;
use Astylodon\Migrations\Migration;

return new class implements Migration
{
    public function up(DatabaseInterface $database)
    {
        // Your database migrations here
    }
};