lib/generators/crono_trigger/install/templates/install.rb in crono_trigger-0.4.0 vs lib/generators/crono_trigger/install/templates/install.rb in crono_trigger-0.5.0

- old
+ new

@@ -17,7 +17,22 @@ t.datetime :sent_at, null: false t.datetime :received_at end add_index :crono_trigger_signals, [:sent_at, :worker_id] + + create_table :crono_trigger_executions do |t| + t.integer :schedule_id, null: false + t.string :schedule_type, null: false + t.string :worker_id, null: false + t.datetime :executed_at, null: false + t.datetime :completed_at + t.string :status, null: false, default: "executing" + t.string :error_name + t.string :error_reason + end + + add_index :crono_trigger_executions, [:schedule_type, :schedule_id, :executed_at], name: "index_crono_trigger_executions_on_schtype_schid_executed_at" + add_index :crono_trigger_executions, [:schedule_type, :executed_at] + add_index :crono_trigger_executions, [:executed_at] end end