File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Solid Cable is a database-backed Action Cable adapter that keeps messages in a t
44
55> [ !NOTE]
66> Solid Cable is tested to work with MySQL, SQLite, and PostgreSQL.
7- >
7+ >
88> Action Cable already has a [ dedicated PostgreSQL adapter] ( https://guides.rubyonrails.org/action_cable_overview.html#postgresql-adapter ) ,
99> which utilizes the builtin ` NOTIFY ` command for better performance. However, that
1010> adapter has an 8kb limit on its payload. Solid Cable is a great alternative if you find yourself
@@ -52,6 +52,16 @@ production:
5252
5353Then run `db:prepare` in production to ensure the database is created and the schema is loaded.
5454
55+ # ## Single database configuration
56+
57+ Running Solid Cable in a separate database is recommended, but it's also possible to use a single database for both the app and Action Cable.
58+
59+ 1. Copy the contents of `db/cable_schema.rb` into a normal migration and delete `db/cable_schema.rb`
60+ 2. Remove `connects_to` from `config/cable.yml`
61+ 3. `bin/rails db:migrate`
62+
63+ You won't have multiple databases, so `database.yml` doesn't need to have primary and cable database.
64+
5565# # Configuration
5666
5767All configuration is managed via the `config/cable.yml` file. By default, it'll be configured like this :
You can’t perform that action at this time.
0 commit comments