summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-10-23 16:51:44 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-10-23 17:39:22 +0200
commit122f02bc39c690b7fef69f57075380ca82c25b46 (patch)
treef94c5e3ab7a3d3fbd61310a4ae6b69c20e31b6e7 /db
parent0bb50ea081e6817e6d67c4f1dbe08f3d2fd720e1 (diff)
downloadgitlab-ce-122f02bc39c690b7fef69f57075380ca82c25b46.tar.gz
Remove the contents of the satellites dirremove-satellites
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20151023144219_remove_satellites.rb17
-rw-r--r--db/schema.rb2
2 files changed, 18 insertions, 1 deletions
diff --git a/db/migrate/20151023144219_remove_satellites.rb b/db/migrate/20151023144219_remove_satellites.rb
new file mode 100644
index 00000000000..e73f300028a
--- /dev/null
+++ b/db/migrate/20151023144219_remove_satellites.rb
@@ -0,0 +1,17 @@
+require 'fileutils'
+
+class RemoveSatellites < ActiveRecord::Migration
+ def up
+ satellites = Gitlab.config['satellites']
+ return if satellites.nil?
+
+ satellites_path = satellites['path']
+ return if satellites_path.nil?
+
+ FileUtils.rm_rf(satellites_path)
+ end
+
+ def down
+ # Do nothing
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 1551956c8bc..0fe113325fa 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151023112551) do
+ActiveRecord::Schema.define(version: 20151023144219) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"