summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/db/drop_all_tables.rake10
1 files changed, 10 insertions, 0 deletions
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