Sha256: 7e109aa04b8ca15e361da64d3418d83ccfe8747da619269e7df457dc69acf8da

Contents?: true

Size: 740 Bytes

Versions: 15

Compression:

Stored size: 740 Bytes

Contents

class CreateTasqueTasks < ActiveRecord::Migration[4.2]
  def change
    create_table :tasque_tasks do |t|
      t.string :tag
      t.string :task
      t.text :params
      t.text :result
      t.string :worker
      t.integer :priority, default: 0
      t.integer :attempts, default: 0
      t.integer :progress, default: 0
      t.string :status, default: 'new'
  
      t.datetime :started_at
      t.datetime :finished_at
  
      t.timestamps
    end

    add_index :tasque_tasks, [:status, :task]
    add_index :tasque_tasks, :status
    add_index :tasque_tasks, :tag     
    add_index :tasque_tasks, :task
    add_index :tasque_tasks, :worker
    add_index :tasque_tasks, :priority
    add_index :tasque_tasks, :attempts
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tasque-0.2.5 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.2.4 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.2.3 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.2.2 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.2.1 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.2.0 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.1.1 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.1.0 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.9 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.8 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.7 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.6 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.5 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.4 lib/generators/tasque/templates/create_tasque_tasks.erb
tasque-0.0.3 lib/generators/tasque/templates/create_tasque_tasks.erb