Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20140818125735_add_not_null_constraint_to_group_name.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddNotNullConstraintToGroupName < ActiveRecord::Migration
6   def change
7     ActiveRecord::Base.connection.execute("update groups set name=uuid where name is null or name=''")
8     change_column_null :groups, :name, false
9   end
10 end