Exception: Smith::PersistenceSchemaMismatch
- Defined in:
- lib/smith/errors.rb
Overview
Raised when restoring a persisted payload whose schema_version does not match the workflow’s current persistence_schema_version AND no migration block is registered to bridge the gap. Hosts fix this by adding ‘migrate_from(stored) do |payload| … end` to the workflow class, or by bumping persistence_schema_version to match the stored version. Downgrades (stored > current) always raise; Smith has no rollback semantics.
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#stored ⇒ Object
readonly
Returns the value of attribute stored.
-
#workflow ⇒ Object
readonly
Returns the value of attribute workflow.
Instance Method Summary collapse
-
#initialize(workflow:, stored:, current:) ⇒ PersistenceSchemaMismatch
constructor
A new instance of PersistenceSchemaMismatch.
Constructor Details
#initialize(workflow:, stored:, current:) ⇒ PersistenceSchemaMismatch
Returns a new instance of PersistenceSchemaMismatch.
171 172 173 174 175 176 |
# File 'lib/smith/errors.rb', line 171 def initialize(workflow:, stored:, current:) @workflow = workflow @stored = stored @current = current super((workflow, stored, current)) end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
169 170 171 |
# File 'lib/smith/errors.rb', line 169 def current @current end |
#stored ⇒ Object (readonly)
Returns the value of attribute stored.
169 170 171 |
# File 'lib/smith/errors.rb', line 169 def stored @stored end |
#workflow ⇒ Object (readonly)
Returns the value of attribute workflow.
169 170 171 |
# File 'lib/smith/errors.rb', line 169 def workflow @workflow end |