Add RentablePolicy, to get set up for adding policies
[cs356-p2-videostore.git] / db / schema.rb
1 # This file is autogenerated. Instead of editing this file, please use the
2 # migrations feature of ActiveRecord to incrementally modify your database, and
3 # then regenerate this schema definition.
4
5 ActiveRecord::Schema.define(:version => 21) do
6
7   create_table "bitems", :force => true do |t|
8     t.column "customer_id",    :integer, :null => false
9     t.column "merchandise_id", :integer, :null => false
10     t.column "date",           :date,    :null => false
11   end
12
13   create_table "coitems", :force => true do |t|
14     t.column "customer_id", :integer
15     t.column "rentable_id", :integer
16     t.column "out_date",    :date,    :default => '2007-11-21'
17     t.column "due_date",    :date
18   end
19
20   create_table "customers", :force => true do |t|
21     t.column "name",    :string
22     t.column "address", :text,    :limit => 255
23     t.column "email",   :string
24     t.column "phone",   :string
25     t.column "debt",    :decimal,                :default => 0.0
26   end
27
28   create_table "medias", :force => true do |t|
29     t.column "name", :string, :null => false
30   end
31
32   create_table "merchandise_purchases", :force => true do |t|
33   end
34
35   create_table "merchandises", :force => true do |t|
36     t.column "title",    :string,                                                 :null => false
37     t.column "quantity", :integer,                               :default => 0,   :null => false
38     t.column "price",    :decimal, :precision => 8, :scale => 2, :default => 0.0
39   end
40
41   create_table "purchases", :force => true do |t|
42     t.column "type",           :string
43     t.column "customer_id",    :integer
44     t.column "date",           :date
45     t.column "price",          :decimal, :default => 0.0
46     t.column "rentable_id",    :integer
47     t.column "merchandise_id", :integer
48     t.column "quantity",       :integer
49   end
50
51   create_table "rentable_policies", :force => true do |t|
52     t.column "name",        :string,  :null => false
53     t.column "value",       :integer
54     t.column "description", :string,  :null => false
55   end
56
57   create_table "rentables", :force => true do |t|
58     t.column "type",        :string
59     t.column "title",       :string
60     t.column "newrelease",  :boolean, :default => false
61     t.column "video_genre", :integer
62     t.column "director",    :string
63     t.column "media",       :integer
64     t.column "game_genre",  :integer
65     t.column "platform",    :integer
66   end
67
68 # Could not dump table "sqlite_sequence" because of following StandardError
69 #   Unknown type '' for column 'name'
70
71   create_table "videogenres", :force => true do |t|
72     t.column "name", :string, :null => false
73   end
74
75 end