db/schema.rb in spree-0.9.4 vs db/schema.rb in spree-0.10.0.beta

- old
+ new

@@ -7,11 +7,11 @@ # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20091126190904) do +ActiveRecord::Schema.define(:version => 20100301163454) do create_table "addresses", :force => true do |t| t.string "firstname" t.string "lastname" t.string "address1" @@ -37,40 +37,32 @@ t.datetime "updated_at" t.integer "adjustment_source_id" t.string "adjustment_source_type" end + add_index "adjustments", ["order_id"], :name => "index_adjustments_on_order_id" + create_table "assets", :force => true do |t| t.integer "viewable_id" - t.string "viewable_type" + t.string "viewable_type", :limit => 50 t.string "attachment_content_type" t.string "attachment_file_name" t.integer "attachment_size" t.integer "position" - t.string "type" + t.string "type", :limit => 75 t.datetime "attachment_updated_at" t.integer "attachment_width" t.integer "attachment_height" end add_index "assets", ["viewable_id"], :name => "index_assets_on_viewable_id" add_index "assets", ["viewable_type", "type"], :name => "index_assets_on_viewable_type_and_type" - create_table "billing_integrations", :force => true do |t| - t.string "type" - t.string "name" - t.text "description" - t.boolean "active", :default => true - t.string "environment", :default => "development" - t.datetime "created_at" - t.datetime "updated_at" - end - create_table "calculators", :force => true do |t| t.string "type" - t.integer "calculable_id", :null => false - t.string "calculable_type", :default => "", :null => false + t.integer "calculable_id", :null => false + t.string "calculable_type", :null => false t.datetime "created_at" t.datetime "updated_at" end create_table "checkouts", :force => true do |t| @@ -80,17 +72,19 @@ t.text "special_instructions" t.integer "bill_address_id" t.datetime "created_at" t.datetime "updated_at" t.string "state" + t.integer "ship_address_id" + t.integer "shipping_method_id" end create_table "configurations", :force => true do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" - t.string "type" + t.string "type", :limit => 50 end add_index "configurations", ["name", "type"], :name => "index_configurations_on_name_and_type" create_table "countries", :force => true do |t| @@ -110,37 +104,27 @@ t.datetime "created_at" t.datetime "updated_at" t.datetime "starts_at" end - create_table "creditcard_txns", :force => true do |t| - t.integer "creditcard_payment_id" - t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false - t.integer "txn_type" - t.string "response_code" - t.text "avs_response" - t.text "cvv_response" - t.datetime "created_at" - t.datetime "updated_at" - end - create_table "creditcards", :force => true do |t| t.text "number" t.string "month" t.string "year" t.text "verification_value" t.string "cc_type" - t.string "display_number" + t.string "last_digits" t.string "first_name" t.string "last_name" t.datetime "created_at" t.datetime "updated_at" t.string "start_month" t.string "start_year" t.string "issue_number" t.integer "address_id" - t.integer "checkout_id" + t.string "gateway_customer_profile_id" + t.string "gateway_payment_profile_id" end create_table "gateways", :force => true do |t| t.string "type" t.string "name" @@ -155,16 +139,19 @@ create_table "inventory_units", :force => true do |t| t.integer "variant_id" t.integer "order_id" t.string "state" - t.integer "lock_version", :default => 0 + t.integer "lock_version", :default => 0 t.datetime "created_at" t.datetime "updated_at" + t.integer "shipment_id" + t.integer "return_authorization_id" end add_index "inventory_units", ["order_id"], :name => "index_inventory_units_on_order_id" + add_index "inventory_units", ["shipment_id"], :name => "index_inventory_units_on_shipment_id" add_index "inventory_units", ["variant_id"], :name => "index_inventory_units_on_variant_id" create_table "line_items", :force => true do |t| t.integer "order_id" t.integer "variant_id" @@ -185,13 +172,13 @@ t.binary "server_url" t.binary "secret" end create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false + t.integer "timestamp", :null => false t.string "server_url" - t.string "salt", :default => "", :null => false + t.string "salt", :null => false end create_table "option_types", :force => true do |t| t.string "name", :limit => 100 t.string "presentation", :limit => 100 @@ -235,25 +222,38 @@ t.datetime "completed_at" end add_index "orders", ["number"], :name => "index_orders_on_number" + create_table "payment_methods", :force => true do |t| + t.string "type" + t.string "name" + t.text "description" + t.boolean "active", :default => true + t.string "environment", :default => "development" + t.datetime "created_at" + t.datetime "updated_at" + t.datetime "deleted_at" + end + create_table "payments", :force => true do |t| - t.integer "order_id" + t.integer "payable_id" t.datetime "created_at" t.datetime "updated_at" - t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false - t.integer "creditcard_id" - t.string "type" + t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false + t.string "payable_type" + t.integer "source_id" + t.string "source_type" + t.integer "payment_method_id" end create_table "preferences", :force => true do |t| - t.string "attribute", :default => "", :null => false - t.integer "owner_id", :null => false - t.string "owner_type", :default => "", :null => false + t.string "attribute", :limit => 100, :null => false + t.integer "owner_id", :null => false + t.string "owner_type", :limit => 50, :null => false t.integer "group_id" - t.string "group_type" + t.string "group_type", :limit => 50 t.text "value" t.datetime "created_at" t.datetime "updated_at" end @@ -266,10 +266,15 @@ end add_index "product_groups", ["name"], :name => "index_product_groups_on_name" add_index "product_groups", ["permalink"], :name => "index_product_groups_on_permalink" + create_table "product_groups_products", :id => false, :force => true do |t| + t.integer "product_id" + t.integer "product_group_id" + end + create_table "product_option_types", :force => true do |t| t.integer "product_id" t.integer "option_type_id" t.integer "position" t.datetime "created_at" @@ -323,11 +328,11 @@ add_index "products_taxons", ["product_id"], :name => "index_products_taxons_on_product_id" add_index "products_taxons", ["taxon_id"], :name => "index_products_taxons_on_taxon_id" create_table "properties", :force => true do |t| t.string "name" - t.string "presentation", :default => "", :null => false + t.string "presentation", :null => false t.datetime "created_at" t.datetime "updated_at" end create_table "properties_prototypes", :id => false, :force => true do |t| @@ -344,10 +349,20 @@ create_table "queued_mails", :force => true do |t| t.text "object" t.string "mailer" end + create_table "return_authorizations", :force => true do |t| + t.string "number" + t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false + t.integer "order_id" + t.text "reason" + t.string "state" + t.datetime "created_at" + t.datetime "updated_at" + end + create_table "roles", :force => true do |t| t.string "name" end create_table "roles_users", :id => false, :force => true do |t| @@ -366,10 +381,11 @@ t.datetime "updated_at" t.string "number" t.decimal "cost", :precision => 8, :scale => 2 t.datetime "shipped_at" t.integer "address_id" + t.string "state" end create_table "shipping_categories", :force => true do |t| t.string "name" t.datetime "created_at" @@ -387,16 +403,17 @@ t.integer "shipping_category_id" t.integer "shipping_method_id" end create_table "state_events", :force => true do |t| - t.integer "order_id" + t.integer "stateful_id" t.integer "user_id" t.string "name" t.datetime "created_at" t.datetime "updated_at" t.string "previous_state" + t.string "stateful_type" end create_table "states", :force => true do |t| t.string "name" t.string "abbr" @@ -417,20 +434,20 @@ t.datetime "updated_at" t.integer "tax_category_id" end create_table "taxonomies", :force => true do |t| - t.string "name", :default => "", :null => false + t.string "name", :null => false t.datetime "created_at" t.datetime "updated_at" end create_table "taxons", :force => true do |t| - t.integer "taxonomy_id", :null => false + t.integer "taxonomy_id", :null => false t.integer "parent_id" t.integer "position", :default => 0 - t.string "name", :default => "", :null => false + t.string "name", :null => false t.datetime "created_at" t.datetime "updated_at" t.string "permalink" t.integer "lft" t.integer "rgt" @@ -438,10 +455,31 @@ add_index "taxons", ["parent_id"], :name => "index_taxons_on_parent_id" add_index "taxons", ["permalink"], :name => "index_taxons_on_permalink" add_index "taxons", ["taxonomy_id"], :name => "index_taxons_on_taxonomy_id" + create_table "trackers", :force => true do |t| + t.string "environment" + t.string "analytics_id" + t.boolean "active", :default => true + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "transactions", :force => true do |t| + t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false + t.integer "txn_type" + t.string "response_code" + t.text "avs_response" + t.text "cvv_response" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "original_creditcard_txn_id" + t.integer "payment_id" + t.string "type" + end + create_table "users", :force => true do |t| t.string "email" t.string "crypted_password" t.string "salt" t.string "remember_token" @@ -449,21 +487,22 @@ t.datetime "created_at" t.datetime "updated_at" t.string "persistence_token" t.string "single_access_token" t.string "perishable_token" - t.integer "login_count", :default => 0, :null => false - t.integer "failed_login_count", :default => 0, :null => false + t.integer "login_count", :default => 0, :null => false + t.integer "failed_login_count", :default => 0, :null => false t.datetime "last_request_at" t.datetime "current_login_at" t.datetime "last_login_at" t.string "current_login_ip" t.string "last_login_ip" t.string "login" t.integer "ship_address_id" t.integer "bill_address_id" t.string "openid_identifier" + t.string "api_key", :limit => 40 end add_index "users", ["openid_identifier"], :name => "index_users_on_openid_identifier" create_table "variants", :force => true do |t| @@ -475,9 +514,10 @@ t.decimal "width", :precision => 8, :scale => 2 t.decimal "depth", :precision => 8, :scale => 2 t.datetime "deleted_at" t.boolean "is_master", :default => false t.integer "count_on_hand", :default => 0, :null => false + t.decimal "cost_price", :precision => 8, :scale => 2 end add_index "variants", ["product_id"], :name => "index_variants_on_product_id" create_table "zone_members", :force => true do |t|