Class: CreatePeriluneTask

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/perilune/install/templates/create_periline_tasks.rb

Instance Method Summary collapse

Instance Method Details

#changeObject

rubocop:disable Metrics/MethodLength



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/perilune/install/templates/create_periline_tasks.rb', line 4

def change # rubocop:disable Metrics/MethodLength
  create_table :perilune_tasks do |t|
    t.string :task_klass
    t.jsonb :attrs
    t.string :state
    t.text :tags, array: true, default: []
    t.jsonb :error_data
    t.string :task_type
    t.datetime :processing_at
    t.datetime :processed_at
    t.datetime :failed_at
    t.timestamps
  end
  add_index :perilune_tasks, :tags, using: :gin
end