PHP code example of always-open / laravel-online-migrator

1. Go to this page and download the library: Download always-open/laravel-online-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/ */

    

always-open / laravel-online-migrator example snippets

 bash
php artisan vendor:publish --provider='AlwaysOpen\OnlineMigrator\OnlineMigratorServiceProvider'
 php
'providers' => [
    // ...
    AlwaysOpen\OnlineMigrator\OnlineMigratorServiceProvider::class,
 php
  'doctrine-enum-mapping' => env('DOCTRINE_ENUM_MAPPING', 'string'),
 bash
php artisan migrate
 bash
php artisan migrate --pretend
 bash
PTOSC_OPTIONS='--recursion-method=none'  php artisan migrate
 php
class MyMigration extends Migration
{
    use \AlwaysOpen\OnlineMigrator\OnlineIncompatible
 php
class MyMigration extends Migration
{
    use \AlwaysOpen\OnlineMigrator\InnodbOnlineDdl
 php
class MyMigration extends Migration
{
    use \AlwaysOpen\OnlineMigrator\CombineIncompatible