lib/generators/scenic/view/templates/db/migrate/update_view.erb in scenic-0.3.0 vs lib/generators/scenic/view/templates/db/migrate/update_view.erb in scenic-1.0.0
- old
+ new
@@ -1,5 +1,12 @@
class <%= migration_class_name %> < ActiveRecord::Migration
def change
+ <%- if materialized? -%>
+ update_view :<%= plural_name %>,
+ version: <%= version %>,
+ revert_to_version: <%= previous_version %>,
+ materialized: true
+ <%- else -%>
update_view :<%= plural_name %>, version: <%= version %>, revert_to_version: <%= previous_version %>
+ <%- end -%>
end
end