summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-07-22 17:04:49 +0200
committerValery Sizov <vsv2711@gmail.com>2015-07-23 11:06:57 +0300
commit0e8dd6106bb5579b0897cb7d936879f0cf8d22d0 (patch)
tree0baa9f93d55a267d2f9a7bc9fe929897946ef55e
parentb132127f5c4ed30fbcaef7bdd2314793cc5861fb (diff)
downloadgitlab-ce-0e8dd6106bb5579b0897cb7d936879f0cf8d22d0.tar.gz
Check if session_expire_delay column exists before adding the column.
-rw-r--r--db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
index ffa22e6d5ef..61ff0af41f4 100644
--- a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
+++ b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
@@ -1,5 +1,7 @@
class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration
def change
- add_column :application_settings, :session_expire_delay, :integer, default: 10080, null: false
+ unless column_exists?(:application_settings, :session_expire_delay)
+ add_column :application_settings, :session_expire_delay, :integer, default: 10080, null: false
+ end
end
-end \ No newline at end of file
+end