PHP code example of shrrgnien / sequencial-migrations

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

    

shrrgnien / sequencial-migrations example snippets


		 protected array $migrations = [
				 // Migration nomeada (classe PHP)
				 'CreateProdutosTable',
				 // Migration anônima (arquivo migration)
				 '2025_08_11_135652_create_sis_solicitacoes_table',
		 ];
		 

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProdutosTable extends Migration
{
	public function up()
	{
		Schema::create('produtos', function (Blueprint $table) {
			$table->id();
			$table->string('nome');
			$table->timestamps();
		});
	}

	public function down()
	{
		Schema::dropIfExists('produtos');
	}
}
shell
php artisan vendor:publish --tag=sequencial-migrations-base
shell
		 php artisan migrate:base
		 
shell
		 php artisan migrate:base down