We can't retrieve the environment within the migration. And when we ran migration on Travis, database name isn't `database_name` but `test_database_name`. Retrieve the database name from the connection is more accurate