This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun May 25 09:54:07 -0700 2008 | [oculardisaster] |
| |
README | Sun May 25 10:48:39 -0700 2008 | [oculardisaster] |
| |
Rakefile | Sun May 25 10:47:13 -0700 2008 | [oculardisaster] |
| |
init.rb | Sun May 25 09:54:07 -0700 2008 | [oculardisaster] |
| |
lib/ | Sun May 25 09:54:07 -0700 2008 | [oculardisaster] |
| |
test/ | Sun May 25 10:47:13 -0700 2008 | [oculardisaster] |
README
Plugin Migrator
-----------------------------------------------------
This plugin is meant to enable other plugins to be able to manage their own migrations. This is done by extending the
PluginMigrator class and supplying a number of configuration parameters.
Example:
class MyPluginMigrator < PluginMigrator::Migrator
schema_table_override "my_plugin_schema_info"
migration_directory "#{my_plugin_root}/db/migrate"
end
The #{my_plugin_root} should be a full path preferably based on the location of the file that is extending
PluginMigrator::Migrator.
So if you have
my_plugin
db
migrate
lib
my_plugin
migrator.rb
Then you probably would have something that looks like this:
Example:
class MyPluginMigrator < PluginMigrator::Migrator
schema_table_override "my_plugin_schema_info"
migration_directory File.join(File.dirname(__FILE__), "/../../db/migrate")
end
To invoke your migrator, you simply call:
MyPlugin::Migrator.migrate(ENV['VERSION'],false)
Either from your code or perhaps a rake task like "rake myplugin:migrate"
To run the tests:
% rake spec
I have included example specs and code for the MyPlugin plugin.
Notes: Thanks to the good people at Web Strong Group that allowed me to open source this plugin.




