Skip to content

Add an update generator to copy new migrations#765

Merged
rosa merged 1 commit into
mainfrom
update-generator
Jul 24, 2026
Merged

Add an update generator to copy new migrations#765
rosa merged 1 commit into
mainfrom
update-generator

Conversation

@rosa

@rosa rosa commented Jul 24, 2026

Copy link
Copy Markdown
Member

Groundwork for shipping schema changes as regular migrations, starting with batch support: new migrations will be optional at first (features degrade gracefully with a deprecation warning) and required in the next major version.

This adds:

  • SolidQueue::UpdateGenerator: bin/rails solid_queue:update (or bin/rails generate solid_queue:update) copies any new migration files shipped with the gem into the application, honoring the Solid Queue database via --database (defaults to queue, so migrations land in the right migrations_paths). Idempotent: already-copied migrations are skipped. There are no migration templates yet — the first one arrives with batches.
  • SolidQueue.deprecator, registered with the application's deprecators, so it follows the app's configured deprecation behavior.
  • Record.warn_about_pending_migrations: the warning helper features guarded behind pending migrations will use, pointing users at solid_queue:update + db:migrate and noting the migrations become required after the next major version.

Extracted from earlier exploratory work (the claimed-executions-by-process-name branch) whose feature ended up not being needed — the migration machinery is what we want to keep.

🤖 Generated with Claude Code

Future schema changes will ship as regular migrations, optional at
first and required in the next major version. `rails solid_queue:update`
(or the solid_queue:update generator directly) copies any new migration
files from the gem to the application, honoring the database the app
uses for Solid Queue via the --database option.

Together with this, add a deprecator for Solid Queue, registered with
the application so it follows the app's deprecation behavior settings,
and a warning helper that features guarded behind pending migrations
can use to instruct users to update.

Extracted from earlier work on linking claimed executions to processes
by name, which ended up not being needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rosa
rosa force-pushed the update-generator branch from 3e3ed9b to dd99440 Compare July 24, 2026 14:22
@rosa
rosa merged commit 29e818d into main Jul 24, 2026
173 of 174 checks passed
@rosa
rosa deleted the update-generator branch July 24, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant