在一些Rails模型定义中,顶部有一个包含模式信息的注释块。什么时候使用rails更新模型的模式信息的注释块?
# == Schema Information
# Schema version: 20090122060318
#
# Table name: table_name
#
# id :integer(4) not null, primary key
...
什么时候得到更新?仅当您使用生成器脚本创建模型时才生成一次?迁移执行时是否有更新此块的方法?
我用“rake annotate”。感谢你的回答! – 2012-11-12 16:55:44