Sha256: 1758ed21a6252077ec3d7954f99bbcc446d1e2d759a1c4db27fd3ae90d8f41ef

Contents?: true

Size: 404 Bytes

Versions: 4

Compression:

Stored size: 404 Bytes

Contents

class <%= migration_class_name %> < GroongaClientModel::Migration
  def change
<%- attributes.each do |attribute| -%>
  <%- case @migration_action -%>
  <%- when :add -%>
    add_column :<%= table_name %>, :<%= attribute.name %>, :<%= attribute.type %><%= attribute.inject_options %>
  <%- when :remove -%>
    remove_column :<%= table_name %>, :<%= attribute.name %>
  <%- end -%>
<%- end -%>
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
groonga-client-model-6.0.1 lib/rails/generators/groonga_client_model/migration/templates/migration.rb
groonga-client-model-6.0.0 lib/rails/generators/groonga_client_model/migration/templates/migration.rb
groonga-client-model-1.0.2 lib/rails/generators/groonga_client_model/migration/templates/migration.rb
groonga-client-model-1.0.1 lib/rails/generators/groonga_client_model/migration/templates/migration.rb