Class: CreateTags
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTags
- Defined in:
- lib/generators/tkh_content/create_or_update_migrations/templates/create_tags.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
12 13 14 15 16 |
# File 'lib/generators/tkh_content/create_or_update_migrations/templates/create_tags.rb', line 12 def self.down drop_table :tags remove_index :tags, :name Tag.drop_translation_table! end |
.up ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/generators/tkh_content/create_or_update_migrations/templates/create_tags.rb', line 3 def self.up create_table :tags do |t| t.string :name t. end add_index :tags, :name Tag.create_translation_table! :name => :string end |