Sha256: ca0dddbc42ffc41a531ce17bb4a64946ada1076d0714a105c0596f09f48ca1ee

Contents?: true

Size: 376 Bytes

Versions: 10

Compression:

Stored size: 376 Bytes

Contents

class CreateLineItems < ActiveRecord::Migration
  def self.up
    create_table :line_items do |t|
      t.integer :order_id, :null => false
      t.integer :purchasable_item_id, :null => false #, :references => nil this may blow up
      t.string  :purchasable_item_type, :null => false

      t.timestamps
    end

  end

  def self.down
    drop_table :line_items
  end
end

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
trollied-0.1.4 test/full_2_3_5_app_with_tests/db/migrate/20110426033908_create_line_items.rb
trollied-0.1.4 generators/trollied_migrations/templates/line_items_migration.rb
trollied-0.1.3 generators/trollied_migrations/templates/line_items_migration.rb
trollied-0.1.3 test/full_2_3_5_app_with_tests/db/migrate/20110426033908_create_line_items.rb
trollied-0.1.2 test/full_2_3_5_app_with_tests/db/migrate/20110426033908_create_line_items.rb
trollied-0.1.2 generators/trollied_migrations/templates/line_items_migration.rb
trollied-0.1.1 test/full_2_3_5_app_with_tests/db/migrate/20110426033908_create_line_items.rb
trollied-0.1.1 generators/trollied_migrations/templates/line_items_migration.rb
trollied-0.1.0 generators/trollied_migrations/templates/line_items_migration.rb
trollied-0.1.0 test/full_2_3_5_app_with_tests/db/migrate/20110426033908_create_line_items.rb