我在开发和生产环境中都使用了mysql版本14.14。我有一个像分贝迁移文件:为什么schema.rb文件在开发和生产环境之间有所不同?
class ChangeRoleToNodeTemplate < ActiveRecord::Migration
def up
rename_table :roles, :node_templates
end
def down
rename_table :node_templates, :roles
end
end
当运行“耙分贝:迁移”命令,它产生的schema.rb文件是正确。
但是,当我运行'rake db:migrate RAILS_ENV = production'时,它包含具有相同模式的'roles'和'node_templates'表。
任何人都可以给我一个建议?谢谢。
我使用的Rails 3.1.0
14.14?那是什么? – 2012-04-13 11:35:55