Added availability date to product table
[depot.git] / db / migrate / 20090130111521_add_test_data.rb
1 class AddTestData < ActiveRecord::Migration
2 def self.up
3 Product.delete_all
4 Product.create(:title => 'Pragmatic Project Automation',
5 :description =>
6 %{<p>
7 <em>Pragmatic Project Automation</em> shows you how to improve the
8 consistency and repeatability of your project's procedures using
9 automation to reduce risk and errors.
10 </p>
11 <p>
12 Simply put, we're going to put this thing called a computer to work
13 for you doing the mundane (but important) project stuff. That means
14 you'll have more time and energy to do the really
15 exciting&mdash;and difficult&mdash;stuff, like writing quality code.
16 </p>},
17 :image_url => '/images/auto.jpg',
18 :price => 29.95)
19
20 Product.create(:title => 'Pragmatic Version Control',
21 :description =>
22 %{<p>
23 This book is a recipe-based approach to using Subversion that will
24 get you up and running quickly&mdash;and correctly. All projects need
25 version control: it's a foundational piece of any project's
26 infrastructure. Yet half of all project teams in the U.S. don't use
27 any version control at all. Many others don't use it well, and end
28 up experiencing time-consuming problems.
29 </p>},
30 :image_url => '/images/svn.jpg',
31 :price => 28.50)
32
33 Product.create(:title => 'Pragmatic Unit Testing (C#)',
34 :description =>
35 %{<p>
36 Pragmatic programmers use feedback to drive their development and
37 personal processes. The most valuable feedback you can get while
38 coding comes from unit testing.
39 </p>
40 <p>
41 Without good tests in place, coding can become a frustrating game of
42 "whack-a-mole." That's the carnival game where the player strikes at a
43 mechanical mole; it retreats and another mole pops up on the opposite side
44 of the field. The moles pop up and down so fast that you end up flailing
45 your mallet helplessly as the moles continue to pop up where you least
46 expect them.
47 </p>},
48 :image_url => '/images/utc.jpg',
49 :price => 27.75)
50
51 end
52
53 def self.down
54 Product.delete_all
55 end
56 end