tenancy / multi-tenant

Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant
https://tenancy.dev
MIT License
2.56k stars 394 forks source link

Migration to another server #1009

Closed jefelon closed 3 years ago

jefelon commented 3 years ago

Description of your feature

Imagine that I have to migrate to another server and I have 800 tenants, how should I pass the mysql users? for so many users?

Proposed behavior

use one user for all mysql connections

Current behavior

create the same accounts manually on the new server, it is unsustainable


Information

fletch3555 commented 3 years ago

Migrate the system database... run artisan tenancy:recreate (https://tenancy.dev/docs/hyn/5.6/commands#recreate-command) to recreate the tenant databases, database users, and tenant filesystem directories... then import the tenant databases to overwrite the ones that got created. This will leave the users untouched and maintain access to the appropriate tenant database.