AR::ConnectionAdapters#tables return only tables(exclude views)
This commit includes these fixes:
Move no. 2 function to
Change arguments of
Now the responsibility of
Change some tests
We should deal with that inconsistency somehow. It's quite the difference in behavior and client code for all adapters can never be sure what they'll get. I think there's a handful of issues on GitHub about that behavior.
One approach that comes to mind would be deprecating
Sure. But at the same time, I think someone is depending in the fact that it does not return view (postgresql users). I am not sure changing all adapters to returns table + view is better than only return table.
I need to have a better look where
I like the idea of passing in
@yui-knk I merged my patch. We can now put in place the necessary deprecations to change the behavior of
This means that in the transition phase. Basically
Reported on #21509, how views is treated by `#tables` are differ by each adapters. To fix this different behavior, after Rails 5.0 is released, deprecate `#tables`. And `#table_exists?` would check both tables and views. To make their behavior consistent with `#tables`, after Rails 5.0 is released, deprecate `#table_exists?`.