Fixed db error during build

This commit is contained in:
Martin Artnik 2021-07-20 10:20:47 +02:00
parent 3a281ce9dc
commit c43e1cfbe5

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)"