我已经改变了我的模型
class Place
include DataMapper::Resource
has n, :trails
property :id, Serial
property :name, String, :length => 140
property :tag, String, :required => true
timestamps :at
end
至
class Place
include DataMapper::Resource
has n, :trails
property :id, Serial
property :name, String, :length => 140
property :tag, String, :required => true
property :trail_count, Integer, :default => 0
timestamps :at
end
我刚刚添加了“属性:trail_count,整数,:default => 0”
我想迁移现有的 appengine 表以获得额外的字段“trail_count”,我已经阅读了 DataMapper.auto_upgrade!应该这样做。
但我得到一个错误“未定义的方法`auto_upgrade!' 对于 DataMapper:模块"
你能帮忙我如何迁移 DM 模型?