If you cannot change an Artisan command yourself, for instance a command from Laravel itself or a command from a package, you can use tenants:artisan <artisan command>. This command will loop over tenants and for each of them make that tenant current, and execute the artisan command.
When your tenants each have their own database, you could migrate each tenant database with this command (given you are using a task like SwitchTenantDatabase):
php artisan tenants:artisan migrate
We are using the migrate command here, but you can pass any command that you like.