From e63ce3d62ac47b32a466a18b816d9daac9baf412 Mon Sep 17 00:00:00 2001 From: Josue Barros Date: Fri, 27 Nov 2026 12:39:42 -0300 Subject: [PATCH 1/2] Warn about db:prepare when adding a queue database Document that db:prepare is application-wide and can run seeds or unrelated migrations; existing production apps should initialize only the queue database and load db/queue_schema.rb. Refs #836 Assisted-by: opencode:deepseek-flash Signed-off-by: Josue Barros --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac408f7a6..c4efdf140 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,14 @@ production: migrations_paths: db/queue_migrate ``` -Then run `db:prepare` in production to ensure the database is created and the schema is loaded. +> [!WARNING] +> `db:prepare` is application-wide. When adding a separate queue database to an +existing production application, it can run the application's seeds and pending +migrations for the primary or other databases. Do not use `db:prepare` solely to +install Solid Queue there; initialize only the queue database and load +`db/queue_schema.rb` into it with your deployment tooling. + +Then run `db:prepare` in production only when application-wide database preparation is intended, such as for a new application or disposable database. For an existing production application adding a queue database, skip it and initialize only the queue database as described above. Now you're ready to start processing jobs by running `bin/jobs` on the server that's doing the work. This will start processing jobs in all queues using the default configuration. See [below](#configuration) to learn more about configuring Solid Queue. From a4676fa88cfa1b606e92d208d42cb0577015f252 Mon Sep 17 00:00:00 2001 From: Josue Barros Date: Fri, 27 Nov 2026 16:44:29 -0300 Subject: [PATCH 2/2] Wrap the db:prepare guidance --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4efdf140..9a6d28b27 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,10 @@ migrations for the primary or other databases. Do not use `db:prepare` solely to install Solid Queue there; initialize only the queue database and load `db/queue_schema.rb` into it with your deployment tooling. -Then run `db:prepare` in production only when application-wide database preparation is intended, such as for a new application or disposable database. For an existing production application adding a queue database, skip it and initialize only the queue database as described above. +Then run `db:prepare` in production only when application-wide database preparation +is intended, such as for a new application or disposable database. For an existing +production application adding a queue database, skip it and initialize only the +queue database as described above. Now you're ready to start processing jobs by running `bin/jobs` on the server that's doing the work. This will start processing jobs in all queues using the default configuration. See [below](#configuration) to learn more about configuring Solid Queue.