Created
December 16, 2010 10:04
-
-
Save hubertlepicki/743252 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails' | |
module Cms | |
class Engine < Rails::Engine | |
rake_tasks do | |
load "cms/railties/tasks.rake" | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :cms do | |
desc "Run cms migrations (options: VERSION=x, VERBOSE=false)." | |
task :migrate => :environment do | |
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true | |
ActiveRecord::Migrator.migrate(File.join(File.dirname(__FILE__), "../../../db/migrate/"), ENV["VERSION"] ? ENV["VERSION"].to_i : nil) | |
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment