X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=db%2Fschema.rb;h=f9d22a08ea2b667f64636244976c2dba8a490ab9;hb=bbf13350a73e14c5448f6fb0077126b7d92cdb48;hp=b349a7674150657e04019b30d1f9db0de7c55035;hpb=97d39268c0b348898dca1ec24552eb26a94ae546;p=cs356-p2-videostore.git diff --git a/db/schema.rb b/db/schema.rb index b349a76..f9d22a0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,13 +2,7 @@ # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. -ActiveRecord::Schema.define(:version => 16) do - - create_table "bitems", :force => true do |t| - t.column "customer_id", :integer, :null => false - t.column "merchandise_id", :integer, :null => false - t.column "date", :date, :null => false - end +ActiveRecord::Schema.define(:version => 27) do create_table "coitems", :force => true do |t| t.column "customer_id", :integer @@ -25,20 +19,48 @@ ActiveRecord::Schema.define(:version => 16) do t.column "debt", :decimal, :default => 0.0 end + create_table "game_policies", :force => true do |t| + t.column "day", :integer, :null => false + t.column "fee", :decimal, :precision => 8, :scale => 2, :null => false + t.column "period", :integer + t.column "description", :string + end + + create_table "gamegenres", :force => true do |t| + t.column "name", :string, :null => false + end + + create_table "gameplatforms", :force => true do |t| + t.column "name", :string, :null => false + end + create_table "medias", :force => true do |t| t.column "name", :string, :null => false end + create_table "merchandise_purchases", :force => true do |t| + end + create_table "merchandises", :force => true do |t| - t.column "name", :string, :null => false + t.column "title", :string, :null => false t.column "quantity", :integer, :default => 0, :null => false t.column "price", :decimal, :precision => 8, :scale => 2, :default => 0.0 end create_table "purchases", :force => true do |t| - t.column "customer_id", :integer - t.column "purchaseable_id", :integer - t.column "purchaseable_type", :string + t.column "type", :string + t.column "customer_id", :integer + t.column "date", :date + t.column "price", :decimal, :default => 0.0 + t.column "rentable_id", :integer + t.column "merchandise_id", :integer + t.column "quantity", :integer + end + + create_table "rentable_policies", :force => true do |t| + t.column "name", :string, :null => false + t.column "value", :integer + t.column "description", :string, :null => false end create_table "rentables", :force => true do |t| @@ -52,6 +74,23 @@ ActiveRecord::Schema.define(:version => 16) do t.column "platform", :integer end +# Could not dump table "sqlite_sequence" because of following StandardError +# Unknown type '' for column 'name' + + create_table "users", :force => true do |t| + t.column "name", :string, :null => false + t.column "hashed_password", :string + t.column "salt", :string + t.column "manager", :boolean, :default => false + end + + create_table "video_policies", :force => true do |t| + t.column "day", :integer, :null => false + t.column "fee", :decimal, :precision => 8, :scale => 2, :null => false + t.column "period", :integer + t.column "description", :string + end + create_table "videogenres", :force => true do |t| t.column "name", :string, :null => false end