hyperf/hyperf

[FEATURE] Database Migrations - Handling multiple migrations with different connections

Aperta

#1587 aperta il 16 apr 2020

 (3 commenti) (0 reazioni) (0 assegnatari)PHP (1008 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (4975 stelle)
Metriche merge PR
 (Merge medio 2h 27m) (11 PR mergiate in 30 g)

Descrizione

Is your feature request related to a problem? Please describe. I got few migrations each referring a different connection. migrate:fresh, migrate:refresh doesn't handle this scenario since they operate on the default connection or in the specific connection passed via --database param.

Describe the solution you'd like The simplest solution can be to process only migrations that has the $connection property set to the default connection or in the specific connection passed via --database param. A better solution could be iterate the distinct connections defined in the migrations and process them according.

Guida contributor