hyperf/hyperf

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

开放

#1,587 创建于 2020年4月16日

 (3 条评论) (0 个反应) (0 位负责人)PHP (1,008 个派生)batch import
enhancementgood first issue

仓库指标

星标
 (4,975 个星标)
PR 合并指标
 (平均合并 2小时 27分钟) (30 天内合并 11 个 PR)

描述

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.

贡献者指南