Skip to content
Snippets Groups Projects
Commit e683eecd authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Support MySQL too, when removing gitorious from import_sources

parent 2246218c
No related branches found
No related tags found
No related merge requests found
Loading
@@ -7,7 +7,11 @@ class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration
Loading
@@ -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'
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment