Project

General

Profile

RE: Contacts plugin ยป 009_create_taggings.rb

Kirill Bezrukov (RedmineUP), 2011-02-21 13:37

 
1
class CreateTaggings < ActiveRecord::Migration
2
  def self.up
3
    create_table :taggings, :id => false do |t|
4
      t.column :tag_id, :integer
5
      t.column :container_id, :integer
6
      t.column :container_type, :string
7
    end
8

    
9
    add_index :taggings, [:container_id, :container_type, :container_id], :name => "taggings_ids", :unique => true 
10

    
11
  end
12

    
13

    
14
  def self.down
15
    drop_table :taggings
16
  end
17
end
    (1-1/1)