Sha256: c71589b4a02f0dd179839d7de123e0fce5ab0018fbe985f69aaff9c750a4bf19

Contents?: true

Size: 372 Bytes

Versions: 21

Compression:

Stored size: 372 Bytes

Contents

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

    # Add table index
    add_index :ems_articles_tags, [:article_id, :tag_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/20120402104345_create_ems_articles_tags.rb