Drop query should be part of the jinja template for consistency. Currently, it is added through the python file.
Any changes in the view code should not warn the user "Changing the columns in a view requires dropping...." and we should not drop the view. For example, I have only change the WHERE clause or added 'ORDER BY'.
Please find the attached patch for RM #5053 - Getting an error while changing the columns in the existing view.
PostgreSQL doesn't allow to change the view columns. So, while performing this task the existing view should be dropped first and then recreate it and also user will get a warning first.