A
A
adam_carraway2020-07-27 12:39:25
Laravel
adam_carraway, 2020-07-27 12:39:25

How to make migrate:fresh for multiple connections?

The project uses two databases. now with migrate:fresh the tables of the first database are dropped, but not in the second database. To drop the second database you need to use --database with a connection.
Whether it is possible to adjust somehow that at migrate:fresh tables both in the first and in the second database were dropped? without a connection?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daria Motorina, 2020-07-27
@glaphire

Write a sh file or an artisan console command that will run these two commands as you need.

A
Alex Wells, 2020-07-28
@Alex_Wells

Out of the box - no, you can't.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question