Skip to content

Commit

Permalink
cmd/action: apply CR
Browse files Browse the repository at this point in the history
  • Loading branch information
masseelch committed Mar 21, 2022
1 parent cf690ee commit 49c30d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions cmd/action/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,10 @@ the migration directory state to the desired schema. The desired state can be an
MigrateHashCmd = &cobra.Command{
Use: "hash",
Short: "Hash creates an integrity hash file for the migration directories.",
Long: `'atlas migrate hash' computes the integrity hash sum of the migration directory andstores it in the atlas.sum file.
Long: `'atlas migrate hash' computes the integrity hash sum of the migration directory and stores it in the atlas.sum file.
This command should be used whenever a manual change in the migration directory was made.`,
Example: ` atlas migrate validate
atlas migrate validate --dir /path/to/migration/directory`,
RunE: CmdMigrateHashRun,
Example: ` atlas migrate hash --force`,
RunE: CmdMigrateHashRun,
}
// MigrateValidateCmd represents the migrate validate command.
MigrateValidateCmd = &cobra.Command{
Expand Down Expand Up @@ -162,7 +161,7 @@ func CmdMigrateDiffRun(cmd *cobra.Command, args []string) error {
// TODO(masseelch): clean up dev after reading the state from migration dir.
}

// CmdMigrateHashRun is the command executed when running the CLI with 'migrate diff' args.
// CmdMigrateHashRun is the command executed when running the CLI with 'migrate hash' args.
func CmdMigrateHashRun(*cobra.Command, []string) error {
// Open the migration directory.
dir, err := dir()
Expand Down
5 changes: 2 additions & 3 deletions doc/md/cli/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ atlas migrate hash
```

#### Details
'atlas migrate hash' computes the integrity hash sum of the migration directory andstores it in the atlas.sum file.
'atlas migrate hash' computes the integrity hash sum of the migration directory and stores it in the atlas.sum file.
This command should be used whenever a manual change in the migration directory was made.

#### Example

```
atlas migrate validate
atlas migrate validate --dir /path/to/migration/directory
atlas migrate hash --force
```

### atlas migrate validate
Expand Down

0 comments on commit 49c30d0

Please sign in to comment.