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
Fix support for newer Sequel versions #120
Conversation
Since @jeremyevans is the current maintainer of Sequel itself, better to wait for his answer on the differences between adapter_scheme and database_type :) The documentation says that database_type is the same as adapter_scheme by default: From the explanation I'd guess that database_type is the way to go, but better to wait for his response. |
Anyway, are there any reasons for not using the code from @jeremyevans above for all database types? db.from(*tables_to_truncate(db)).truncate |
Not that I know of. I merged in Sequel support a while ago and I am starting to wonder if the original contributor was very familiar with Sequel since things like this keep popping up. TBH, I know very little about Sequel myself so I'd love to get some direction on this. |
You can't do In short, the patch in this ticket is correct, and the one in #121 is wrong. |
Fix support for newer Sequel versions
Thanks, I've merged this one in. |
thanks :) |
Also, there is another catch, I'm not sure how to deal with.
First, I guess the documentation is wrong:
Should be:
But for this to work in Sequel, the tables must be passed as symbols. This is how I use it:
Sequel will also exclude :schema_info, although I don't use it for keeping track of database changes as I'm using standalone_migrations. This is not a major issue as I don't even have this table, but it could be if that table had a different mean for my application.
I'm only sending a simple patch because I'm not sure how to deal with the other issues.