You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: activerecord/lib/active_record/railties/databases.rake
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ db_namespace = namespace :db do
28
28
ActiveRecord::Tasks::DatabaseTasks.drop_current
29
29
end
30
30
31
+
namespace:purgedo
32
+
task:all=>:load_configdo
33
+
ActiveRecord::Tasks::DatabaseTasks.purge_all
34
+
end
35
+
end
36
+
37
+
# desc "Empty the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without RAILS_ENV it defaults to purging the development and test databases."
38
+
task:purge=>[:load_config]do
39
+
ActiveRecord::Tasks::DatabaseTasks.purge_current
40
+
end
41
+
31
42
desc"Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)."
0 commit comments