db/schema.rb in spree-0.9.3 vs db/schema.rb in spree-0.9.4
- 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 => 20090908141056) do
+ActiveRecord::Schema.define(:version => 20091126190904) do
create_table "addresses", :force => true do |t|
t.string "firstname"
t.string "lastname"
t.string "address1"
@@ -28,18 +28,17 @@
end
create_table "adjustments", :force => true do |t|
t.integer "order_id"
t.string "type"
- t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false
+ t.decimal "amount", :precision => 8, :scale => 2
t.string "description"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "adjustment_source_id"
t.string "adjustment_source_type"
- t.string "secondary_type"
end
create_table "assets", :force => true do |t|
t.integer "viewable_id"
t.string "viewable_type"
@@ -51,27 +50,40 @@
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", :null => false
+ t.integer "calculable_id", :null => false
+ t.string "calculable_type", :default => "", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "checkouts", :force => true do |t|
t.integer "order_id"
t.string "email"
t.string "ip_address"
t.text "special_instructions"
t.integer "bill_address_id"
- t.datetime "completed_at"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "state"
end
create_table "configurations", :force => true do |t|
t.string "name"
t.datetime "created_at"
@@ -127,38 +139,18 @@
t.string "issue_number"
t.integer "address_id"
t.integer "checkout_id"
end
- create_table "gateway_configurations", :force => true do |t|
- t.integer "gateway_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
- create_table "gateway_option_values", :force => true do |t|
- t.integer "gateway_configuration_id"
- t.integer "gateway_option_id"
- t.text "value"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
- create_table "gateway_options", :force => true do |t|
- t.string "name"
- t.text "description"
- t.integer "gateway_id"
- t.boolean "textarea", :default => false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "gateways", :force => true do |t|
- t.string "clazz"
+ t.string "type"
t.string "name"
t.text "description"
- t.boolean "active"
+ t.boolean "active", :default => true
+ t.string "environment", :default => "development"
+ t.string "server", :default => "test"
+ t.boolean "test_mode", :default => true
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "inventory_units", :force => true do |t|
@@ -168,10 +160,13 @@
t.integer "lock_version", :default => 0
t.datetime "created_at"
t.datetime "updated_at"
end
+ add_index "inventory_units", ["order_id"], :name => "index_inventory_units_on_order_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"
t.integer "quantity", :null => false
t.decimal "price", :precision => 8, :scale => 2, :null => false
@@ -180,10 +175,25 @@
end
add_index "line_items", ["order_id"], :name => "index_line_items_on_order_id"
add_index "line_items", ["variant_id"], :name => "index_line_items_on_variant_id"
+ create_table "open_id_authentication_associations", :force => true do |t|
+ t.integer "issued"
+ t.integer "lifetime"
+ t.string "handle"
+ t.string "assoc_type"
+ t.binary "server_url"
+ t.binary "secret"
+ end
+
+ create_table "open_id_authentication_nonces", :force => true do |t|
+ t.integer "timestamp", :null => false
+ t.string "server_url"
+ t.string "salt", :default => "", :null => false
+ end
+
create_table "option_types", :force => true do |t|
t.string "name", :limit => 100
t.string "presentation", :limit => 100
t.datetime "created_at"
t.datetime "updated_at"
@@ -206,10 +216,11 @@
create_table "option_values_variants", :id => false, :force => true do |t|
t.integer "variant_id"
t.integer "option_value_id"
end
+ add_index "option_values_variants", ["variant_id", "option_value_id"], :name => "index_option_values_variants_on_variant_id_and_option_value_id"
add_index "option_values_variants", ["variant_id"], :name => "index_option_values_variants_on_variant_id"
create_table "orders", :force => true do |t|
t.integer "user_id"
t.string "number", :limit => 15
@@ -219,10 +230,11 @@
t.datetime "updated_at"
t.string "state"
t.string "token"
t.decimal "adjustment_total", :precision => 8, :scale => 2, :default => 0.0, :null => false
t.decimal "credit_total", :precision => 8, :scale => 2, :default => 0.0, :null => false
+ t.datetime "completed_at"
end
add_index "orders", ["number"], :name => "index_orders_on_number"
create_table "payments", :force => true do |t|
@@ -233,22 +245,31 @@
t.integer "creditcard_id"
t.string "type"
end
create_table "preferences", :force => true do |t|
- t.string "attribute", :null => false
- t.integer "owner_id", :null => false
- t.string "owner_type", :null => false
+ t.string "attribute", :default => "", :null => false
+ t.integer "owner_id", :null => false
+ t.string "owner_type", :default => "", :null => false
t.integer "group_id"
t.string "group_type"
- t.string "value"
+ t.text "value"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "preferences", ["owner_id", "owner_type", "attribute", "group_id", "group_type"], :name => "index_preferences_on_owner_and_attribute_and_preference", :unique => true
+ create_table "product_groups", :force => true do |t|
+ t.string "name"
+ t.string "permalink"
+ t.string "order"
+ 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_option_types", :force => true do |t|
t.integer "product_id"
t.integer "option_type_id"
t.integer "position"
t.datetime "created_at"
@@ -261,10 +282,21 @@
t.string "value"
t.datetime "created_at"
t.datetime "updated_at"
end
+ add_index "product_properties", ["product_id"], :name => "index_product_properties_on_product_id"
+
+ create_table "product_scopes", :force => true do |t|
+ t.integer "product_group_id"
+ t.string "name"
+ t.text "arguments"
+ end
+
+ add_index "product_scopes", ["name"], :name => "index_product_scopes_on_name"
+ add_index "product_scopes", ["product_group_id"], :name => "index_product_scopes_on_product_group_id"
+
create_table "products", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
@@ -273,10 +305,11 @@
t.integer "tax_category_id"
t.integer "shipping_category_id"
t.datetime "deleted_at"
t.string "meta_description"
t.string "meta_keywords"
+ t.integer "count_on_hand", :default => 0, :null => false
end
add_index "products", ["available_on"], :name => "index_products_on_available_on"
add_index "products", ["deleted_at"], :name => "index_products_on_deleted_at"
add_index "products", ["name"], :name => "index_products_on_name"
@@ -290,11 +323,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", :null => false
+ t.string "presentation", :default => "", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "properties_prototypes", :id => false, :force => true do |t|
@@ -384,57 +417,67 @@
t.datetime "updated_at"
t.integer "tax_category_id"
end
create_table "taxonomies", :force => true do |t|
- t.string "name", :null => false
+ t.string "name", :default => "", :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", :null => false
+ t.string "name", :default => "", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "permalink"
+ t.integer "lft"
+ t.integer "rgt"
end
+ 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 "users", :force => true do |t|
t.string "email"
- t.string "crypted_password", :limit => 128, :default => "", :null => false
- t.string "salt", :limit => 128, :default => "", :null => false
+ t.string "crypted_password"
+ t.string "salt"
t.string "remember_token"
t.string "remember_token_expires_at"
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"
end
+ add_index "users", ["openid_identifier"], :name => "index_users_on_openid_identifier"
+
create_table "variants", :force => true do |t|
t.integer "product_id"
- t.string "sku", :default => "", :null => false
- t.decimal "price", :precision => 8, :scale => 2, :null => false
- t.decimal "weight", :precision => 8, :scale => 2
- t.decimal "height", :precision => 8, :scale => 2
- t.decimal "width", :precision => 8, :scale => 2
- t.decimal "depth", :precision => 8, :scale => 2
+ t.string "sku", :default => "", :null => false
+ t.decimal "price", :precision => 8, :scale => 2, :null => false
+ t.decimal "weight", :precision => 8, :scale => 2
+ t.decimal "height", :precision => 8, :scale => 2
+ 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.boolean "is_master", :default => false
+ t.integer "count_on_hand", :default => 0, :null => false
end
add_index "variants", ["product_id"], :name => "index_variants_on_product_id"
create_table "zone_members", :force => true do |t|