Sha256: 9d85c78a71241317aeae62c4b44d6387e8c2a88c389eb2de5a4a857f13298490

Contents?: true

Size: 456 Bytes

Versions: 16

Compression:

Stored size: 456 Bytes

Contents

class <%= "add_#{migration_attribute}_to_#{migration_table_name}".camelize %> < ActiveRecord::Migration
  def self.up
    add_column :<%= migration_table_name %>, :<%= migration_attribute %>, :integer
    add_index :<%= migration_table_name %>, :<%= migration_attribute %>
  end

  def self.down
    remove_index :<%= migration_table_name %>, :<%= migration_attribute %>
    remove_column :<%= migration_table_name %>, :<%= migration_attribute %>
  end
end

Version data entries

16 entries across 7 versions & 2 rubygems

Version Path
somatics3-0.0.10 lib/generators/somatics/relationship/templates/migration.rb
somatics3-0.0.10 lib/generators/somatics/attributes/templates/migration.rb
somatics3-0.0.10 lib/generators/somatics/associated/templates/migration.rb
somatics3-generators-0.0.10 lib/generators/somatics/associated/templates/migration.rb
somatics3-generators-0.0.10 lib/generators/somatics/attributes/templates/migration.rb
somatics3-generators-0.0.10 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.9 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.9 lib/generators/somatics/attributes/templates/migration.rb
somatics3-generators-0.0.8 lib/generators/somatics/attributes/templates/migration.rb
somatics3-generators-0.0.8 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.7 lib/generators/somatics/attributes/templates/migration.rb
somatics3-generators-0.0.7 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.6 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.6 lib/generators/somatics/attributes/templates/migration.rb
somatics3-generators-0.0.5 lib/generators/somatics/relationship/templates/migration.rb
somatics3-generators-0.0.5 lib/generators/somatics/attributes/templates/migration.rb