PHP code example of alphasoft-fr / sql-migration

1. Go to this page and download the library: Download alphasoft-fr/sql-migration 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/ */

    

alphasoft-fr / sql-migration example snippets




return [
    'connection' => new PDO('mysql:host=localhost;dbname=mydb', 'username', 'password'),
    'migrations_directory' => __DIR__ . '/migrations',
    // Other configuration options...
];
shell
php vendor/bin/sqlmigration sql:migration:generate
shell
php vendor/bin/sqlmigration sql:migration:migrate
shell
php vendor/bin/sqlmigration sql:migration:down <version>