からモデルチェンジしました
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
「property :trail_count, Integer, :default => 0」を追加しました
そして、既存の appengine テーブルを移行して追加のフィールド「trail_count」を追加したいのですが、DataMapper.auto_upgrade を読みました! するべきです。
しかし、「undefined method `auto_upgrade!」というエラーが表示されます for DataMapper:Module"
DM モデルを移行する方法を教えてください。