multi-tenant: New migration doesn't run on tenant
Ok here’s the gist of my situation. I created a set of new migrations and upon issuing php artisan migrate --tenant=all it doesn’t migrate the tenant database with the new migrations. Please see steps below.
PS. This only works if you apply my PR: https://github.com/hyn/multi-tenant/pull/103
- blank master database
- no tenant databases yet
- I have migrations after hyn/multi-tenant migrations.
- I then run
multi-tenant:setupas seen below to create new tenant. New migrations as highlighted in the screenshot shows at the bottom. No surprises there since that’s how it should work.
- I then ran migrations for tenant
php artisan migrate --tenant=all - As you can see on the screenshot the 3 migrations from above doesn’t appear in the tenant migration.

- I reset the master database, deleted all the tables, removed the newly created tenant.
- I then tested it out and renamed all 3 migrations in such a way that it will show up first on the list and that the hyn/multi-tenant migrations will be shown last. As you can see on the screenshot it works as expected on the master database, the 3 migrations are now shown first.

- I then tried again and run the migrations on the tenant created. This time the 3 migrations hows on top of the hyn/multi-tenant migrations as expected.

About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 21 (16 by maintainers)
I am using Laravel 5.3 and Hyn 2.0* and new migrations are not run on my tenant databases.
I don’t get any errors about failed tables etc.
Once I rename the migration to 2014_something, it runs perfectly on the tenants.