Skip to content

Commit 77b07cc

Browse files
Document single database configuration
Creates parity with documentation for [Solid Cable][1] and [Solid Queue][2]. [1]: https://github.com/rails/solid_cable?tab=readme-ov-file#single-database-configuration [2]: https://github.com/rails/solid_queue?tab=readme-ov-file#single-database-configuration
1 parent 002656e commit 77b07cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ production:
4141
4242
Then run `db:prepare` in production to ensure the database is created and the schema is loaded.
4343

44+
### Single database configuration
45+
46+
Running Solid Cache in a separate database is recommended, but it's also possible to use one single database for both the app and the queue. Follow these steps:
47+
48+
1. Copy the contents of `db/cache_schema.rb` into a normal migration and delete `db/cache_schema.rb`
49+
2. Migrate your database.
50+
51+
You won't have multiple databases, so `database.yml` doesn't need to have primary and cache database.
52+
4453
## Configuration
4554

4655
Configuration will be read from `config/cache.yml` or `config/solid_cache.yml`. You can change the location of the config file by setting the `SOLID_CACHE_CONFIG` env variable.

0 commit comments

Comments
 (0)