根据https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/,我执行了“heroku addons:add heroku-postgresql:dev”。但是当我执行时:
当我执行"heroku run rake db:migrate"时,我遇到了这个错误:
PG::Error:ERROR:在"EXTENSION"附近或附近的语法错误 LINE 1: CREATE EXTENSION hstore ^ :创建扩展名hstore
class CreateUsers < ActiveRecord::Migration
def up
create_table :users do |t|
execute "CREATE EXTENSION hstore"
t.hstore :access
end
end
def down
drop_table :users
execute "DROP EXTENSION hstore"
end
end
end
当我执行"heroku run rake db:migrate"时,我遇到了这个错误:
PG::Error:ERROR:在"EXTENSION"附近或附近的语法错误 LINE 1: CREATE EXTENSION hstore ^ :创建扩展名hstore
CREATE EXTENSION
是在9.0中引入的,也许你正在使用旧版本? - user330315