【发布时间】:2011-02-19 18:00:12
【问题描述】:
我已经从
更改了我的模型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, Integer, :default => 0”
并且我想迁移现有的 appengine 表以具有额外的字段“trail_count” 我读过 DataMapper.auto_upgrade!应该这样做。
但我得到一个错误“未定义的方法`auto_upgrade!'对于 DataMapper:Module"
您能帮我如何迁移 DM 模型吗?
【问题讨论】:
标签: ruby-on-rails google-app-engine datamapper migrate