This blog is part of our Rails 6.1 series.
In Rails 6.1, Rails will skip modifications to the test database
SKIP_TEST_DATABASE is set to
Without the environment variable
With the environment variable
As we can see in the first example, both a
development and a
test database were created, which is unexpected when directly invoking
One obvious solution to this problem is to force the
development environment to only create a
However this solution will break
bin/setup as mentioned in this commit.
Hence the need for an environment variable to skip
test database creation.
Check out the pull request for more details.