Sha256: 455487de5f379556374d9eba34910deebdd6218c95f29a240ae74ba52568c3b8

Contents?: true

Size: 549 Bytes

Versions: 228

Compression:

Stored size: 549 Bytes

Contents

class CreateMessages < ActiveRecord::Migration
  def self.up
    create_table :messages, :force => true do |t|
      t.datetime :read_at
      t.integer  :receiver_id, :sender_id
      t.string   :subject, :null => false
      t.text     :body
      t.integer :message_request_id
      t.integer :parent_id

      t.timestamps
    end

    add_index :messages, :sender_id
    add_index :messages, :receiver_id
    add_index :messages, :message_request_id
    add_index :messages, :parent_id
  end

  def self.down
    drop_table :messages
  end
end

Version data entries

228 entries across 221 versions & 20 rubygems

Version Path
enju_circulation-0.2.0.beta.3 spec/dummy/db/migrate/154_create_messages.rb
enju_message-0.2.0.beta.4 db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.9 spec/dummy/db/migrate/154_create_messages.rb
enju_leaf-1.2.0.beta.3 spec/dummy/db/migrate/154_create_messages.rb
enju_seed-0.2.0.beta.6 spec/dummy/db/migrate/154_create_messages.rb
enju_bookmark-0.2.0.beta.3 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.8 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.7 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.6 spec/dummy/db/migrate/154_create_messages.rb
enju_event-0.2.0.beta.3 spec/dummy/db/migrate/154_create_messages.rb
enju_message-0.2.0.beta.3 db/migrate/154_create_messages.rb
enju_biblio-0.2.0.beta.3 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.5 spec/dummy/db/migrate/154_create_messages.rb
enju_ndl-0.2.0.beta.2 spec/dummy/db/migrate/154_create_messages.rb
enju_seed-0.2.0.beta.5 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0.beta.4 spec/dummy/db/migrate/154_create_messages.rb
enju_seed-0.2.0.beta.4 spec/dummy/db/migrate/154_create_messages.rb
enju_circulation-0.2.0.beta.2 spec/dummy/db/migrate/154_create_messages.rb
enju_event-0.2.0.beta.2 spec/dummy/db/migrate/154_create_messages.rb
enju_message-0.2.0.beta.2 db/migrate/154_create_messages.rb