Closed hcarver closed 9 years ago
@hcarver thanks for the PR -- I like adding the functionality.
But I'm not fond of implementing it by duplicating the complete add_view method with all its logic in the postgresql adapter... that'll just make it harder to maintain (especially if somebody else comes along later with another option to add, such as :temporary).
And in any case MySQL also supports CREATE OR REPLACE. So I'd suggest just adding the option to the method in abstract_adapter.rb
(See also my comment on the commit itself.)
Also could you add a spec that tests this (skipping sqlite3 since it doesn't support it) and, and add documentation to the README?
Thanks! Sorry for the extra work for what doubtless seemed like quick small thing...
Allow for the option to replace a view, not just create one.