Class: AddStateToNexoWorkflowRuns
- Inherits:
-
Object
- Object
- AddStateToNexoWorkflowRuns
- Defined in:
- lib/generators/nexo/state/templates/add_state_to_nexo_workflow_runs.rb
Overview
Additive migration for apps installed before Spec 13 (fresh installs get the column from create_nexo_workflow_runs directly). Portable json object column, default {} — it holds one entry per completed checkpoint plus the reserved "suspend" suspend metadata. The migration version is resolved from the host app's ActiveRecord rather than hardcoded, so it tracks whatever Rails is installed.
Instance Method Summary collapse
-
#change ⇒ Object
Adds the
statejson object column (default{}) tonexo_workflow_runs.
Instance Method Details
#change ⇒ Object
Adds the state json object column (default {}) to nexo_workflow_runs.
10 11 12 |
# File 'lib/generators/nexo/state/templates/add_state_to_nexo_workflow_runs.rb', line 10 def change add_column :nexo_workflow_runs, :state, :json, null: false, default: {} end |