How to disable prepared statement in heroku with postgres database

后端 未结 6 1185
-上瘾入骨i
-上瘾入骨i 2021-02-20 12:13

I fixed an issue on my rails project locally (with postgres config) while adding in database.yml this statement:

test:
  prepared_statements: false
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-20 12:32

    You should just be able to add ?prepared_statements=false to the existing database url and restart your dynos. This worked for us.

    heroku config:add DATABASE_URL=[old database url here]?prepared_statements=false
    

    To check that it's set after restarting your server you can open a console and query ActiveRecord::Base.connection_config.

提交回复
热议问题