Rails3でテストデータベースを適切に準備する際に奇妙な問題があります。
schema.rb には次のものがあります。
create_table "sites", :force => true do |t|
t.string "ldap_dn", :null => false
t.string "address"
t.string "phone"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
次に、私の移行の1つに次のものがあります。
change_column :sites, :id, :string, :limit => 255, :primary_key => true
今、私が持っている開発データベースでrake db:migrate
id VARCHAR(255) PK
rake db:test:prepare
しかし、私が持っている後のテストデータベースで
id INT(11) PK AI
ログ ファイル ( test.log
) で、すべての移行が実行されたことを確認できます。
私が使う:
- レール3.2.13
- 開発データベースとテスト データベースの両方に mysql
これは何かのバグですか?
編集:
- 私は開発データベースを意味しました。ごめん。