Sha256: 7c7b2d810c3ed5701df3d5f2eb584ac86b434743e5e0f1b8f3cd6226069c8ba5
Contents?: true
Size: 686 Bytes
Versions: 12
Compression:
Stored size: 686 Bytes
Contents
class <%= migration_class_name %> < ActiveGroonga::Migration def up <%- if migration_action -%> change_table(:<%= table_name %>) do |table| <% columns.each do |column| -%> <%- if migration_action == "add" -%> table.<%= column.create_code %> <%- else -%> table.<%= column.remove_code %> <%- end -%> <%- end -%> end <%- end -%> end def down <%- if migration_action -%> change_table(:<%= table_name %>) do |table| <% columns.reverse.each do |column| -%> <%- if migration_action == "add" -%> table.<%= column.remove_code %> <%- else -%> table.<%= column.create_code %> <%- end -%> <%- end -%> end <%- end -%> end end
Version data entries
12 entries across 12 versions & 1 rubygems