Rails: differences in db/schema.rb - null: false at created_at/updated_at columns

我们两清 提交于 2019-12-04 02:59:04

I had the same thing on my dev machine. Running db:drop in production is not a wise idea, but what will fix the 'problem':

rake db:drop db:create db:migrate

My mysql version had changed since I first created the database with rails. The migrations still ran according to the old mysql version.

This is what probabaly happens at your production environment.

Check your mysql version in production system and system where you used in development mode. There was a similar issue with default values.

Check this link : https://www.ruby-forum.com/topic/134121

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!