Skip to content

bin/rails solid_queue:install generate queue_schema.rb instead of structure.sql when config.active_record.schema_format equal :sql #621

Description

@mdotvasylenchuk

In my app, I use the SQL schema format. When I generate configs using solid_queue:install, it generates queue_schema.rb, which cannot be read because the app does not use the default schema format.
I fixed this issue as follows:

  1. Run rails solid_queue:install
  2. Comment out config.active_record.schema_format = :sql in my app configs
  3. Run rails db:prepare
  4. Uncomment config.active_record.schema_format = :sql in my configs
  5. Run rails db:migrate:queue

After that, I got the queue_structure.sql that I needed. It feels a little bit tricky, so maybe it would be better to generate queue_structure.sql when rails solid_queue:install is run?

Ruby and gems versions:
Ruby 3.3.6
Rails 8.0.2
Solid queue 1.2.1

Activity

  1. hallmatt commented on Sep 18, 2025

    @hallmatt

    I've had the same issue with rails db:prepare with some of my older projects I've upgraded to newer versions of rails. I've always been perplexed why solid_queue tables are always a pain to add...this did the trick!
    I'll have to dig into whether my app actually needs config.active_record.schema_format = :sql...seems like the rails 8.x default is to omit this line.

    Seems like there's quite a few issues open in rails / solid_queue circling around this issue. Seems like it might be a rails issue:

    rails/rails#52829
    #394
    #525

  2. richardkmichael commented on Jan 13, 2026

    @richardkmichael

    I've hit this a few times because it's common to change to SQL format for database extensions, e.g., full text search. @mdotvasylenchuk Thanks for the workaround.

  3. ringe commented on Jan 27, 2026

    @ringe

    Seems like this was an issue with the installer not looking at the app for what schema format to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions