Created
September 6, 2022 19:55
-
-
Save floehopper/b64e879a29460c911e67c72f023ccb98 to your computer and use it in GitHub Desktop.
Run migration from Rails console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
migration_context = ActiveRecord::Base.connection.migration_context | |
migration_context.migrate(target_version = nil) | |
migration_context.rollback(steps = 1) | |
migration_context.forward(steps = 1) | |
migration_context.up(target_version = nil) | |
migration_context.down(target_version = nil) | |
migration_context.current_version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment