title: PG::SyntaxError: ERROR: syntax error at or near "USING"
body: <p>I'm having trouble migrating my table with Rails. When I run rake db:migrate I get this error.</p>
  
  <h1>Error</h1>
  
  <pre><code>PG::SyntaxError: ERROR:  syntax error at or near "USING"
  LINE 1: ALTER TABLE "assignments" ADD "frequency" integer USING CAST...
  </code></pre>
  
  <h2>Migration</h2>
  
  <pre><code>class AddBackFrequeny &lt; ActiveRecord::Migration[5.0]
    def change
      add_column :assignments, :frequency, 'integer USING CAST(frequency AS integer)'
    end
  end
  </code></pre>
  
  <p>I just changed my database to postgresql. maybe somethings there?</p>