Laravel - Migrations - Database Connection Table Options

If you want to perform a schema operation on a database connection that is not your application's default connection, use the connection method:

    
    Schema::connection('sqlite')->create('users', function (Blueprint $table) {
        $table->id();
    });
	

In addition, a few other properties and methods may be used to define other aspects of the table's creation. The engine property may be used to specify the table's storage engine when using MySQL:

    
    Schema::create('users', function (Blueprint $table) {
        $table->engine = 'InnoDB';
    
        // ...
    });
	

The charset and collation properties may be used to specify the character set and collation for the created table when using MySQL:

    
    Schema::create('users', function (Blueprint $table) {
        $table->charset = 'utf8mb4';
        $table->collation = 'utf8mb4_unicode_ci';
    
        // ...
    });
	

The temporary method may be used to indicate that the table should be "temporary". Temporary tables are only visible to the current connection's database session and are dropped automatically when the connection is closed:

    
    Schema::create('calculations', function (Blueprint $table) {
        $table->temporary();
    
        // ...
    });