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

Add SQLServerAdapter with view_cache override method

Open botandrose opened this issue 5 years ago • 2 comments

Copied from https://github.com/DatabaseCleaner/database_cleaner/pull/578

I created a SQLServerAdapter to so I could override the implementation of the database_cleaner_view_cache method since sql server.

The other option was to change the underlying implementation of https://github.com/DatabaseCleaner/database_cleaner/blame/master/lib/database_cleaner/active_record/truncation.rb#L25 I'm not sure why this is part of the base implementation?

 where table_schema = '#{current_database}'

botandrose avatar Feb 28 '20 20:02 botandrose

@ablignaut Now that we have restored dependency sanity and can test against real implementations, I'd like to get a failing test that this PR fixes, before merging it in.

Admittedly, this is kind of a yak shave, because there's doesn't seem to be a directly supported way to test with SqlServer on Travis. I've been looking at https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/.travis.yml and it looks like its possible, though. Would you be interested in taking a crack at this? If not, I'll get around to it at some point.

botandrose avatar Feb 28 '20 21:02 botandrose

@botandrose Sorry for the delay. It seems that there are conflicts in the PR. Could you please look into it?

Thanks!

etagwerker avatar Feb 17 '23 16:02 etagwerker

Closing this due to inactivity. If you want to re-open it later, go for it. ❤️

etagwerker avatar Jul 12 '24 02:07 etagwerker