I am running tenant new migrations (orders/order_items) that live in database/migrations/tenant across multiple tenants. Each tenant has its own database (tenant_1, tenant_2, tenant_3, …) and there are some tables already. The central/system database is separate.
What happens when i run migrations using
php artisan tenants:migrate --force, tenant_1 migrates successfully.For tenant_2, tenant_3, etc., the command says “Nothing to migrate.”
The new tables (orders, order_items) are not created in those tenant DBs. And new migrations are on migration/tenant folder
i have tried to checked config/tenancy.php includes the tenant migration path:
'migration_parameters' => [
'--force' => true, // This needs to be true to run migrations in production.
'--path' => [database_path('migrations/tenant')],
'--realpath' => true,
],
when i run php artisan tenants:list it show perfectly real total of tenants
I am using laravel 12 and stancl/tenancy: ^3.8