Class: CreateFlowStateFlowTransitions

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/flow_state/templates/create_flow_state_flow_transitions.rb

Overview

Tbale for flow transition changes

Instance Method Summary collapse

Instance Method Details

#changeObject



5
6
7
8
9
10
11
12
# File 'lib/generators/flow_state/templates/create_flow_state_flow_transitions.rb', line 5

def change
  create_table :flow_state_flow_transitions do |t|
    t.references :flow, null: false, foreign_key: { to_table: :flow_state_flows }
    t.string :transitioned_from, null: false
    t.string :transitioned_to,   null: false
    t.timestamps
  end
end