Class: CreateAfterpartyJobs

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/jobs_migration.rb

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
# File 'lib/generators/templates/jobs_migration.rb', line 17

def self.down
  drop_table :afterparty_jobs
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/templates/jobs_migration.rb', line 2

def self.up
  create_table :afterparty_jobs do |t|
    t.text :job_dump
    t.string :queue
    t.datetime :execute_at
    t.boolean :completed
    t.boolean :has_error
    t.text :error_message
    t.text :error_backtrace
    t.datetime :completed_at

    t.timestamps
  end
end