From 49c30d0e9a63148dbece20436f2b9f7d45ffc3f9 Mon Sep 17 00:00:00 2001 From: Jannik C Date: Mon, 21 Mar 2022 10:08:46 +0100 Subject: [PATCH] cmd/action: apply CR --- cmd/action/migrate.go | 9 ++++----- doc/md/cli/reference.md | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cmd/action/migrate.go b/cmd/action/migrate.go index 454927d662c..4d605b05fbe 100644 --- a/cmd/action/migrate.go +++ b/cmd/action/migrate.go @@ -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{ @@ -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() diff --git a/doc/md/cli/reference.md b/doc/md/cli/reference.md index 58e4eac91bb..7718e417676 100644 --- a/doc/md/cli/reference.md +++ b/doc/md/cli/reference.md @@ -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