Skip to main content

Making DB Structure Changes for Tenants

Premium
2:43

In this course, we have covered all the basic features and all the primary use cases for packages for multi-tenancy. Let's spend some time on advanced features or what else we can do after installing the stancl/tenancy package.

Based on the demo project, I will continue working on that for upcoming lessons and will introduce a few more features and show how it works in a bit advanced way.

In this lesson, what do you do if you want to add something to the database structure of tenants?

For example, you have a task CRUD, and every tenant has its own database, and you want to add a field there. Let's add a description column to the tasks.


The package adds tenant migrations into the database/migrations/tenant folder. Then, instead of running the Artisan command migrate, we must run the tenants:migrate command.

So, first...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 41 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

No comments yet…

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.