jeudi 13 octobre 2016

Is it possible to do migration on dynamic database connection with Laravel 5?

I am trying to dynamically create database for different users. (every user will have their own database server, so don't ask why I am not using a single database for all users) To do that, I have a default database storing all the connection information. I will need to:

  1. Create a new database and run all migration files on new user registration.
  2. Run new migration files on all database recorded in this default database when there is update in schema.

Is there a way I can dynamically set the database connection of the migration file based on the information I have on the default database?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire