Class: CreateMalletTables

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

Class Method Summary collapse

Class Method Details

.changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/generators/active_record/templates/migration.rb', line 2

def self.change

  create_table "mallet_mails", :force => true do |t|
    t.string "definition"
    t.string "malletable_type"
    t.string "malletable_id"
    t.string "workflow_state"
    t.string "message_id"
    t.text "data"
    t.float "wait_time"
    t.date "send_date"
    t.timestamps
  end

  add_index "mallet_mails", ["definition"], :name => "index_mallet_mails_on_definition"
  add_index "mallet_mails", ["malletable_type", "malletable_id"], :name => "index_mallet_mails_on_malletable_type_and_malletable_id"
  add_index "mallet_mails", ["send_date"], :name => "index_mallet_mails_on_send_date"

  create_table "delayed_jobs", :force => true do |t|
    t.integer  "priority",   :default => 0
    t.integer  "attempts",   :default => 0
    t.text     "handler"
    t.text     "last_error"
    t.datetime "run_at"
    t.datetime "locked_at"
    t.datetime "failed_at"
    t.string   "locked_by"
    t.string   "queue"
    t.datetime "created_at",                :null => false
    t.datetime "updated_at",                :null => false
  end

  add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
 
end