Closed MetalRex101 closed 6 years ago
Is there a way to programmatically (from code) rollback existing migrations?
Yes, use Exec() (https://godoc.org/github.com/rubenv/sql-migrate#Exec) with a MigrationDirection of Down.
Exec()
MigrationDirection
Down
The command-line app uses the library, so just have a look at the code.
Is there a way to programmatically (from code) rollback existing migrations?