Class: CreateSmartSmsMessages

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

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :smart_sms_messages do |t|
    t.string :sid
    t.string :mobile
    t.datetime :send_time
    t.text :text
    t.string :code
    t.string :send_status
    t.string :report_status
    t.string :fee
    t.datetime :user_receive_time
    t.text :error_msg
    t.belongs_to :smsable, polymorphic: true
  end
  add_index :smart_sms_messages, :sid
  add_index :smart_sms_messages, [:smsable_id, :smsable_type]
end