laravel multiple databases with multiple migration tables

前端 未结 1 684
感情败类
感情败类 2021-02-09 03:44

I am trying to set up a multiple database application in laravel 5. I have a database A and a second database B. In database A there are my main models. Now I tried to write a m

相关标签:
1条回答
  • 2021-02-09 04:23

    I found it out with the help of this Use one Laravel migrations table per database and post the answer here for others.

    In order to separate the migrations you need to run the migrate command with the database option like this:

    php artisan migrate --database="nameOfConnection"
    
    0 讨论(0)
提交回复
热议问题