Skip to content

Commit

Permalink
update downgrade help
Browse files Browse the repository at this point in the history
ran into an issue

fix for long term issue: #915
  • Loading branch information
lolopinto committed Jun 2, 2022
1 parent ad53b7b commit 7f24377
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tsent/cmd/downgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ var downgradeInfo downgradeArgs
var downgradeCmd = &cobra.Command{
Use: "downgrade",
Short: "downgrade db",
Long: `This downgrades the database to the specified version. It also deletes the generated schema files. To keep the generated schema files, pass the --keep_schema_files argument.
Long: `This downgrades the database to the specified version. It also deletes the generated schema files.
To keep the generated schema files, pass the --keep_schema_files argument.
When there's a branch and there's multiple heads and you wanna downgrade one branch, the command is as follows:
tsent downgrade rev@branchrev
For example,
if a change is made in one branch: rev1 -> rev2a
and in another branch: rev1 -> rev2b
and you're in main and both have been upgraded and you want downgrade just rev2a: the command is tsent downgrade rev2a@rev1
If you're trying to downgrade a single revision e.g. downgrade -- -1 and get "Ambiguous walk" and you end up with a situation where there's only one head and multiple down revs, try running tsent downgrade current@one_down_rev and see if that fixes it
`,
Example: `tsent downgrade --keep_schema_files -- -1
tsent downgrade --keep_schema_files revision
tsent downgrade -- -1
tsent downgrade revision`,
tsent downgrade revision
tsent downgrade rev2a@rev1`,
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
// another hardcoded place
Expand Down

0 comments on commit 7f24377

Please sign in to comment.