Stop setting migrations from running #103
-
Hi Just like some other developers on here (e.g. #39 ) I'm trying to use the stancl/tenancy package to achieve multi-database tenancy. I have a central database without settings, and multiple tenant databases with setting tables of their own. I already run into problems (Settings table doesn't exist) when running migrate, as the central database doesn't have a settings table. This behaviour is expected because only tenants should have a settings table. I can't seem to figure out how to stop the settings 'migrations' in the /database/settings folder from running when executing php artisan migrate. These should only run for each tenant when php artisan tenants:migrate is run. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Haven't worked with tenancy before so I have no idea if this is a valid solution. You could set the settings migrations paths in your config to [] so they won't be loaded when migrating. Then when migrating tenants, you could load the correct migrations required for the settings tables. |
Beta Was this translation helpful? Give feedback.
Haven't worked with tenancy before so I have no idea if this is a valid solution. You could set the settings migrations paths in your config to [] so they won't be loaded when migrating. Then when migrating tenants, you could load the correct migrations required for the settings tables.