Class: Fleiss::Backend::ActiveRecord::Migration

Inherits:
Object
  • Object
show all
Defined in:
lib/fleiss/backend/active_record/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fleiss/backend/active_record/migration.rb', line 7

def change
  create_table :fleiss_jobs do |t|
    t.string :queue_name, limit: 50, null: false
    t.integer :priority, limit: 2, null: false, default: 10
    t.text :payload, null: false
    t.timestamp :scheduled_at, null: false
    t.timestamp :started_at
    t.timestamp :finished_at
    t.timestamp :expires_at
    t.string :owner, limit: 100

    t.index :queue_name
    t.index :priority
    t.index :scheduled_at
    t.index :finished_at
    t.index :expires_at
    t.index :owner
  end
end