diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-03-28 13:37:09 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-03-28 13:37:09 +0100 |
commit | f48fc3c6cbcc0cbcb34cefa2025434c09cf57e04 (patch) | |
tree | 62e8bc8abead8eea922001d8c44d6c7c9900beff /lib/tasks/gitlab/db | |
parent | 4af38885dfee57fee5e7a61ed59987a5454d5714 (diff) | |
download | gitlab-ce-f48fc3c6cbcc0cbcb34cefa2025434c09cf57e04.tar.gz |
Add a rake task that drops all tables
Diffstat (limited to 'lib/tasks/gitlab/db')
-rw-r--r-- | lib/tasks/gitlab/db/drop_all_tables.rake | 10 |
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 |