Skip to content

Commit 064b142

Browse files
committed
Clarify migrations diagram
1 parent e4d6396 commit 064b142

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

src/guide/databases/db-migrations.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,23 @@ And the following steps show how to deploy a new release with database migration
2323
3. Scott applies any accumulated database migrations to the production database.
2424

2525
```mermaid
26-
flowchart LR
27-
subgraph Development
28-
create[Create migration] --> commit[Commit migration]
29-
commit --> pull[Pull changes]
30-
pull --> applyLocal[Apply migration locally]
31-
end
32-
33-
subgraph Production
34-
tag[Create release tag] --> deploy[Update source on server]
35-
deploy --> applyProd[Apply pending migrations]
36-
end
26+
sequenceDiagram
27+
participant Tim
28+
participant VCS as Source control
29+
participant Doug
30+
participant LocalDB as Local development database
31+
participant Scott
32+
participant ProdServer as Production server
33+
participant ProdDB as Production database
34+
35+
Tim->>Tim: Creates a new migration
36+
Tim->>VCS: Commits the new migration
37+
Doug->>VCS: Updates his repository and receives the new migration
38+
Doug->>LocalDB: Applies the migration locally
39+
40+
Scott->>VCS: Creates a release tag with new migrations
41+
Scott->>ProdServer: Updates source code to the release tag
42+
Scott->>ProdDB: Applies accumulated migrations
3743
```
3844

3945
Yii provides a set of migration command line tools that allow you to:

0 commit comments

Comments
 (0)