mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-10 13:59:56 +08:00
Merge pull request #3449 from biosistemika/build_db_error_fix
Fixed db error during build
This commit is contained in:
commit
de3d6871a6
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,8 @@ module PrefixedIdModel
|
||||||
# rubocop:disable Rails/Output
|
# rubocop:disable Rails/Output
|
||||||
puts("\nWARNING missing index\n#{indexdef}\nfor prefixed id model #{name}!\n\n") unless index_exists
|
puts("\nWARNING missing index\n#{indexdef}\nfor prefixed id model #{name}!\n\n") unless index_exists
|
||||||
# rubocop:enable Rails/Output
|
# 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
|
end
|
||||||
|
|
||||||
self::PREFIXED_ID_SQL = "('#{self::ID_PREFIX}' || #{table_name}.id)"
|
self::PREFIXED_ID_SQL = "('#{self::ID_PREFIX}' || #{table_name}.id)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue