Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20140407135544_fix_namespaces.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 59665d538f00917d2a885f70801cda1683a8a930 (plain)
1
2
3
4
5
6
7
8
9
10
class FixNamespaces < ActiveRecord::Migration
  def up
    Namespace.where('name <> path and type is null').each do |namespace|
      namespace.update_attribute(:name, namespace.path)
    end
  end

  def down
  end
end