+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
# Protect referential integrity of owner_uuid columns in other tables
# that can refer to the uuid column in this table.
ActiveRecord::Base.connection.tables.each do |t|
next if t == base.table_name
next if t == 'schema_migrations'
+ next if t == 'permission_refresh_lock'
klass = t.classify.constantize
next unless klass and 'owner_uuid'.in?(klass.columns.collect(&:name))
base.has_many(t.to_sym,