Single Database Configuration steps:
rails g migration singlify_solid_cable (or whatever you want to call it)
Copy the contents of db/cable_schema.rb into the migration. Mine ended up looking like this:
class SinglifySolidCable < ActiveRecord::Migration[8.0]
def change
create_table "solid_cable_messages", force: :cascade do |t|
t.binary "channel", limit: 1024, null: false
t.binary "payload", limit: 536870912, null: false
t.datetime "created_at", null: false
t.integer "channel_hash", limit: 8, null: false
t.index ["channel"], name: "index_solid_cable_messages_on_channel"
t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash"
t.index ["created_at"], name: "index_solid_cable_messages_on_created_at"
end
end
end
Delete db/cable_schema.rb.
Modify config/cable.yml to look like this:
development:
adapter: solid_cable
polling_interval: 0.1.seconds
message_retention: 1.day
test:
adapter: test
production:
adapter: solid_cable
polling_interval: 0.1.seconds
message_retention: 1.day
Run
rails db/migrate
Restart any processes you have open