1. Go to this page and download the library: Download marekskopal/orm-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/ */
marekskopal / orm-migrations example snippets
use MarekSkopal\ORM\Database\MySqlDatabase;
use MarekSkopal\ORM\Migrations\Migrator;
use MarekSkopal\ORM\Schema\Builder\SchemaBuilder;
$database = new MySqlDatabase(host: 'localhost', username: 'root', password: 'password', database: 'mydb');
$schema = (new SchemaBuilder())
->addEntityPath(__DIR__ . '/Entity')
->build();
$migrator = new Migrator(
path: __DIR__ . '/migrations/',
database: $database,
);