Skip to content

Commit c6239e2

Browse files
committed
update doc
1 parent 4d8b314 commit c6239e2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/hooks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ The following variables are available on all hooks:
7676
- `GH_OST_HOOKS_HINT_OWNER` - copy of `--hooks-hint-owner` value
7777
- `GH_OST_HOOKS_HINT_TOKEN` - copy of `--hooks-hint-token` value
7878
- `GH_OST_DRY_RUN` - whether or not the `gh-ost` run is a dry run
79+
- `GH_OST_REVERT` - whether or not `gh-ost` is running in revert mode
7980

8081
The following variable are available on particular hooks:
8182

doc/revert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ gh-ost will read the binlog coordinates of the original cut-over from the checkp
1515
Reverting is roughly equivalent to applying the "reverse" migration. _Before attempting to revert you should determine if the reverse migration is possible and does not involve any unacceptable data loss._
1616

1717
For example: if the original migration drops a `NOT NULL` column that has no `DEFAULT` then the reverse migration adds the column. In this case, the reverse migration is impossible if rows were added after the original cut-over and the revert will fail.
18-
Another example: if the original migration modifies a `VARCHAR(32)` column to `VARCHAR(64)`, the reverse migration truncates the `VARCHAR(64)` column to `VARCHAR(32)`. If values were inserted with length > 32 after the cut-over then the revert will fail (in strict mode) or lose data (in non-strict mode).
18+
Another example: if the original migration modifies a `VARCHAR(32)` column to `VARCHAR(64)`, the reverse migration truncates the `VARCHAR(64)` column to `VARCHAR(32)`. If values were inserted with length > 32 after the cut-over then the revert will fail.
1919

2020

2121
## Example
@@ -52,4 +52,4 @@ gh-ost \
5252
```
5353

5454
gh-ost then reconnects at the binlog coordinates stored in the cut-over checkpoint and applies DMLs until the old table is up-to-date.
55-
Note that the "reverse" migration is `ADD KEY idx(...)` so there is no potential data loss to consider.
55+
Note that the "reverse" migration is `ADD KEY idx(...)` so there is no potential data loss to consider in this case.

0 commit comments

Comments
 (0)