BigW Consortium Gitlab

Commit 083c0e28 by Z.J. van de Weg

Support empty PG database too

First check if there is a result on the migration, else there is nothing to do
parent 52cc64a8
......@@ -8,12 +8,11 @@ class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration
require 'yaml'
import_sources = connection.execute('SELECT import_sources FROM application_settings;')
return unless import_sources.first # support empty databases
yaml = if Gitlab::Database.postgresql?
import_sources.values[0][0]
else
return unless import_sources.first
import_sources.first[0]
end
......
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