Commit c64775e2 authored by Michael Kozono's avatar Michael Kozono Committed by Kamil Trzciński

Fix the backported migration

For those who upgraded to a version that included the previous
backport implementation with migration 20190311132500.
parent 225edb0d
...@@ -6,10 +6,14 @@ class AddDefaultProjectCreationSetting < ActiveRecord::Migration[4.2] ...@@ -6,10 +6,14 @@ class AddDefaultProjectCreationSetting < ActiveRecord::Migration[4.2]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
unless column_exists?(:application_settings, :default_project_creation)
add_column_with_default(:application_settings, :default_project_creation, :integer, default: 2) add_column_with_default(:application_settings, :default_project_creation, :integer, default: 2)
end end
end
def down def down
if column_exists?(:application_settings, :default_project_creation)
remove_column(:application_settings, :default_project_creation) remove_column(:application_settings, :default_project_creation)
end end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment