method

migrate

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: MigrationContext
migrate(target_version = nil, &block) public

Runs the migrations in the migrations_path.

If target_version is nil, migrate will run up.

If the current_version and target_version are both 0 then an empty array will be returned and no migrations will be run.

If the current_version in the schema is greater than the target_version, then down will be run.

If none of the conditions are met, up will be run with the target_version.

Show source
Register or log in to add new notes.