The Depot Application

The Depot Application

17 Migration 16 Active Support

17 Migration

ruby -rubygems /home/rubys/git/rails/railties/bin/rails migration
      create  
      create  README
      create  .gitignore
      create  Rakefile
      create  config.ru
      create  Gemfile
      create  app
      create  app/helpers/application_helper.rb
      create  app/controllers/application_controller.rb
      create  app/views/layouts
      create  app/models
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/test.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/initializers
      create  config/initializers/session_store.rb
      create  config/initializers/inflections.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/cookie_verification_secret.rb
      create  config/initializers/mime_types.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  log
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
      create  public
      create  public/404.html
      create  public/500.html
      create  public/index.html
      create  public/robots.txt
      create  public/422.html
      create  public/favicon.ico
      create  public/images
      create  public/images/rails.png
      create  public/stylesheets
      create  public/stylesheets/.gitkeep
      create  public/javascripts
      create  public/javascripts/rails.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  script
      create  script/rails
      create  test
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  test/integration
      create  test/unit
      create  test/functional
      create  test/fixtures
      create  tmp
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  vendor/plugins
      create  vendor/plugins/.gitkeep
bundle install
Resolving dependencies
Installing abstract (1.0.0) from system gems 
Installing actionmailer (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing actionpack (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing activemodel (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing activerecord (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing activeresource (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing activesupport (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing arel (0.2.1) from system gems 
Installing builder (2.1.2) from system gems 
Installing bundler (0.9.4) from system gems 
Installing erubis (2.6.5) from system gems 
Installing i18n (0.3.3) from system gems 
Installing mail (2.1.2) from system gems 
Installing memcache-client (1.7.8) from system gems 
Installing mime-types (1.16) from system gems 
Installing rack (1.1.0) from system gems 
Installing rack-mount (0.4.7) from system gems 
Installing rack-test (0.5.3) from system gems 
Installing rails (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing railties (3.0.0.beta1) from source code at /home/rubys/git/rails 
Installing rake (0.8.7) from system gems 
Installing sqlite3-ruby (1.2.5) from system gems 
Installing text-format (1.0.0) from system gems 
Installing text-hyphen (1.0.0) from system gems 
Installing thor (0.13.0) from system gems 
Installing tzinfo (0.3.16) from system gems 
Your bundle is complete!
edit config/routes.rb
Migration::Application.routes.draw do |map|
  # ...
 
  # This is a legacy wild controller route that's not recommended for RESTful applications.
  # Note: This route will make all actions in every controller accessible via GET requests.
   match ':controller(/:action(/:id(.:format)))'
end
cp -rpv /home/rubys/git/awdwr/plugins/* vendor/plugins/
`/home/rubys/git/awdwr/plugins/MANIFEST' -> `vendor/plugins/MANIFEST'
`/home/rubys/git/awdwr/plugins/acts_as_list' -> `vendor/plugins/acts_as_list'
`/home/rubys/git/awdwr/plugins/acts_as_list/init.rb' -> `vendor/plugins/acts_as_list/init.rb'
`/home/rubys/git/awdwr/plugins/acts_as_list/lib' -> `vendor/plugins/acts_as_list/lib'
`/home/rubys/git/awdwr/plugins/acts_as_list/lib/active_record' -> `vendor/plugins/acts_as_list/lib/active_record'
`/home/rubys/git/awdwr/plugins/acts_as_list/lib/active_record/acts' -> `vendor/plugins/acts_as_list/lib/active_record/acts'
`/home/rubys/git/awdwr/plugins/acts_as_list/lib/active_record/acts/list.rb' -> `vendor/plugins/acts_as_list/lib/active_record/acts/list.rb'
`/home/rubys/git/awdwr/plugins/acts_as_list/README' -> `vendor/plugins/acts_as_list/README'
`/home/rubys/git/awdwr/plugins/acts_as_list/test' -> `vendor/plugins/acts_as_list/test'
`/home/rubys/git/awdwr/plugins/acts_as_list/test/list_test.rb' -> `vendor/plugins/acts_as_list/test/list_test.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree' -> `vendor/plugins/acts_as_tree'
`/home/rubys/git/awdwr/plugins/acts_as_tree/init.rb' -> `vendor/plugins/acts_as_tree/init.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree/Rakefile' -> `vendor/plugins/acts_as_tree/Rakefile'
`/home/rubys/git/awdwr/plugins/acts_as_tree/lib' -> `vendor/plugins/acts_as_tree/lib'
`/home/rubys/git/awdwr/plugins/acts_as_tree/lib/active_record' -> `vendor/plugins/acts_as_tree/lib/active_record'
`/home/rubys/git/awdwr/plugins/acts_as_tree/lib/active_record/acts' -> `vendor/plugins/acts_as_tree/lib/active_record/acts'
`/home/rubys/git/awdwr/plugins/acts_as_tree/lib/active_record/acts/tree.rb' -> `vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree/README' -> `vendor/plugins/acts_as_tree/README'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test' -> `vendor/plugins/acts_as_tree/test'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/acts_as_tree_test.rb' -> `vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/database.yml' -> `vendor/plugins/acts_as_tree/test/database.yml'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/schema.rb' -> `vendor/plugins/acts_as_tree/test/schema.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/fixtures' -> `vendor/plugins/acts_as_tree/test/fixtures'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/fixtures/mixins.yml' -> `vendor/plugins/acts_as_tree/test/fixtures/mixins.yml'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/fixtures/mixin.rb' -> `vendor/plugins/acts_as_tree/test/fixtures/mixin.rb'
`/home/rubys/git/awdwr/plugins/acts_as_tree/test/abstract_unit.rb' -> `vendor/plugins/acts_as_tree/test/abstract_unit.rb'
`/home/rubys/git/awdwr/plugins/annotate_models' -> `vendor/plugins/annotate_models'
`/home/rubys/git/awdwr/plugins/annotate_models/tasks' -> `vendor/plugins/annotate_models/tasks'
`/home/rubys/git/awdwr/plugins/annotate_models/tasks/annotate_models_tasks.rake' -> `vendor/plugins/annotate_models/tasks/annotate_models_tasks.rake'
`/home/rubys/git/awdwr/plugins/annotate_models/lib' -> `vendor/plugins/annotate_models/lib'
`/home/rubys/git/awdwr/plugins/annotate_models/lib/annotate_models.rb' -> `vendor/plugins/annotate_models/lib/annotate_models.rb'
`/home/rubys/git/awdwr/plugins/annotate_models/README' -> `vendor/plugins/annotate_models/README'
`/home/rubys/git/awdwr/plugins/annotate_models/ChangeLog' -> `vendor/plugins/annotate_models/ChangeLog'
`/home/rubys/git/awdwr/plugins/country_select' -> `vendor/plugins/country_select'
`/home/rubys/git/awdwr/plugins/country_select/init.rb' -> `vendor/plugins/country_select/init.rb'
`/home/rubys/git/awdwr/plugins/country_select/lib' -> `vendor/plugins/country_select/lib'
`/home/rubys/git/awdwr/plugins/country_select/lib/country_select.rb' -> `vendor/plugins/country_select/lib/country_select.rb'
`/home/rubys/git/awdwr/plugins/country_select/README' -> `vendor/plugins/country_select/README'
`/home/rubys/git/awdwr/plugins/country_select/uninstall.rb' -> `vendor/plugins/country_select/uninstall.rb'
`/home/rubys/git/awdwr/plugins/country_select/MIT-LICENSE' -> `vendor/plugins/country_select/MIT-LICENSE'
`/home/rubys/git/awdwr/plugins/country_select/install.rb' -> `vendor/plugins/country_select/install.rb'

Restart the server.

cp -v -r ../depot/db/* db/
`../depot/db/development.sqlite3' -> `db/development.sqlite3'
`../depot/db/migrate' -> `db/migrate'
`../depot/db/migrate/20100301000001_create_products.rb' -> `db/migrate/20100301000001_create_products.rb'
`../depot/db/migrate/20100301000003_add_test_data.rb' -> `db/migrate/20100301000003_add_test_data.rb'
`../depot/db/migrate/20100301000005_create_orders.rb' -> `db/migrate/20100301000005_create_orders.rb'
`../depot/db/migrate/20100301000004_add_sessions_table.rb' -> `db/migrate/20100301000004_add_sessions_table.rb'
`../depot/db/migrate/20100301000002_add_price_to_product.rb' -> `db/migrate/20100301000002_add_price_to_product.rb'
`../depot/db/migrate/20100301000006_create_line_items.rb' -> `db/migrate/20100301000006_create_line_items.rb'
`../depot/db/migrate/20100301000007_create_users.rb' -> `db/migrate/20100301000007_create_users.rb'
`../depot/db/schema.rb' -> `db/schema.rb'
`../depot/db/seeds.rb' -> `db/seeds.rb'
`../depot/db/test.sqlite3' -> `db/test.sqlite3'
cp -v -r ../depot/app/models/* app/models/
`../depot/app/models/cart.rb' -> `app/models/cart.rb'
`../depot/app/models/cart_item.rb' -> `app/models/cart_item.rb'
`../depot/app/models/line_item.rb' -> `app/models/line_item.rb'
`../depot/app/models/order.rb' -> `app/models/order.rb'
`../depot/app/models/product.rb' -> `app/models/product.rb'
`../depot/app/models/user.rb' -> `app/models/user.rb'
rails generate model discount
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant RubyGemsVersion
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:194: warning: already initialized constant MUTEX
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:196: warning: already initialized constant RubyGemsPackageVersion
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:202: warning: already initialized constant WIN_PATTERNS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:1079: warning: already initialized constant MARSHAL_SPEC_DIR
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:1084: warning: already initialized constant YAML_SPEC_DIR
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:72: warning: already initialized constant VERSION_PATTERN
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:20: warning: already initialized constant OPS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:30: warning: already initialized constant OP_RE
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:246: warning: already initialized constant Requirement
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:18: warning: already initialized constant TYPES
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:171: warning: already initialized constant RUBY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:177: warning: already initialized constant CURRENT
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:39: warning: already initialized constant NONEXISTENT_SPECIFICATION_VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:50: warning: already initialized constant CURRENT_SPECIFICATION_VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:56: warning: already initialized constant SPECIFICATION_VERSION_HISTORY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:72: warning: already initialized constant MARSHAL_FIELDS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:75: warning: already initialized constant TODAY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:593: warning: already initialized constant Cache
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:14: warning: already initialized constant DEFAULT_BACKTRACE
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:15: warning: already initialized constant DEFAULT_BENCHMARK
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:16: warning: already initialized constant DEFAULT_BULK_THRESHOLD
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:17: warning: already initialized constant DEFAULT_VERBOSITY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:18: warning: already initialized constant DEFAULT_UPDATE_SOURCES
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:24: warning: already initialized constant OPERATING_SYSTEM_DEFAULTS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:30: warning: already initialized constant PLATFORM_DEFAULTS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:53: warning: already initialized constant SYSTEM_WIDE_CONFIG_FILE
      invoke  active_record
      create    db/migrate/20100211191540_create_discounts.rb
      create    app/models/discount.rb
      invoke    test_unit
      create      test/unit/discount_test.rb
      create      test/fixtures/discounts.yml
rails generate migration add_status_to_user status:string
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant RubyGemsVersion
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:194: warning: already initialized constant MUTEX
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:196: warning: already initialized constant RubyGemsPackageVersion
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:202: warning: already initialized constant WIN_PATTERNS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:1079: warning: already initialized constant MARSHAL_SPEC_DIR
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems.rb:1084: warning: already initialized constant YAML_SPEC_DIR
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:72: warning: already initialized constant VERSION_PATTERN
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:20: warning: already initialized constant OPS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:30: warning: already initialized constant OP_RE
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:246: warning: already initialized constant Requirement
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:18: warning: already initialized constant TYPES
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:171: warning: already initialized constant RUBY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:177: warning: already initialized constant CURRENT
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:39: warning: already initialized constant NONEXISTENT_SPECIFICATION_VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:50: warning: already initialized constant CURRENT_SPECIFICATION_VERSION
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:56: warning: already initialized constant SPECIFICATION_VERSION_HISTORY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:72: warning: already initialized constant MARSHAL_FIELDS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:75: warning: already initialized constant TODAY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:593: warning: already initialized constant Cache
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:14: warning: already initialized constant DEFAULT_BACKTRACE
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:15: warning: already initialized constant DEFAULT_BENCHMARK
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:16: warning: already initialized constant DEFAULT_BULK_THRESHOLD
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:17: warning: already initialized constant DEFAULT_VERBOSITY
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:18: warning: already initialized constant DEFAULT_UPDATE_SOURCES
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:24: warning: already initialized constant OPERATING_SYSTEM_DEFAULTS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:30: warning: already initialized constant PLATFORM_DEFAULTS
/home/rubys/.rvm/ruby-1.9.1-p376/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:53: warning: already initialized constant SYSTEM_WIDE_CONFIG_FILE
      invoke  active_record
      create    db/migrate/20100211191543_add_status_to_user.rb
rake db:migrate
mv 20100211191540_create_discounts.rb 20100301000008_create_discounts.rb
mv 20100211191543_add_status_to_user.rb 20100301000009_add_status_to_user.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateDiscounts: migrating ================================================
-- create_table(:discounts)
   -> 0.0011s
==  CreateDiscounts: migrated (0.0011s) =======================================
 
==  AddStatusToUser: migrating ================================================
-- add_column(:users, :status, :string)
   -> 0.0008s
==  AddStatusToUser: migrated (0.0009s) =======================================
 
cp -v /home/rubys/git/awdwr/data/migrate/020* db/migrate
`/home/rubys/git/awdwr/data/migrate/020_add_email_to_orders.rb' -> `db/migrate/020_add_email_to_orders.rb'
rake db:migrate
mv 020_add_email_to_orders.rb 20100301000010_add_email_to_orders.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  AddEmailToOrders: migrating ===============================================
-- add_column(:orders, :e_mail, :string)
   -> 0.0008s
==  AddEmailToOrders: migrated (0.0008s) ======================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000010
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/021* db/migrate
`/home/rubys/git/awdwr/data/migrate/021_add_placed_at_to_orders.rb' -> `db/migrate/021_add_placed_at_to_orders.rb'
rake db:migrate
mv 021_add_placed_at_to_orders.rb 20100301000011_add_placed_at_to_orders.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  AddPlacedAtToOrders: migrating ============================================
-- add_column(:orders, :placed_at, :datetime, {:default=>2010-02-11 14:15:58 -0500})
   -> 0.0105s
==  AddPlacedAtToOrders: migrated (0.0106s) ===================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000011
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/022* db/migrate
`/home/rubys/git/awdwr/data/migrate/022_add_columns_to_orders.rb' -> `db/migrate/022_add_columns_to_orders.rb'
rake db:migrate
mv 022_add_columns_to_orders.rb 20100301000012_add_columns_to_orders.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  AddColumnsToOrders: migrating =============================================
-- add_column(:orders, :attn, :string, {:limit=>100})
   -> 0.0008s
-- add_column(:orders, :order_type, :integer)
   -> 0.0004s
-- add_column(:orders, :ship_class, :string, {:null=>false, :default=>"priority"})
   -> 0.0004s
-- add_column(:orders, :amount, :decimal, {:precision=>8, :scale=>2})
   -> 0.0004s
-- add_column(:orders, :state, :string, {:limit=>2})
   -> 0.0004s
==  AddColumnsToOrders: migrated (0.0026s) ====================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000012
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/023* db/migrate
`/home/rubys/git/awdwr/data/migrate/023_rename_email_column.rb' -> `db/migrate/023_rename_email_column.rb'
rake db:migrate
mv 023_rename_email_column.rb 20100301000013_rename_email_column.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  RenameEmailColumn: migrating ==============================================
-- rename_column(:orders, :e_mail, :customer_email)
   -> 0.0246s
==  RenameEmailColumn: migrated (0.0247s) =====================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000013
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/024* db/migrate
`/home/rubys/git/awdwr/data/migrate/024_change_order_type_to_string.rb' -> `db/migrate/024_change_order_type_to_string.rb'
rake db:migrate
mv 024_change_order_type_to_string.rb 20100301000014_change_order_type_to_string.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  ChangeOrderTypeToString: migrating ========================================
-- change_column(:orders, :order_type, :string)
   -> 0.0239s
==  ChangeOrderTypeToString: migrated (0.0240s) ===============================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000014
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/025* db/migrate
`/home/rubys/git/awdwr/data/migrate/025_create_order_histories.rb' -> `db/migrate/025_create_order_histories.rb'
rake db:migrate
mv 025_create_order_histories.rb 20100301000015_create_order_histories.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateOrderHistories: migrating ===========================================
-- create_table(:order_histories)
   -> 0.0013s
==  CreateOrderHistories: migrated (0.0014s) ==================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000015
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/026* db/migrate
`/home/rubys/git/awdwr/data/migrate/026_create_table_tickets.rb' -> `db/migrate/026_create_table_tickets.rb'
rake db:migrate
mv 026_create_table_tickets.rb 20100301000016_create_table_tickets.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
rake aborted!
An error has occurred, this and all later migrations canceled:

    
SQLite3::SQLException: near "auto_increment": syntax error: CREATE TABLE "tickets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "description" text, "text" text, "created_at" datetime, "updated_at" datetime) auto_increment = 10000

    
(See full trace by running task with --trace)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateTableTickets: migrating =============================================
-- create_table(:tickets, {:options=>"auto_increment = 10000"})
rm db/migrate/20100301000016_create_table_tickets.rb
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000015
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/027* db/migrate
`/home/rubys/git/awdwr/data/migrate/027_rename_order_histories.rb' -> `db/migrate/027_rename_order_histories.rb'
rake db:migrate
mv 027_rename_order_histories.rb 20100301000016_rename_order_histories.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  RenameOrderHistories: migrating ===========================================
-- rename_table(:order_histories, :order_notes)
   -> 0.0007s
==  RenameOrderHistories: migrated (0.0008s) ==================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000016
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/028* db/migrate
`/home/rubys/git/awdwr/data/migrate/028_create_order_histories2.rb' -> `db/migrate/028_create_order_histories2.rb'
rake db:migrate
mv 028_create_order_histories2.rb 20100301000017_create_order_histories2.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateOrderHistories2: migrating ==========================================
-- create_table(:order_histories)
   -> 0.0012s
==  CreateOrderHistories2: migrated (0.0331s) =================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000017
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/029* db/migrate
`/home/rubys/git/awdwr/data/migrate/029_add_customer_name_index_to_orders.rb' -> `db/migrate/029_add_customer_name_index_to_orders.rb'
rake db:migrate
mv 029_add_customer_name_index_to_orders.rb 20100301000018_add_customer_name_index_to_orders.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  AddCustomerNameIndexToOrders: migrating ===================================
-- add_index(:orders, :name)
   -> 0.0007s
==  AddCustomerNameIndexToOrders: migrated (0.0008s) ==========================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000018
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/030* db/migrate
`/home/rubys/git/awdwr/data/migrate/030_create_author_book.rb' -> `db/migrate/030_create_author_book.rb'
rake db:migrate
mv 030_create_author_book.rb 20100301000019_create_author_book.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateAuthorBook: migrating ===============================================
-- create_table(:authors_books, {:id=>false})
   -> 0.0009s
==  CreateAuthorBook: migrated (0.0010s) ======================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000019
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/031* db/migrate
`/home/rubys/git/awdwr/data/migrate/031_create_table_tickets.rb' -> `db/migrate/031_create_table_tickets.rb'
rake db:migrate
mv 031_create_table_tickets.rb 20100301000020_create_table_tickets.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  CreateTableTickets: migrating =============================================
-- create_table(:tickets, {:primary_key=>:number})
   -> 0.0011s
==  CreateTableTickets: migrated (0.0012s) ====================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000020
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/032* db/migrate
`/home/rubys/git/awdwr/data/migrate/032_test_discounts.rb' -> `db/migrate/032_test_discounts.rb'
rake db:migrate
mv 032_test_discounts.rb 20100301000021_test_discounts.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
rake aborted!
An error has occurred, this and all later migrations canceled:

    
uninitialized constant TestDiscounts::Sku

    
(See full trace by running task with --trace)
(in /home/rubys/git/awdwr/work-191/migration)
==  TestDiscounts: migrating ==================================================
==  TestDiscounts: reverting ==================================================
==  TestDiscounts: reverted (0.0077s) =========================================
 
rm db/migrate/20100301000021_test_discounts.rb
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000020
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
mkdir db/migrate/dev_data
cp /home/rubys/git/awdwr/data/migrate/users.yml db/migrate/dev_data
rake db:migrate
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000020
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/034* db/migrate
`/home/rubys/git/awdwr/data/migrate/034_load_user_data.rb' -> `db/migrate/034_load_user_data.rb'
rake db:migrate
mv 034_load_user_data.rb 20100301000021_load_user_data.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  LoadUserData: migrating ===================================================
==  LoadUserData: reverting ===================================================
==  LoadUserData: reverted (0.0111s) ==========================================
 
==  LoadUserData: migrated (0.0240s) ==========================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000021
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :decimal(8, 2)   not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/035* db/migrate
`/home/rubys/git/awdwr/data/migrate/035_change_price_to_integer.rb' -> `db/migrate/035_change_price_to_integer.rb'
rake db:migrate
mv 035_change_price_to_integer.rb 20100301000022_change_price_to_integer.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  ChangePriceToInteger: migrating ===========================================
-- change_column(:line_items, :total_price, :integer)
   -> 0.0083s
==  ChangePriceToInteger: migrated (0.0251s) ==================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000022
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :integer         not null
#  created_at  :datetime        
#  updated_at  :datetime        
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/036* db/migrate
`/home/rubys/git/awdwr/data/migrate/036_total_price_to_unit.rb' -> `db/migrate/036_total_price_to_unit.rb'
rake db:migrate
mv 036_total_price_to_unit.rb 20100301000023_total_price_to_unit.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  TotalPriceToUnit: migrating ===============================================
-- add_column(:line_items, :unit_price, :decimal, {:precision=>8, :scale=>2})
   -> 0.0008s
==  TotalPriceToUnit: migrated (0.0176s) ======================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000023
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :integer         not null
#  created_at  :datetime        
#  updated_at  :datetime        
#  unit_price  :decimal(8, 2)   
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to
cp -v /home/rubys/git/awdwr/data/migrate/037* db/migrate
`/home/rubys/git/awdwr/data/migrate/037_add_foreign_key.rb' -> `db/migrate/037_add_foreign_key.rb'
cp -v /home/rubys/git/awdwr/data/migrate/migration_helpers.rb lib
`/home/rubys/git/awdwr/data/migrate/migration_helpers.rb' -> `lib/migration_helpers.rb'
rake db:migrate
mv 037_add_foreign_key.rb 20100301000024_add_foreign_key.rb
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
==  AddForeignKey: migrating ==================================================
-- execute("\n      CREATE TRIGGER fk_line_items_products_insert\n      BEFORE INSERT ON line_items\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_products\")\n\tWHERE \n\t  (SELECT id FROM products WHERE id = NEW.product_id) IS NULL;\n      END;\n    ")
   -> 0.0007s
-- execute("\n      CREATE TRIGGER fk_line_items_products_update\n      BEFORE UPDATE ON line_items\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_products\")\n\tWHERE \n\t  (SELECT id FROM products WHERE id = NEW.product_id) IS NULL;\n      END;\n    ")
   -> 0.0003s
-- execute("\n      CREATE TRIGGER fk_line_items_products_delete\n      BEFORE DELETE ON products\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_products\")\n\tWHERE \n\t  (SELECT id FROM line_items WHERE product_id = OLD.id) IS NOT NULL;\n      END;\n    ")
   -> 0.0002s
-- execute("\n      CREATE TRIGGER fk_line_items_orders_insert\n      BEFORE INSERT ON line_items\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_orders\")\n\tWHERE \n\t  (SELECT id FROM orders WHERE id = NEW.order_id) IS NULL;\n      END;\n    ")
   -> 0.0003s
-- execute("\n      CREATE TRIGGER fk_line_items_orders_update\n      BEFORE UPDATE ON line_items\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_orders\")\n\tWHERE \n\t  (SELECT id FROM orders WHERE id = NEW.order_id) IS NULL;\n      END;\n    ")
   -> 0.0003s
-- execute("\n      CREATE TRIGGER fk_line_items_orders_delete\n      BEFORE DELETE ON orders\n      FOR EACH ROW BEGIN\n        SELECT \n\t  RAISE(ABORT, \"constraint violation: fk_line_items_orders\")\n\tWHERE \n\t  (SELECT id FROM line_items WHERE order_id = OLD.id) IS NOT NULL;\n      END;\n    ")
   -> 0.0002s
==  AddForeignKey: migrated (0.0024s) =========================================
 
rake annotate_models
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /home/rubys/git/rails/railties/lib/rails/plugin.rb:31)
(in /home/rubys/git/awdwr/work-191/migration)
Skipping Cart
Annotating Discount
Annotating User
Annotating LineItem
Skipping CartItem
Annotating Product
Annotating Order
cat app/models/line_item.rb
# == Schema Information
# Schema version: 20100301000024
#
# Table name: line_items
#
#  id          :integer         not null, primary key
#  product_id  :integer         not null
#  order_id    :integer         not null
#  quantity    :integer         not null
#  total_price :integer         not null
#  created_at  :datetime        
#  updated_at  :datetime        
#  unit_price  :decimal(8, 2)   
#
 
#START:belongs_to
class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
#END:belongs_to
 
  def self.from_cart_item(cart_item)
    li = self.new
    li.product     = cart_item.product
    li.quantity    = cart_item.quantity
    li.total_price = cart_item.price
    li
  end
 
#START:belongs_to
end
#END:belongs_to