Sha256: 67faf894346b9def8b7ab41597ae237e461291b00edc040600e09e01fa0b5eb3

Contents?: true

Size: 992 Bytes

Versions: 17

Compression:

Stored size: 992 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration<%= Rails::VERSION::MAJOR >= 5 ? "[#{ActiveRecord::Migration.current_version}]" : "" %>
  def change
    # columns for CronoTrigger::Schedulable
    add_column :<%= table_name %>, :cron, :string
    add_column :<%= table_name %>, :next_execute_at, :datetime
    add_column :<%= table_name %>, :last_executed_at, :datetime
    add_column :<%= table_name %>, :timezone, :string
    add_column :<%= table_name %>, :execute_lock, :integer, limit: 8, default: 0, null: false
    add_column :<%= table_name %>, :locked_by, :string
    add_column :<%= table_name %>, :started_at, :datetime, null: false
    add_column :<%= table_name %>, :finished_at, :datetime
    add_column :<%= table_name %>, :last_error_name, :string
    add_column :<%= table_name %>, :last_error_reason, :string
    add_column :<%= table_name %>, :last_error_time, :string
    add_column :<%= table_name %>, :retry_count, :integer, default: 0, null: false
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
crono_trigger-0.8.3 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.8.1 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.8.0 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.7.1 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.7.0 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.6.4 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.6.3 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.6.2 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.6.1 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.6.0 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.5.4 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.5.3 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.5.2 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.5.1 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.5.0 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.4.0 lib/generators/crono_trigger/migration/templates/migration.rb
crono_trigger-0.3.4 lib/generators/crono_trigger/migration/templates/migration.rb