gitlabhq/db/migrate/20121122145155_convert_grou...

14 lines
290 B
Ruby

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