Я изменил свою модель с
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
Я только что добавил свойство: trail_count, Integer,: default => 0
и я хочу перенести существующую таблицу appengine на дополнительное поле "trail_count". Я прочитал этот DataMapper.auto_upgrade! должен это сделать.
но я получаю сообщение об ошибке "undefined method` auto_upgrade! ' для DataMapper: Module "
Не могли бы вы помочь Как мне перенести модели DM?