Something like this should migrate only that specific migration.
php artisan migrate --path=database/migrations/2014_10_12_000000_create_users_table.php
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi, I was wondering if there is a way to migrate a specific table that is inside a migration class, here is the example,
class CreateUsersTable extends Migration
{
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->timestamps();
});
there is the USER table and creates the user
but after that schema I got this one, and is new never migrated before
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->timestamps();
});
Schema::create('wishContracts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('smart_contract_id');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
i want to call something like this command
php artisan migrate --path=create_users_table --schema-path=wishContracts
and migrate just that table inside that class.. that can be done? thanks in advance -- if you know a plugin for this let me know
also, How I dump a specific migration table or full migration class? thanks in advance
Please or to participate in this conversation.