Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/ci/migrate/20150324001227_migrate_shared_runners.rb')
-rw-r--r--db/ci/migrate/20150324001227_migrate_shared_runners.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/ci/migrate/20150324001227_migrate_shared_runners.rb b/db/ci/migrate/20150324001227_migrate_shared_runners.rb
new file mode 100644
index 00000000000..1d86aa7368c
--- /dev/null
+++ b/db/ci/migrate/20150324001227_migrate_shared_runners.rb
@@ -0,0 +1,11 @@
+class MigrateSharedRunners < ActiveRecord::Migration
+ def up
+ #all shared runners should remain to be shared
+ execute("UPDATE runners SET is_shared = true WHERE id NOT IN (SELECT runner_id FROM runner_projects)");
+
+ Project.update_all(shared_runners_enabled: true)
+ end
+
+ def down
+ end
+end