projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17528: Don't load config when doing assets:precompile in postinst.
[arvados.git]
/
services
/
api
/
lib
/
can_be_an_owner.rb
diff --git
a/services/api/lib/can_be_an_owner.rb
b/services/api/lib/can_be_an_owner.rb
index 4375d775350cd9001353231339ec38e3e5d33c86..6f30f5ae33801afabd6c6a5e3fa6805c05e628fa 100644
(file)
--- a/
services/api/lib/can_be_an_owner.rb
+++ b/
services/api/lib/can_be_an_owner.rb
@@
-1,3
+1,7
@@
+# 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.
# Protect referential integrity of owner_uuid columns in other tables
# that can refer to the uuid column in this table.
@@
-11,6
+15,10
@@
module CanBeAnOwner
ActiveRecord::Base.connection.tables.each do |t|
next if t == base.table_name
next if t == 'schema_migrations'
ActiveRecord::Base.connection.tables.each do |t|
next if t == base.table_name
next if t == 'schema_migrations'
+ next if t == 'permission_refresh_lock'
+ next if t == 'ar_internal_metadata'
+ next if t == 'commit_ancestors'
+ next if t == 'commits'
klass = t.classify.constantize
next unless klass and 'owner_uuid'.in?(klass.columns.collect(&:name))
base.has_many(t.to_sym,
klass = t.classify.constantize
next unless klass and 'owner_uuid'.in?(klass.columns.collect(&:name))
base.has_many(t.to_sym,