-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edge rails (future 7.1) no longer has ActiveRecord::SchemaMigration.table_name #83
Comments
Rails transactional db cleanout seems good enough? database_cleaner not currently working with edge Rails 7.1. https://github.com/DatabaseCleaner/database_cleaner/issues/693
FWIW Rails 6 shipped with a teardown do
ActiveRecord::Tasks::DatabaseTasks.truncate_all
end |
Looks like the source of the issue is a dependent gem, which now has an open PR. See 19327d1 |
Nice. I saw the PR was opened in early December and didn't have any more activity, so I opened a new PR: #80 . Hope it works and we can get this issue resolved 🙏 |
I believe this was solved in v2.1.0 -> https://github.com/DatabaseCleaner/database_cleaner-active_record/blob/main/CHANGELOG.md#v210-2023-02-17 |
…emaMigration:Class'` Cypress tests fail immediately with: ``` undefined method 'table_name' for ActiveRecord::SchemaMigration:Class' ``` Issue described here: DatabaseCleaner/database_cleaner-active_record#83 Updating to the latest database-cleaner gem.
ci: add active_record 7.2 to ci matrix deps: pin pagy_cursor to prevent incompatible version deps: pin activerecord 7.2+ compatible version of database_cleaner ran into DatabaseCleaner/database_cleaner-active_record#83
ci: add active_record 7.2 to ci matrix deps: pin pagy_cursor to prevent incompatible version deps: pin activerecord 7.2+ compatible version of database_cleaner ran into DatabaseCleaner/database_cleaner-active_record#83
ci: add active_record 7.2 to ci matrix deps: pin pagy_cursor to prevent incompatible version deps: pin activerecord 7.2+ compatible version of database_cleaner ran into DatabaseCleaner/database_cleaner-active_record#83
* fix(ActiveRecord): correctly connect to the database in Rails 7.2+ ci: add active_record 7.2 to ci matrix deps: pin pagy_cursor to prevent incompatible version deps: pin activerecord 7.2+ compatible version of database_cleaner ran into DatabaseCleaner/database_cleaner-active_record#83 * chore: skip activerecord specs on mongoid * deps: use correct database_cleaner adapter per database * deps: pin mongoid-scroll to v1
Current edge rails (future Rails 7.1) produces an error from cleaning in
:truncation
or:deletion
strategies, due toActiveRecord::SchemaMigration.table_name
apparently being removed.eg
It think possibly this this is the commit where it moved, but still wrapping my head around it: rails/rails@436277d. Hm, it looks like maybe instead of being a class method, SchemaMigration now has to be initialized as an instance with a particular connection to get a table name... this seems unclear how to patch in DC.
It looks like similar things have happened in the past that effected database_cleaner, eg DatabaseCleaner/database_cleaner#476
I run my CI on edge rails to get early notice of anything that will break it... or in this case, early notice of something that broke database_cleaner, preventing me from running my CI on rails edge at present!
The text was updated successfully, but these errors were encountered: