没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
oss.trustie.net/open_source_projects | 主页 > 开源项目社区 > fixture-migrate |
fixture-migrate
|
0 | 0 | 29 |
贡献者 | 讨论 | 代码提交 |
Assumptions:You are working with a rails application. You only have fixture files for tables in your database. That is if you have a table called companies you have a fixture called companies.yml. UsageTo add this rake task to your project just drop the migrate_fixtures.rake and migrate_fixtures.rb files into the lib/tasks directory of your rails project. Create a schema_info.yaml file under test/fixtures that contains something like the following:
schema_info:
version: "2"version number must correspond to the version of your database that your fixtures are currently at.
Now to try it out add a new migration to your project. After calling the db migration you can call rake db:fixtures:migrate and the same migration will be run on your fixtures.