Sha256: 33985e6696574ea852909b03c8c719d39be21f058d78c2227b0b6bb3f344a947

Contents?: true

Size: 392 Bytes

Versions: 21

Compression:

Stored size: 392 Bytes

Contents

class CreateEmsArticlesArticles < ActiveRecord::Migration
  def up
    # Create the association table
    create_table :ems_articles_articles, :id => false do |t|
      t.integer :article_id, :null => false
      t.integer :related_id, :null => false
    end

    # Add table index
    add_index :ems_articles_articles, [:article_id, :related_id], :unique => true
  end

  def down
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ems-0.0.2 db/migrate/20120403133135_create_ems_articles_articles.rb