Class: AddManyToManyRelationToProducts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddManyToManyRelationToProducts
- Defined in:
- lib/generators/templates/db/migrate/20091028152124_add_many_to_many_relation_to_products.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
10 11 12 |
# File 'lib/generators/templates/db/migrate/20091028152124_add_many_to_many_relation_to_products.rb', line 10 def self.down drop_table :assemblies_parts end |
.up ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/generators/templates/db/migrate/20091028152124_add_many_to_many_relation_to_products.rb', line 2 def self.up create_table :assemblies_parts, :id => false do |t| t.integer "assembly_id", :null => false t.integer "part_id", :null => false t.integer "count", :null => false, :default => 1 end end |