standalone-migrations icon indicating copy to clipboard operation
standalone-migrations copied to clipboard

Supporting Rails 7

Open jaredcwhite opened this issue 3 years ago • 3 comments

Any thoughts on cutting a new gem release to support Rails 7? I forked and bumped up the version constraints, and it seems to be working except for an issue with some schema file name/type stuff which had been deprecated or removed in Rails 7. I worked around that simply by manually setting ENV['schema'], but I'm not sure what's the best long-term solution.

jaredcwhite avatar Mar 13 '22 17:03 jaredcwhite

Ah, I see a new gem was released a few days ago, but as mentioned there's still one issue with the schema code differences (though thankfully there's a ENV-based workaround for now).

jaredcwhite avatar Mar 21 '22 02:03 jaredcwhite

For anybody wondering, and trying out the mentioned solution, simply prefix your commands with SCHEMA='' rake db:*whatever_command*.

Or set the variable in your session by running export SCHEMA='' and proceeding with your work.

robsliwi avatar Mar 21 '22 13:03 robsliwi

i added:

ENV["SCHEMA"] = File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, "schema.rb")
StandaloneMigrations::Tasks.load_tasks

jakeonfire avatar Jun 10 '22 00:06 jakeonfire

The gem now officially supports rails 7 abd unit tests run against 7 without failing

thuss avatar Nov 04 '23 17:11 thuss