Check if session_expire_delay column exists before adding the column.

This commit is contained in:
Marin Jankovski 2015-07-22 17:04:49 +02:00
parent 39dc39e335
commit 6e08e7aac4

View file

@ -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
end