Add GamePolicy and integrate with the Game model
[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 => 23) 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 "game_policies", :force => true do |t|
29     t.column "day",         :integer,                               :null => false
30     t.column "fee",         :decimal, :precision => 8, :scale => 2, :null => false
31     t.column "period",      :integer
32     t.column "description", :string
33   end
34
35   create_table "medias", :force => true do |t|
36     t.column "name", :string, :null => false
37   end
38
39   create_table "merchandise_purchases", :force => true do |t|
40   end
41
42   create_table "merchandises", :force => true do |t|
43     t.column "title",    :string,                                                 :null => false
44     t.column "quantity", :integer,                               :default => 0,   :null => false
45     t.column "price",    :decimal, :precision => 8, :scale => 2, :default => 0.0
46   end
47
48   create_table "purchases", :force => true do |t|
49     t.column "type",           :string
50     t.column "customer_id",    :integer
51     t.column "date",           :date
52     t.column "price",          :decimal, :default => 0.0
53     t.column "rentable_id",    :integer
54     t.column "merchandise_id", :integer
55     t.column "quantity",       :integer
56   end
57
58   create_table "rentable_policies", :force => true do |t|
59     t.column "name",        :string,  :null => false
60     t.column "value",       :integer
61     t.column "description", :string,  :null => false
62   end
63
64   create_table "rentables", :force => true do |t|
65     t.column "type",        :string
66     t.column "title",       :string
67     t.column "newrelease",  :boolean, :default => false
68     t.column "video_genre", :integer
69     t.column "director",    :string
70     t.column "media",       :integer
71     t.column "game_genre",  :integer
72     t.column "platform",    :integer
73   end
74
75 # Could not dump table "sqlite_sequence" because of following StandardError
76 #   Unknown type '' for column 'name'
77
78   create_table "video_policies", :force => true do |t|
79     t.column "day",         :integer,                               :null => false
80     t.column "fee",         :decimal, :precision => 8, :scale => 2, :null => false
81     t.column "period",      :integer
82     t.column "description", :string
83   end
84
85   create_table "videogenres", :force => true do |t|
86     t.column "name", :string, :null => false
87   end
88
89 end