ar_internal_metadata table 是在生产中创建的吗?

Is ar_internal_metadata table created in production?

我想知道我是否需要创建迁移以在 Rails 5

的生产环境中创建 ar_internal_metadata

它基本上是一个安全开关,以复杂化和改变 Rails 应用程序的部署方式为代价:

Rails 5 has added a new table ar_internal_metadata to store environment version which is used at the time of migrating the database.

When the first time rake db:migrate is executed then new table stores the value production. Now whenever we load database schema or database structure by running rake db:schema:load or rake db:structure:load Rails will check if Rails environment is production or not. If not then Rails will raise an exception and thus preventing the data wipeout.

来源:http://blog.bigbinary.com/2016/06/07/rails-5-prevents-destructive-action-on-production-db.html