Class: CreateSmalltalkTables

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
# File 'lib/generators/active_record/templates/migration.rb', line 2

def self.change

  create_table "smalltalk_messages", :force => true do |t|
    t.integer  "sender_id",      :null => false
    t.string   "sender_type",    :null => false
    t.integer  "recipient_id",   :null => false
    t.string   "recipient_type", :null => false
    t.integer  "context_id",      :null => false
    t.string   "context_type",    :null => false
    t.text     "content"
    t.boolean  "viewed"
    t.boolean  "hidden"
    t.string   "workflow_state"
    t.datetime "created_at",     :null => false
    t.datetime "updated_at",     :null => false
  end

  add_index "smalltalk_messages", ["recipient_id", "recipient_type"], :name => "index_smalltalk_messages_on_recipient_id_and_recipient_type"
  add_index "smalltalk_messages", ["sender_id", "sender_type"], :name => "index_smalltalk_messages_on_sender_id_and_sender_type"
 
end