@@ -74,6 +74,7 @@ tested, but the project does not yet claim production readiness. See
7474- [ Cloudflare Durable Objects for Rails] ( #cloudflare-durable-objects-for-rails )
7575- [ Reactive ERB] ( #reactive-erb )
7676- [ Installation] ( #installation )
77+ - [ Upgrading] ( #upgrading )
7778- [ Worker requirements] ( #worker-requirements )
7879- [ Defining an actor] ( #defining-an-actor )
7980- [ Actor identity] ( #actor-identity )
@@ -337,6 +338,50 @@ can generate the gem RBI with:
337338bundle exec tapioca gem solid_objects
338339```
339340
341+ ## Upgrading
342+
343+ Review [ CHANGELOG.md] ( CHANGELOG.md ) for compatibility and deployment-order
344+ notes, then update the gem:
345+
346+ ``` bash
347+ bundle update solid_objects
348+ ```
349+
350+ If the ` Gemfile ` pins an exact version, update that constraint first and run
351+ ` bundle install ` . Commit both ` Gemfile.lock ` and the copied Solid Objects
352+ migrations.
353+
354+ Copy only migrations that the newer gem has added, migrate, and verify the
355+ installation:
356+
357+ ``` bash
358+ bin/rails solid_objects:install:migrations
359+ bin/rails db:migrate
360+ bin/rails solid_objects:doctor
361+ ```
362+
363+ The migration task skips engine migrations already present in the application
364+ and gives new migrations host-specific timestamps. Inspect the resulting
365+ ` db/migrate/*.solid_objects.rb ` files before applying them. Do not rerun
366+ ` generate solid_objects:install ` during an upgrade because that also attempts
367+ to regenerate the application initializer.
368+
369+ When Solid Objects uses a separate database configuration named ` actors ` , copy
370+ and run migrations through that database's configured migration path:
371+
372+ ``` bash
373+ DATABASE=actors bin/rails solid_objects:install:migrations
374+ bin/rails db:migrate:actors
375+ bin/rails solid_objects:doctor
376+ ```
377+
378+ For production, back up the actor database and run new migrations before
379+ starting application or Solid Objects worker processes that require the new
380+ schema. Restart the web and Solid Objects worker fleet after the bundle and
381+ schema are current. For releases that change actor state versions, also follow
382+ the [ state migration and rolling-deployment guide] ( docs/state-migrations.md ) ;
383+ Rails schema migrations and actor state migrations are separate concerns.
384+
340385## Worker requirements
341386
342387Synchronous actors can be adopted without adding a long-running process. Start
0 commit comments