| 10 | type DownCommand struct{} |
| 11 | |
| 12 | func (*DownCommand) Help() string { |
| 13 | helpText := ` |
| 14 | Usage: sql-migrate down [options] ... |
| 15 | |
| 16 | Undo a database migration. |
| 17 | |
| 18 | Options: |
| 19 | |
| 20 | -config=dbconfig.yml Configuration file to use. |
| 21 | -env="development" Environment. |
| 22 | -limit=1 Limit the number of migrations (0 = unlimited). |
| 23 | -version Run migrate down to a specific version, eg: the version number of migration 1_initial.sql is 1. |
| 24 | -dryrun Don't apply migrations, just print them. |
| 25 | |
| 26 | ` |
| 27 | return strings.TrimSpace(helpText) |
| 28 | } |
| 29 | |
| 30 | func (*DownCommand) Synopsis() string { |
| 31 | return "Undo a database migration" |