16470: Avoids crashing when running db:create in development mode.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 17 Aug 2020 17:38:06 +0000 (14:38 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 17 Aug 2020 17:38:06 +0000 (14:38 -0300)
commit56766d265a6f2209ca945e0c4e54726f83aad324
treea6b314478c15ea63a3052a3a891acd0aa05fe4b4
parent4c417c02b975f20938fc40ab007e351ea80d4666
16470: Avoids crashing when running db:create in development mode.

The 'preload_all_models' initializer is now run even when db:create is
called, so it avoids the database to be created on arvbox, for example,
because it attempts to access the database before being created.

This initializer was added 7 years ago and it now seems to not be needed
anymore, so I think it's the cleaner way to resolve this issue.

See: https://github.com/rails/rails/issues/32870

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
services/api/config/initializers/preload_all_models.rb [deleted file]