Sha256: 26cd443339d6e0cf3c33e8ca83fd1123ad0ed7e029285cb745825f23f462a320

Contents?: true

Size: 374 Bytes

Versions: 55

Compression:

Stored size: 374 Bytes

Contents

class CreateTaggings < ActiveRecord::Migration
  
  def self.up
    create_table :taggings do |t|
      t.integer :page_id
      t.integer :tag_id
      t.timestamps
    end
    add_index :taggings, :page_id
    add_index :taggings, :tag_id
  end
  
  def self.down
    drop_table :taggings
    remove_index :taggings, :page_id
    remove_index :taggings, :tag_id
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
tkh_content-0.10.10 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.9 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.8 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.7 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.6 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.5.1 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.5 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.4 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.3 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.2 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10.1 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.10 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.20 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.19 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.18 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.17 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.16 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.15 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.14 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb
tkh_content-0.9.13 lib/generators/tkh_content/create_or_update_migrations/templates/create_taggings.rb