gitlabhq/db/migrate/20121122145155_convert_group_to_namespace.rb

14 lines
290 B
Ruby
Raw Normal View History

class ConvertGroupToNamespace < ActiveRecord::Migration
def up
rename_table 'groups', 'namespaces'
add_column :namespaces, :type, :string, null: true
# Migrate old groups
Namespace.update_all(type: 'Group')
end
def down
raise 'Rollback is not allowed'
end
end