From f48fc3c6cbcc0cbcb34cefa2025434c09cf57e04 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer <contact@jacobvosmaer.nl> Date: Fri, 28 Mar 2014 13:37:09 +0100 Subject: [PATCH] Add a rake task that drops all tables --- lib/tasks/gitlab/db/drop_all_tables.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/tasks/gitlab/db/drop_all_tables.rake diff --git a/lib/tasks/gitlab/db/drop_all_tables.rake b/lib/tasks/gitlab/db/drop_all_tables.rake new file mode 100644 index 00000000000..a66030ab93a --- /dev/null +++ b/lib/tasks/gitlab/db/drop_all_tables.rake @@ -0,0 +1,10 @@ +namespace :gitlab do + namespace :db do + task drop_all_tables: :environment do + connection = ActiveRecord::Base.connection + connection.tables.each do |table| + connection.drop_table(table) + end + end + end +end -- GitLab