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