HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //home/xedaptot/ai.naniguide.com/DB_SHARDING_MODE.md
# Environment preparation

1. Set up a connection in config/sharding.php
2. Execute the following command to set up the connection database

   `userdb:init [connection]`

# Migration

1. Choose a customer, specified by [customer_id]

2. [Optional] Dump the customer's data in the Master DB

   `php artisan userdb:dump [customer_id] [dumpfile]`

3. [Optional] Import the customer's data from dumpfile to the intended server's connection

   `php artisan userdb:import [connection] [dumpfile]`

4. Clone the customer profile from Master DB to the user DB

   `php artisan userdb:sync [customer_id]`