fix(lagoon): migrate:status reads the sets migrate applies (WR-12)
This commit is contained in:
@@ -14,7 +14,7 @@ Every application binary carries the framework's runtime commands. The examples
|
||||
|---------|-------|---------|
|
||||
| `migrate` | `--pretend`, `--force` | Runs the framework migrations, then every plugin's migrations in dependency order, printing how many each set applied and `Applied N migrations` (or `Nothing to migrate`). `--pretend` lists the pending migrations as `<plugin>: <id>` and applies nothing. |
|
||||
| `migrate:rollback` | `--plugin <id>`, `--pretend`, `--force` | Rolls back the last migration of the plugin; without the flag, of the last activated plugin that has migrations. Prints `Rolled back <id> of <plugin>`; `--pretend` only names it. |
|
||||
| `migrate:status` | `--json` | Prints a table of plugin, history table and applied migration IDs. `--json` prints every declared migration of those plugins with `plugin`, `table`, `id` and `applied`. |
|
||||
| `migrate:status` | `--json` | Prints a table of the framework's own migration sets and every plugin with migrations, with history table and applied migration IDs. `--json` prints every declared migration of those sets with `plugin`, `table`, `id` and `applied`. |
|
||||
|
||||
```sh
|
||||
./bin/acme migrate --pretend
|
||||
|
||||
@@ -81,7 +81,7 @@ The application binary has the migration commands:
|
||||
|
||||
`migrate:rollback` rolls back the last applied migration of one plugin. Without `--plugin` it picks the last activated plugin that has migrations. To fix a migration you just wrote, roll it back, edit it and run `migrate` again.
|
||||
|
||||
`migrate:status` prints each plugin's history table and applied IDs.
|
||||
`migrate:status` prints the history table and applied IDs of the framework's own sets (under history IDs such as `summercms.attach`) and of each plugin with migrations.
|
||||
|
||||
The same operations are Go functions, which is how tests migrate a fresh database:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user