PHP code example of jjclane / laravel-sqlite-migrations

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

    

jjclane / laravel-sqlite-migrations example snippets




use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use JJCLane\SQLiteMigration\TransformMigration;

class AddColumnToTable extends Migration
{
    use TransformMigration;

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $this->table('table', function (Blueprint $table) {
            // Normal migrations
            $table->decimal('my_col', 10, 1)->unsigned()->after('my_other_col');
        });
        
        // or if you prefer to be more explicit
        $this->transformMigration('table', function (Blueprint $table) {
            // Normal migrations
            $table->decimal('my_col', 10, 1)->unsigned()->after('my_other_col');
        });
    }
}