Commit e683eecd authored by Z.J. van de Weg's avatar Z.J. van de Weg

Support MySQL too, when removing gitorious from import_sources

parent 2246218c
...@@ -7,7 +7,11 @@ class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration ...@@ -7,7 +7,11 @@ class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration
def up def up
require 'yaml' require 'yaml'
yaml = connection.execute('SELECT import_sources FROM application_settings;').values[0][0] yaml = if Gitlab::Database.postgresql?
connection.execute('SELECT import_sources FROM application_settings;').values[0][0]
else
connection.execute('SELECT import_sources FROM application_settings;').first[0]
end
yaml = YAML.safe_load(yaml) yaml = YAML.safe_load(yaml)
yaml.delete 'gitorious' yaml.delete 'gitorious'
......
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