Sha256: b149f959b0165eeec0cd2052cfb643059a6c5811ad68d1f06820c620f03a1bb8

Contents?: true

Size: 362 Bytes

Versions: 6

Compression:

Stored size: 362 Bytes

Contents

class Create<%= association_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table :<%= association_name %>, :id => false, :force => true do |t|
      <% [file_name, group_name, user_name].sort.each do |name| -%>
      t.integer :<%= name %>_id
      <% end -%>
    end
  end

  def self.down
    drop_table :<%= association_name %>
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ixtlan-guard-0.7.0 lib/generators/active_record/templates/flavor_migration.rb
ixtlan-guard-0.6.1 lib/generators/active_record/templates/flavor_migration.rb
ixtlan-guard-0.6.0 lib/generators/active_record/templates/flavor_migration.rb
ixtlan-guard-0.5.0 lib/generators/active_record/templates/flavor_migration.rb
ixtlan-guard-0.4.1 lib/generators/active_record/templates/flavor_migration.rb
ixtlan-guard-0.4.0 lib/generators/active_record/templates/flavor_migration.rb