summaryrefslogtreecommitdiff
path: root/db/migrate/20191023152913_add_default_and_free_plans.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20191023152913_add_default_and_free_plans.rb')
-rw-r--r--db/migrate/20191023152913_add_default_and_free_plans.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/db/migrate/20191023152913_add_default_and_free_plans.rb b/db/migrate/20191023152913_add_default_and_free_plans.rb
deleted file mode 100644
index 4f5f8000386..00000000000
--- a/db/migrate/20191023152913_add_default_and_free_plans.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class AddDefaultAndFreePlans < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- class Plan < ApplicationRecord
- end
-
- def up
- plan_names.each do |plan_name|
- Plan.create_with(title: plan_name.titleize).find_or_create_by(name: plan_name)
- end
- end
-
- def down
- Plan.where(name: plan_names).delete_all
- end
-
- private
-
- def plan_names
- [
- ('free' if Gitlab.com?),
- 'default'
- ].compact
- end
-end