class <%= "#{migration_name.classify.pluralize}" %> < <%= migration_class_name %> def change <% attributes_names.each do |attribute| %> add_column :<%= name.tableize %>, <%= ":#{attribute}_token" %>, :string, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_created_at" %>, :timestamp, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_sent_at" %>, :timestamp, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_completed_at" %>, :timestamp, default: nil add_index :<%= name.tableize %>, <%= ":#{attribute}_token" %> <% end %> end end