17 Migration 16 Active Support
ruby -rubygems /home/rubys/git/rails/railties/bin/rails migration
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
create test/fixtures
create test/functional
create test/integration
create test/performance
create test/unit
create vendor
create vendor/plugins
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create Rakefile
create README
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create config/database.yml
create config/routes.rb
create config/locales/en.yml
create db/seeds.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
create config/initializers/cookie_verification_secret.rb
create config/environment.rb
create config/boot.rb
create config/environments/production.rb
create config/environments/development.rb
create config/environments/test.rb
create script/about
create script/console
create script/dbconsole
create script/destroy
create script/generate
create script/runner
create script/server
create script/plugin
create script/performance/benchmarker
create script/performance/profiler
create test/test_helper.rb
create test/performance/browsing_test.rb
create public/404.html
create public/422.html
create public/500.html
create public/index.html
create public/favicon.ico
create public/robots.txt
create public/images/rails.png
create public/javascripts/prototype.js
create public/javascripts/effects.js
create public/javascripts/dragdrop.js
create public/javascripts/controls.js
create public/javascripts/application.js
create doc/README_FOR_APP
create log/server.log
create log/production.log
create log/development.log
create log/test.log
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/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/init.rb' -> `vendor/plugins/acts_as_list/init.rb'
`/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_list/README' -> `vendor/plugins/acts_as_list/README'
`/home/rubys/git/awdwr/plugins/acts_as_tree' -> `vendor/plugins/acts_as_tree'
`/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/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/test' -> `vendor/plugins/acts_as_tree/test'
`/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/mixin.rb' -> `vendor/plugins/acts_as_tree/test/fixtures/mixin.rb'
`/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/database.yml' -> `vendor/plugins/acts_as_tree/test/database.yml'
`/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/abstract_unit.rb' -> `vendor/plugins/acts_as_tree/test/abstract_unit.rb'
`/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/README' -> `vendor/plugins/acts_as_tree/README'
`/home/rubys/git/awdwr/plugins/annotate_models' -> `vendor/plugins/annotate_models'
`/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/ChangeLog' -> `vendor/plugins/annotate_models/ChangeLog'
`/home/rubys/git/awdwr/plugins/annotate_models/README' -> `vendor/plugins/annotate_models/README'
`/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/country_select' -> `vendor/plugins/country_select'
`/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/init.rb' -> `vendor/plugins/country_select/init.rb'
`/home/rubys/git/awdwr/plugins/country_select/install.rb' -> `vendor/plugins/country_select/install.rb'
`/home/rubys/git/awdwr/plugins/country_select/MIT-LICENSE' -> `vendor/plugins/country_select/MIT-LICENSE'
`/home/rubys/git/awdwr/plugins/country_select/uninstall.rb' -> `vendor/plugins/country_select/uninstall.rb'
`/home/rubys/git/awdwr/plugins/country_select/README' -> `vendor/plugins/country_select/README'
cp -v -r ../depot/db/* db/
`../depot/db/development.sqlite3' -> `db/development.sqlite3'
`../depot/db/migrate' -> `db/migrate'
`../depot/db/migrate/20100301000005_create_orders.rb' -> `db/migrate/20100301000005_create_orders.rb'
`../depot/db/migrate/20100301000003_add_test_data.rb' -> `db/migrate/20100301000003_add_test_data.rb'
`../depot/db/migrate/20100301000001_create_products.rb' -> `db/migrate/20100301000001_create_products.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/migrate/20100301000004_create_sessions.rb' -> `db/migrate/20100301000004_create_sessions.rb'
`../depot/db/migrate/20100301000002_add_price_to_product.rb' -> `db/migrate/20100301000002_add_price_to_product.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'
ruby script/generate model discount
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/discount.rb
create test/unit/discount_test.rb
create test/fixtures/discounts.yml
exists db/migrate
create db/migrate/20100301141338_create_discounts.rb
ruby script/generate migration add_status_to_user status:string
exists db/migrate
create db/migrate/20100301141339_add_status_to_user.rb
rake db:migrate
mv 20100301141338_create_discounts.rb 20100301000008_create_discounts.rb
mv 20100301141339_add_status_to_user.rb 20100301000009_add_status_to_user.rb
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== CreateDiscounts: migrating ================================================
-- create_table(:discounts)
-> 0.0017s
== CreateDiscounts: migrated (0.0018s) =======================================
== AddStatusToUser: migrating ================================================
-- add_column(:users, :status, :string)
-> 0.0010s
== AddStatusToUser: migrated (0.0011s) =======================================
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== AddEmailToOrders: migrating ===============================================
-- add_column(:orders, :e_mail, :string)
-> 0.0011s
== AddEmailToOrders: migrated (0.0013s) ======================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== AddPlacedAtToOrders: migrating ============================================
-- add_column(:orders, :placed_at, :datetime, {:default=>Mon Mar 01 09:13:44 -0500 2010})
-> 0.0116s
== AddPlacedAtToOrders: migrated (0.0117s) ===================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== AddColumnsToOrders: migrating =============================================
-- add_column(:orders, :attn, :string, {:limit=>100})
-> 0.0011s
-- add_column(:orders, :order_type, :integer)
-> 0.0007s
-- add_column(:orders, :ship_class, :string, {:null=>false, :default=>"priority"})
-> 0.0007s
-- add_column(:orders, :amount, :decimal, {:precision=>8, :scale=>2})
-> 0.0006s
-- add_column(:orders, :state, :string, {:limit=>2})
-> 0.0007s
== AddColumnsToOrders: migrated (0.0043s) ====================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== RenameEmailColumn: migrating ==============================================
-- rename_column(:orders, :e_mail, :customer_email)
-> 0.0388s
== RenameEmailColumn: migrated (0.0390s) =====================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== ChangeOrderTypeToString: migrating ========================================
-- change_column(:orders, :order_type, :string)
-> 0.0381s
== ChangeOrderTypeToString: migrated (0.0383s) ===============================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== CreateOrderHistories: migrating ===========================================
-- create_table(:order_histories)
-> 0.0022s
== CreateOrderHistories: migrated (0.0023s) ==================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
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-235/migration)
== CreateTableTickets: migrating =============================================
-- create_table(:tickets, {:options=>"auto_increment = 10000"})
rm db/migrate/20100301000016_create_table_tickets.rb
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== RenameOrderHistories: migrating ===========================================
-- rename_table(:order_histories, :order_notes)
-> 0.0011s
== RenameOrderHistories: migrated (0.0012s) ==================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== CreateOrderHistories2: migrating ==========================================
-- create_table(:order_histories)
-> 0.0020s
== CreateOrderHistories2: migrated (0.0220s) =================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== AddCustomerNameIndexToOrders: migrating ===================================
-- add_index(:orders, :name)
-> 0.0010s
== AddCustomerNameIndexToOrders: migrated (0.0011s) ==========================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== CreateAuthorBook: migrating ===============================================
-- create_table(:authors_books, {:id=>false})
-> 0.0014s
== CreateAuthorBook: migrated (0.0015s) ======================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== CreateTableTickets: migrating =============================================
-- create_table(:tickets, {:primary_key=>:number})
-> 0.0016s
== CreateTableTickets: migrated (0.0018s) ====================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
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-235/migration)
== TestDiscounts: migrating ==================================================
== TestDiscounts: reverting ==================================================
== TestDiscounts: reverted (0.0032s) =========================================
rm db/migrate/20100301000021_test_discounts.rb
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== LoadUserData: migrating ===================================================
== LoadUserData: reverting ===================================================
== LoadUserData: reverted (0.0060s) ==========================================
== LoadUserData: migrated (0.0211s) ==========================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== ChangePriceToInteger: migrating ===========================================
-- change_column(:line_items, :total_price, :integer)
-> 0.0161s
== ChangePriceToInteger: migrated (0.0235s) ==================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
== TotalPriceToUnit: migrating ===============================================
-- add_column(:line_items, :unit_price, :decimal, {:precision=>8, :scale=>2})
-> 0.0011s
== TotalPriceToUnit: migrated (0.0085s) ======================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/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.0009s
-- 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.0004s
-- 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.0006s
-- 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.0003s
== AddForeignKey: migrated (0.0067s) =========================================
rake annotate_models
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead.. (called from /home/rubys/git/awdwr/work-235/migration/vendor/rails/railties/lib/tasks/rails.rb:10)
(in /home/rubys/git/awdwr/work-235/migration)
Skipping Cart
Skipping CartItem
Annotating User
Annotating Discount
Annotating Product
Annotating LineItem
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