== AddAncestryToMessages: migrating ==========================================
-- add_column(:messages, :ancestry, :string)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such table: messages: ALTER TABLE "messages" ADD "ancestry" varchar(255)
そのため、私のアプリケーションには投稿できるメッセージ (Twitter のようなもの) があり、返信を追加しています。そのために ancestry gem を使用しています。
ファイル内の私のコードschema.rb
(これは、rake db:migrate を実行するたびにテーブルを作成するために使用するファイルだと思いますが、間違っている可能性があります (これが問題になる可能性があります!)
create_table "messages", :force => true do |t|
t.string "content"
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "ancestry"
end
add_index "messages", ["user_id", "created_at", "ancestry"], :name => "index_messages_on_user_id_and_created_at_and_ancestry"