projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '15112-migration'
[arvados.git]
/
services
/
api
/
db
/
migrate
/
20140818125735_add_not_null_constraint_to_group_name.rb
diff --git
a/services/api/db/migrate/20140818125735_add_not_null_constraint_to_group_name.rb
b/services/api/db/migrate/20140818125735_add_not_null_constraint_to_group_name.rb
index 1b074705c370cd479fca9408f38364d3409a4a2b..9f003ba8d6ca884116b0a540898659981562f41b 100644
(file)
--- a/
services/api/db/migrate/20140818125735_add_not_null_constraint_to_group_name.rb
+++ b/
services/api/db/migrate/20140818125735_add_not_null_constraint_to_group_name.rb
@@
-1,4
+1,8
@@
-class AddNotNullConstraintToGroupName < ActiveRecord::Migration
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+class AddNotNullConstraintToGroupName < ActiveRecord::Migration[4.2]
def change
ActiveRecord::Base.connection.execute("update groups set name=uuid where name is null or name=''")
change_column_null :groups, :name, false
def change
ActiveRecord::Base.connection.execute("update groups set name=uuid where name is null or name=''")
change_column_null :groups, :name, false