Sha256: 9d57c2f97705682d67b3375a1bdabc52cda77967023d50145fe901b4008608b1

Contents?: true

Size: 1009 Bytes

Versions: 10

Compression:

Stored size: 1009 Bytes

Contents

class SayWhenMigration < ActiveRecord::Migration
  def self.up

    create_table :say_when_jobs, :force => true do |t|

      t.string    :group
      t.string    :name

      t.string    :status

      t.string    :trigger_strategy
      t.text      :trigger_options

      t.timestamp :last_fire_at
      t.timestamp :next_fire_at

      t.timestamp :start_at
      t.timestamp :end_at

      t.string    :job_class
      t.string    :job_method
      t.text      :data

      t.string    :scheduled_type
      t.integer   :scheduled_id

      t.timestamps
    end

    create_table :say_when_job_executions, :force => true do |t|
      t.integer  :job_id
      t.string   :status
      t.text     :result
      t.datetime :start_at
      t.datetime :end_at
    end
    
    add_index :say_when_jobs, :status
    add_index :say_when_jobs, :next_fire_at
    add_index :say_when_job_executions, :job_id
  end

  
  def self.down
    drop_table :say_when_job_executions
    drop_table :say_when_jobs
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
say_when-0.4.1 generators/say_when_migration/templates/migration.rb
say_when-0.4.0 generators/say_when_migration/templates/migration.rb
say_when-0.3.0 generators/say_when_migration/templates/migration.rb
say_when-0.2.6 generators/say_when_migration/templates/migration.rb
say_when-0.2.5 generators/say_when_migration/templates/migration.rb
say_when-0.2.4 generators/say_when_migration/templates/migration.rb
say_when-0.2.3 generators/say_when_migration/templates/migration.rb
say_when-0.2.1 generators/say_when_migration/templates/migration.rb
say_when-0.2.0 generators/say_when_migration/templates/migration.rb
say_when-0.1.0 generators/say_when_migration/templates/migration.rb