2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class SetDefaultS3Region < ActiveRecord::Migration[4.2]
|
2015-05-25 11:59:00 -04:00
|
|
|
def up
|
|
|
|
execute <<-SQL
|
|
|
|
UPDATE site_settings
|
|
|
|
SET value = 'us-east-1'
|
|
|
|
WHERE name = 's3_region'
|
|
|
|
AND LENGTH(COALESCE(value, '')) = 0
|
|
|
|
SQL
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|