I changed my model from
class Place
include DataMapper::Resource
has n, :trails
property :id, Serial
property :name, String, :length => 140
property :tag, String, :required => true
timestamps :at
end
to
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
I just added a property: trail_count, Integer ,: default => 0 "
and I want to migrate the existing appengine table to have an extra field "trail_count" I read that DataMapper.auto_upgrade! gotta do it.
but I get the error message "undefined method` auto_upgrade! 'for DataMapper: module"
Please help, how can I migrate DM models?
source
share