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_news-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.1 spec/dummy/db/migrate/154_create_messages.rb
enju_circulation-0.2.1 spec/dummy/db/migrate/154_create_messages.rb
enju_question-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_inventory-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_purchase_request-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_search_log-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_bookmark-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_loc-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_circulation-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_event-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_oai-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_nii-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_ndl-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_subject-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_library-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_biblio-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_leaf-1.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_seed-0.2.0 spec/dummy/db/migrate/154_create_messages.rb
enju_leaf-1.2.0.beta.4 spec/dummy/db/migrate/154_create_messages.rb