Skip to content
Browse files

Clearing doesnt need migrations

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3996 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 30c42b2 commit f340df798e62b9c92c2c322d3f56a00eb2523de7 @dhh dhh committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 railties/lib/tasks/databases.rake
View
3 railties/lib/tasks/databases.rake
@@ -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

0 comments on commit f340df7

Please sign in to comment.
Something went wrong with that request. Please try again.