Rails + Postgres drop error: database is being accessed by other users

前端 未结 16 2153
时光取名叫无心
时光取名叫无心 2020-12-04 06:26

I have a rails application running over Postgres.

I have two servers: one for testing and the other for production.

Very often I need to clone the production

16条回答
  •  心在旅途
    2020-12-04 07:17

    This worked for me (rails 6): rake db:drop:_unsafe

    I think we had something in our codebase that initiated a db connection before the rake task attempted to drop it.

提交回复
热议问题