title: Rails 3.2.6 & database views creation through migrations
body: <p>I'm using rails 3.2.6 and I need to create a database VIEW. As usual I created a migration and I tried to achieve the goal using the execute method.</p>
  
  <p>Unfortunately the migration generates a table, not a view. Why?</p>
  
  <p>Many thanks in advance,
  Mauro</p>
  
  <p>UPDATE:</p>
  
  <p>I would like to have something as follows:</p>
  
  <pre><code>class CreateMyView &lt; ActiveRecord::Migration
    def self.up
      execute &lt;&lt;-SQL
        CREATE VIEW my_view AS SELECT ...
      SQL
    end
    def self.down
      execute &lt;&lt;-SQL
        DROP VIEW my_view
      SQL
    end
  end
  </code></pre>
  
  <p>Unfortunately this migration creates a table...</p>
  
  <p>UPDATE:
  the previous code works! I was executing rake db:reset instead of rake db:migrate:reset (my mistake)</p>