【发布时间】:2014-04-07 01:14:02
【问题描述】:
class UpdateIndexOnUsers < ActiveRecord::Migration
def up
sql = 'DROP INDEX index_users_on_email'
sql << ' ON users' if Rails.env == 'production' # Heroku pg
ActiveRecord::Base.connection.execute(sql)
end
end
在 Heroku 上尝试 rake db:migrate 时出现语法错误。任何帮助将不胜感激。使用 Postgresql。我应该提到它在本地运行良好。
编辑:错误
PG::SyntaxError: Error: syntax error at or near "ON"
Line 1: DROP INDEX index_users_on_email ON users
^
【问题讨论】:
-
如果您可以发布错误会有所帮助
标签: ruby-on-rails ruby heroku devise