Merge pull request #3449 from biosistemika/build_db_error_fix

Fixed db error during build
This commit is contained in:
artoscinote 2021-07-20 13:28:09 +02:00 committed by GitHub
commit de3d6871a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,8 @@ module PrefixedIdModel
# rubocop:disable Rails/Output
puts("\nWARNING missing index\n#{indexdef}\nfor prefixed id model #{name}!\n\n") unless index_exists
# rubocop:enable Rails/Output
rescue ActiveRecord::NoDatabaseError # only applicable when setting up project
rescue ActiveRecord::NoDatabaseError, ActiveRecord::ConnectionNotEstablished
# only applicable during build and when setting up project
end
self::PREFIXED_ID_SQL = "('#{self::ID_PREFIX}' || #{table_name}.id)"