database_cleaner-active_record icon indicating copy to clipboard operation
database_cleaner-active_record copied to clipboard

Support Rails 7.2+

Open ghiculescu opened this issue 11 months ago • 4 comments

The schema_migration method was moved in https://github.com/rails/rails/pull/51162

Red tests are due to https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/93

ghiculescu avatar Mar 04 '24 01:03 ghiculescu

@casperisfine would Rails ever consider a public API for accessing this model or table name?

ghiculescu avatar Mar 04 '24 01:03 ghiculescu

would Rails ever consider a public API for accessing this model or table name?

Hum, I dunno. I was quite happy I was able to move those without breaking the public API. But I guess we could expose them on AR::Base and commit to that. But I wouldn't take this decision alone, at the very least @eileencodes would need to agree.

casperisfine avatar Mar 04 '24 12:03 casperisfine

would Rails ever consider a public API for accessing this model or table name?

I'd be fine with schema_migration being public but not the class. When I removed the inheritance on Base it also removed the ability to do most queries, so it only responds to some methods. I don't want PRs making that class (or InternalMetadata) more robust.

eileencodes avatar Mar 04 '24 13:03 eileencodes

Not necessarily a breaking change for 7.2 but it would be great if #102 could also get included with this.

joshuay03 avatar Apr 05 '24 10:04 joshuay03

@ghiculescu Looks good, thank you!

etagwerker avatar Jun 05 '24 13:06 etagwerker