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:
authorKamil Trzciński <ayufan@ayufan.eu>2019-04-09 01:10:21 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-04-09 01:10:21 +0300
commit61ed92396814dcd97e787e1f7c44c05078df7118 (patch)
tree70a5158f4d519f4e41d17fefb48fcc6fe7dc4e64
parent225edb0d2d7737cf52ef5cd358082d08e20feaa4 (diff)
parentc64775e24cfe5aacf4c3511e7280f32dd551a4df (diff)
Merge branch 'mk/follow-up-fix-default-project-creation-migration' into 'master'
Fix default_project_creation already exists See merge request gitlab-org/gitlab-ce!27144
-rw-r--r--db/migrate/20180115094742_add_default_project_creation_setting.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/db/migrate/20180115094742_add_default_project_creation_setting.rb b/db/migrate/20180115094742_add_default_project_creation_setting.rb
index 22de39e1672..465a89c39e8 100644
--- a/db/migrate/20180115094742_add_default_project_creation_setting.rb
+++ b/db/migrate/20180115094742_add_default_project_creation_setting.rb
@@ -6,10 +6,14 @@ class AddDefaultProjectCreationSetting < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
- add_column_with_default(:application_settings, :default_project_creation, :integer, default: 2)
+ unless column_exists?(:application_settings, :default_project_creation)
+ add_column_with_default(:application_settings, :default_project_creation, :integer, default: 2)
+ end
end
def down
- remove_column(:application_settings, :default_project_creation)
+ if column_exists?(:application_settings, :default_project_creation)
+ remove_column(:application_settings, :default_project_creation)
+ end
end
end