In your rake tasks you can perform arbitrary pseudo-migrations:
namespace :dummy do
task :update => :environment do
ActiveRecord::Base.connection.add_column :users, :deleted, :boolean, :null => false, :default => false
end
end
If you do a lot of this, use a short hand:
namespace :dummy do
task :update => :environment do
c = ActiveRecord::Base.connection
c.add_column :users, :deleted, :boolean, :null => false, :default => false
end
end
source
share