I'm writing a Rails 3 plugin that uses another Rails 3 plugin that I recently wrote. Let's call them July and August. So in August's gemspec, I add the line:
s.add_dependency "july", "~> 0.0.1"
and I run bundle install
. Then I create some models and fixtures. Next I need to migrate the database:
$ cd test/dummy
$ rake august:install:migrations
$ rake db:migrate
Now, the August (the plugin I am creating) tables are in the development and test databases, but the July tables are not. But my August tables have foreign keys to my July tables, so before I can run any tests, I need to create the July tables and write appropriate fixtures. I would expect to run rake -T
and see
rake august:install:migrations
rake july:install:migrations
but all I see is the august
rake task. So how do I create the July database tables (other than creating a new migration, which would violate DRY since I've already done that in my July codebase)?