2016-06-09 08:39:16 -04:00
|
|
|
# rubocop:disable all
|
2015-08-12 02:13:20 -04:00
|
|
|
require 'yaml'
|
|
|
|
|
2018-11-13 02:27:31 -05:00
|
|
|
class AddSettingsImportSources < ActiveRecord::Migration[4.2]
|
2015-08-12 02:13:20 -04:00
|
|
|
def change
|
|
|
|
unless column_exists?(:application_settings, :import_sources)
|
|
|
|
add_column :application_settings, :import_sources, :text
|
|
|
|
import_sources = YAML::dump(Settings.gitlab['import_sources'])
|
|
|
|
execute("update application_settings set import_sources = '#{import_sources}'")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|