Skip to content

Commit

Permalink
Clearing doesnt need migrations
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3996 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 20, 2006
1 parent 30c42b2 commit f340df7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions railties/lib/tasks/databases.rake
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,11 @@ namespace :db do
raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations?
require 'rails_generator'
require 'rails_generator/scripts/generate'
Rails::Generator::Scripts::Generate.new.run(["session_migration", ENV["MIGRATION"] || "AddSessionTable"])
Rails::Generator::Scripts::Generate.new.run(["session_migration", ENV["MIGRATION"] || "AddSessions"])
end

desc "Clear the sessions table"
task :clear => :environment do
raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations?
ActiveRecord::Base.connection.execute "DELETE FROM sessions"
end
end
Expand Down

0 comments on commit f340df7

Please sign in to comment.