File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,13 @@ This command should be used whenever a manual change in the migration directory
103
103
// MigrateValidateCmd represents the migrate validate command.
104
104
MigrateValidateCmd = & cobra.Command {
105
105
Use : "validate" ,
106
- Short : "Validates the migration directories checksum." ,
106
+ Short : "Validates the migration directories checksum and SQL statements ." ,
107
107
Long : `'atlas migrate validate' computes the integrity hash sum of the migration directory and compares it to
108
- the atlas.sum file. If there is a mismatch it will be reported.` ,
108
+ the atlas.sum file. If there is a mismatch it will be reported. If the --dev-url flag is given, the migration files are
109
+ executed on the connected database in order to validate SQL semantics.` ,
109
110
Example : ` atlas migrate validate
110
- atlas migrate validate --dir /path/to/migration/directory` ,
111
+ atlas migrate validate --dir /path/to/migration/directory
112
+ atlas migrate validate --dir /path/to/migration/directory --dev-url mysql://user:pass@localhost:3306/dev` ,
111
113
RunE : CmdMigrateValidateRun ,
112
114
}
113
115
)
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ atlas migrate new
136
136
137
137
### atlas migrate validate
138
138
139
- Validates the migration directories checksum.
139
+ Validates the migration directories checksum and SQL statements .
140
140
141
141
#### Usage
142
142
```
@@ -145,13 +145,15 @@ atlas migrate validate [flags]
145
145
146
146
#### Details
147
147
'atlas migrate validate' computes the integrity hash sum of the migration directory and compares it to
148
- the atlas.sum file. If there is a mismatch it will be reported.
148
+ the atlas.sum file. If there is a mismatch it will be reported. If the --dev-url flag is given, the migration files are
149
+ executed on the connected database in order to validate SQL semantics.
149
150
150
151
#### Example
151
152
152
153
```
153
154
atlas migrate validate
154
155
atlas migrate validate --dir /path/to/migration/directory
156
+ atlas migrate validate --dir /path/to/migration/directory --dev-url mysql://user:pass@localhost:3306/dev
155
157
```
156
158
#### Flags
157
159
```
You can’t perform that action at this time.
0 commit comments