make:migration

php mitosis make:migration add_index_to_users

Use underscores, not spaces — the description is a single command-line argument, and an unquoted space-separated description silently truncates to just its first word.

Writes database/migrations/{timestamp}_add_index_to_users.php:

<?php

declare(strict_types=1);

use Monad\Clarity\Services\Schema;
use Monad\Clarity\Services\Schema\Blueprint;

return new class {
    public function up(): void
    {
        //
    }

    public function down(): void
    {
        //
    }
};
✓ Created migration: /path/to/database/migrations/20260808024633_add_index_to_users.php

The timestamp prefix (YmdHis) is what makes Migration::migrate() run files in the right order — see Migration. Fill in up()/down() with real Schema calls before running migrate.

Next steps

  • Schema — the DDL calls that go inside up()/down().
  • migrate — running the file this command just created.