spree_mercado_pago_payment_method 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/javascripts/{admin → spree/admin}/spree_mercado_pago_payment_method.js +0 -0
- data/app/assets/javascripts/spree/frontend/spree_mercado_pago_payment_method.js +25 -0
- data/app/controllers/spree/mercado_pago_controller.rb +53 -31
- data/app/models/mercado_pago/client.rb +63 -0
- data/app/models/mercado_pago/client/api.rb +43 -0
- data/app/models/mercado_pago/client/authentication.rb +36 -0
- data/app/models/mercado_pago/client/preferences.rb +20 -0
- data/app/models/mercado_pago/notification.rb +8 -0
- data/app/models/mercado_pago/order_preferences_builder.rb +68 -0
- data/app/models/spree/payment_method/mercado_pago.rb +46 -0
- data/app/services/mercado_pago/handle_received_notification.rb +18 -0
- data/app/services/mercado_pago/process_notification.rb +54 -0
- data/app/views/spree/checkout/payment/_mercadopago.html.erb +15 -1
- data/config/locales/en.yml +3 -12
- data/config/locales/es.yml +3 -13
- data/config/routes.rb +5 -7
- data/lib/generators/spree_mercado_pago_payment_method/install/install_generator.rb +15 -10
- data/lib/spree_mercado_pago_payment_method.rb +1 -0
- data/lib/spree_mercado_pago_payment_method/engine.rb +1 -2
- data/lib/tasks/mercado_user.rake +0 -1
- data/spec/controllers/spree/mercado_pago_controller_spec.rb +18 -76
- data/spec/dummy/README.rdoc +15 -248
- data/spec/dummy/Rakefile +1 -2
- data/spec/dummy/app/assets/stylesheets/application.css +5 -3
- data/spec/dummy/app/controllers/application_controller.rb +3 -1
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/config/application.rb +0 -36
- data/spec/dummy/config/database.yml +3 -5
- data/spec/dummy/config/environment.rb +3 -5
- data/spec/dummy/config/environments/development.rb +19 -19
- data/spec/dummy/config/environments/production.rb +41 -30
- data/spec/dummy/config/environments/test.rb +3 -6
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/devise.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +6 -5
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -6
- data/spec/dummy/config/initializers/spree.rb +4 -4
- data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/spec/dummy/config/locales/en.yml +20 -2
- data/spec/dummy/config/routes.rb +8 -2
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/spree.yml +1 -1
- data/spec/dummy/db/migrate/20141112193407_spree_one_two.spree.rb +482 -0
- data/spec/dummy/db/migrate/20141112193408_spree_promo_one_two.spree.rb +46 -0
- data/spec/dummy/db/migrate/{20121121030242_add_tax_rate_label.spree.rb → 20141112193409_add_tax_rate_label.spree.rb} +0 -0
- data/spec/dummy/db/migrate/{20121121030243_add_toggle_tax_rate_display.spree.rb → 20141112193410_add_toggle_tax_rate_display.spree.rb} +0 -0
- data/spec/dummy/db/migrate/20141112193411_remove_unused_preference_columns.spree.rb +9 -0
- data/spec/dummy/db/migrate/{20121121030244_add_lock_version_to_variant.spree.rb → 20141112193412_add_lock_version_to_variant.spree.rb} +0 -0
- data/spec/dummy/db/migrate/20141112193413_add_states_required_to_countries.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193414_add_on_demand_to_product_and_variant.spree.rb +7 -0
- data/spec/dummy/db/migrate/{20121121030245_remove_not_null_constraint_from_products_on_hand.spree.rb → 20141112193415_remove_not_null_constraint_from_products_on_hand.spree.rb} +0 -0
- data/spec/dummy/db/migrate/20141112193416_split_prices_from_variants.spree.rb +32 -0
- data/spec/dummy/db/migrate/20141112193417_remove_not_null_from_spree_prices_amount.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193418_add_currency_to_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193419_add_currency_to_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193420_add_cost_currency_to_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193421_remove_display_on_from_payment_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193422_add_position_to_taxonomies.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193423_add_last_ip_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193424_add_state_to_spree_adjustments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193425_add_display_on_to_spree_payment_methods.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193426_add_position_to_product_properties.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193427_add_identifier_to_spree_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193428_add_order_id_index_to_payments.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193429_add_primary_to_spree_products_taxons.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193430_create_spree_stock_items.spree.rb +15 -0
- data/spec/dummy/db/migrate/20141112193431_create_spree_stock_locations.spree.rb +12 -0
- data/spec/dummy/db/migrate/20141112193432_create_default_stock.spree.rb +31 -0
- data/spec/dummy/db/migrate/20141112193433_add_order_id_index_to_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193434_change_meta_description_on_spree_products_to_text.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193435_add_stock_location_id_to_spree_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193436_add_pending_to_inventory_unit.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193437_remove_on_demand_from_product_and_variant.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193438_create_shipping_method_zone.spree.rb +23 -0
- data/spec/dummy/db/migrate/20141112193439_remove_shipping_category_id_from_shipping_method.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193440_create_shipping_method_categories.spree.rb +14 -0
- data/spec/dummy/db/migrate/20141112193441_add_tracking_url_to_spree_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193442_create_spree_shipping_rates.spree.rb +25 -0
- data/spec/dummy/db/migrate/20141112193443_remove_category_match_attributes_from_shipping_method.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193444_create_stock_movements.spree.rb +13 -0
- data/spec/dummy/db/migrate/20141112193445_add_address_fields_to_stock_location.spree.rb +23 -0
- data/spec/dummy/db/migrate/20141112193446_add_active_field_to_stock_locations.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193447_add_backorderable_to_stock_item.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193448_add_default_quantity_to_stock_movement.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193449_add_source_and_destination_to_stock_movements.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193450_change_orders_total_precision.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193451_change_spree_payments_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193452_change_spree_return_authorization_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193453_change_adjustments_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193454_add_originator_to_stock_movement.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193455_drop_source_and_destination_from_stock_movement.spree.rb +16 -0
- data/spec/dummy/db/migrate/20141112193456_migrate_inventory_unit_sold_to_on_hand.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193457_add_stock_location_to_rma.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193458_update_shipment_state_for_canceled_orders.spree.rb +16 -0
- data/spec/dummy/db/migrate/20141112193459_add_seo_metas_to_taxons.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193460_remove_stock_item_and_variant_lock.spree.rb +15 -0
- data/spec/dummy/db/migrate/20141112193461_add_name_to_spree_credit_cards.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193462_update_name_fields_on_spree_credit_cards.spree.rb +14 -0
- data/spec/dummy/db/migrate/20141112193463_add_index_to_source_columns_on_adjustments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193464_update_adjustment_states.spree.rb +17 -0
- data/spec/dummy/db/migrate/20141112193465_add_shipping_rates_to_shipments.spree.rb +16 -0
- data/spec/dummy/db/migrate/20141112193466_create_spree_stock_transfers.spree.rb +15 -0
- data/spec/dummy/db/migrate/20141112193467_drop_products_count_on_hand.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193468_set_default_shipping_rate_cost.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193469_add_number_to_stock_transfer.spree.rb +24 -0
- data/spec/dummy/db/migrate/20141112193470_add_sku_index_to_spree_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193471_add_backorderable_default_to_spree_stock_location.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193472_add_propage_all_variants_to_spree_stock_location.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193473_rename_shipping_methods_zones_to_spree_shipping_methods_zones.spree.rb +11 -0
- data/spec/dummy/db/migrate/20141112193474_add_user_id_index_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193475_add_updated_at_to_spree_countries.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193476_add_updated_at_to_spree_states.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193477_add_cvv_result_code_and_cvv_result_message_to_spree_payments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193478_add_unique_index_to_permalink_on_spree_products.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193479_add_unique_index_to_orders_shipments_and_stock_transfers.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193480_add_deleted_at_to_spree_tax_rates.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193481_remove_lock_version_from_inventory_units.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193482_add_cost_price_to_line_item.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193483_set_backorderable_to_default_to_false.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193484_add_created_by_id_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193485_index_completed_at_on_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193486_add_tax_category_id_to_spree_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193487_migrate_tax_categories_to_line_items.spree.rb +11 -0
- data/spec/dummy/db/migrate/20141112193488_drop_spree_mail_methods.spree.rb +13 -0
- data/spec/dummy/db/migrate/20141112193489_set_default_stock_location_on_shipments.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193490_upgrade_adjustments.spree.rb +40 -0
- data/spec/dummy/db/migrate/20141112193491_rename_adjustment_fields.spree.rb +15 -0
- data/spec/dummy/db/migrate/20141112193492_add_admin_name_column_to_spree_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193493_add_admin_name_column_to_spree_stock_locations.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193494_add_shipment_total_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193495_expand_order_number_size.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193496_rename_activators_to_promotions.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193497_add_adjustment_total_to_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193498_add_adjustment_total_to_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193499_add_depth_to_spree_taxons.spree.rb +17 -0
- data/spec/dummy/db/migrate/20141112193500_add_tax_total_to_line_items_shipments_and_orders.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193501_add_shipping_category_to_shipping_methods_and_products.spree.rb +16 -0
- data/spec/dummy/db/migrate/20141112193502_migrate_old_shipping_calculators.spree.rb +20 -0
- data/spec/dummy/db/migrate/20141112193503_add_code_to_spree_promotion_rules.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193504_change_states_required_for_countries.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193505_add_deleted_at_to_spree_stock_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193506_remove_promotions_event_name_field.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193507_add_promo_total_to_line_items_and_shipments_and_orders.spree.rb +8 -0
- data/spec/dummy/db/migrate/20141112193508_remove_unused_credit_card_fields.spree.rb +17 -0
- data/spec/dummy/db/migrate/20141112193509_add_track_inventory_to_variant.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193510_add_tax_category_to_variants.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193511_add_channel_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193512_add_included_to_adjustments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193513_rename_tax_total_fields.spree.rb +12 -0
- data/spec/dummy/db/migrate/20141112193514_add_line_item_id_to_spree_inventory_units.spree.rb +22 -0
- data/spec/dummy/db/migrate/20141112193515_add_updated_at_to_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193516_add_position_to_classifications.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193517_create_spree_orders_promotions.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193518_unique_shipping_method_categories.spree.rb +25 -0
- data/spec/dummy/db/migrate/20141112193519_add_item_count_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193520_remove_value_type_from_spree_preferences.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193521_rename_permalink_to_slug_for_products.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193522_add_index_to_variant_id_and_currency_on_prices.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193523_rename_activator_id_in_rules_and_actions_to_promotion_id.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193524_add_deleted_at_to_spree_prices.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193525_add_approver_id_and_approved_at_to_orders.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193526_add_confirmation_delivered_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193527_add_auto_capture_to_payment_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193528_create_spree_payment_capture_events.spree.rb +13 -0
- data/spec/dummy/db/migrate/20141112193529_add_uncaptured_amount_to_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193530_default_variant_weight_to_zero.spree.rb +12 -0
- data/spec/dummy/db/migrate/20141112193531_add_tax_category_id_to_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193532_add_tax_rate_id_to_shipping_rates.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193533_add_pre_tax_amount_to_line_items_and_shipments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193534_add_more_indexes.spree.rb +14 -0
- data/spec/dummy/db/migrate/20141112193535_add_considered_risky_to_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193536_add_preference_store_to_everything.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193537_add_user_id_to_spree_credit_cards.spree.rb +14 -0
- data/spec/dummy/db/migrate/20141112193538_migrate_old_preferences.spree.rb +24 -0
- data/spec/dummy/db/migrate/20141112193539_create_spree_stores.spree.rb +26 -0
- data/spec/dummy/db/migrate/20141112193540_create_store_from_preferences.spree.rb +31 -0
- data/spec/dummy/db/migrate/20141112193541_add_timestamps_to_spree_assets.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193542_add_additional_store_fields.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193543_add_many_missing_indexes.spree.rb +19 -0
- data/spec/dummy/db/migrate/20141112193544_correct_some_polymorphic_index_and_add_more_missing.spree.rb +67 -0
- data/spec/dummy/db/migrate/20141112193545_add_user_id_created_by_id_index_to_order.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193546_change_spree_price_amount_precision.spree.rb +9 -0
- data/spec/dummy/db/migrate/20141112193547_add_token_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193548_move_order_token_from_tokenized_permission.spree.rb +30 -0
- data/spec/dummy/db/migrate/20141112193549_set_shipment_total_for_users_upgrading.spree.rb +11 -0
- data/spec/dummy/db/migrate/20141112193550_drop_credit_card_first_name_and_last_name.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193551_add_deleted_at_to_spree_promotion_actions.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193552_remove_uncaptured_amount_from_spree_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193553_add_default_to_shipment_cost.spree.rb +11 -0
- data/spec/dummy/db/migrate/20141112193554_default_pre_tax_amount_should_be_zero.spree.rb +7 -0
- data/spec/dummy/db/migrate/20141112193555_add_state_lock_version_to_order.spree.rb +6 -0
- data/spec/dummy/db/migrate/20141112193556_fix_adjustment_order_presence.spree.rb +14 -0
- data/spec/dummy/db/migrate/20141112193557_update_classifications_positions.spree.rb +10 -0
- data/spec/dummy/db/migrate/20141112193558_add_api_key_to_spree_users.spree_api.rb +8 -0
- data/spec/dummy/db/migrate/20141112193559_resize_api_key_field.spree_api.rb +8 -0
- data/spec/dummy/db/migrate/20141112193560_rename_api_key_to_spree_api_key.spree_api.rb +8 -0
- data/spec/dummy/db/migrate/20141112193561_add_index_to_user_spree_api_key.spree_api.rb +8 -0
- data/spec/dummy/db/migrate/{20121121030246_create_users.spree_auth.rb → 20141112193562_create_users.spree_auth.rb} +0 -0
- data/spec/dummy/db/migrate/{20121121030247_rename_columns_for_devise.spree_auth.rb → 20141112193563_rename_columns_for_devise.spree_auth.rb} +0 -0
- data/spec/dummy/db/migrate/{20121121030248_convert_user_remember_field.spree_auth.rb → 20141112193564_convert_user_remember_field.spree_auth.rb} +0 -0
- data/spec/dummy/db/migrate/{20121121030249_add_reset_password_sent_at_to_spree_users.spree_auth.rb → 20141112193565_add_reset_password_sent_at_to_spree_users.spree_auth.rb} +0 -0
- data/spec/dummy/db/migrate/{20121121030250_make_users_email_index_unique.spree_auth.rb → 20141112193566_make_users_email_index_unique.spree_auth.rb} +0 -0
- data/spec/dummy/db/migrate/20141202172111_create_spree_mercado_pago_notifications.spree_mercado_pago_payment_method_engine.rb +10 -0
- data/spec/dummy/db/schema.rb +581 -260
- data/spec/dummy/db/seeds.rb +2 -2
- data/spec/dummy/db/spree_development.sqlite3 +0 -0
- data/spec/dummy/db/spree_test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +27822 -1376
- data/spec/dummy/log/test.log +87064 -37048
- data/spec/dummy/public/404.html +54 -13
- data/spec/dummy/public/422.html +54 -13
- data/spec/dummy/public/500.html +53 -12
- data/spec/dummy/tmp/cache/17E/D61/spree%2Fapp_configuration%2Fdefault_seo_title +1 -0
- data/spec/dummy/tmp/cache/2CC/B21/spree%2Fapp_configuration%2Frequire_master_price +1 -0
- data/spec/dummy/tmp/cache/334/AA1/spree%2Fapp_configuration%2Fdefault_meta_keywords +1 -0
- data/spec/dummy/tmp/cache/397/F31/spree%2Fapp_configuration%2Fbinary_inventory_cache +1 -0
- data/spec/dummy/tmp/cache/39C/F91/spree%2Fapp_configuration%2Ftax_using_ship_address +1 -0
- data/spec/dummy/tmp/cache/3A7/4A1/spree%2Fapp_configuration%2Faddress_requires_state +1 -0
- data/spec/dummy/tmp/cache/3B7/CD1/spree%2Fapp_configuration%2Fredirect_https_to_http +1 -0
- data/spec/dummy/tmp/cache/3BE/851/spree%2Fapp_configuration%2Ftrack_inventory_levels +1 -0
- data/spec/dummy/tmp/cache/460/D81/spree%2Fapp_configuration%2Fdefault_meta_description +1 -0
- data/spec/dummy/tmp/cache/5AE/6A1/spree%2Fapp_configuration%2Falways_include_confirm_step +1 -0
- data/spec/dummy/tmp/cache/DD9/320/spree%2Fapp_configuration%2Fsite_url +1 -0
- data/spec/dummy/tmp/cache/DDD/2D0/spree%2Fapp_configuration%2Fcurrency +1 -0
- data/spec/dummy/tmp/cache/E27/320/spree%2Fapp_configuration%2Fsite_name +1 -0
- data/spec/dummy/tmp/cache/E9B/7F0/spree%2Fapp_configuration%2Fmails_from +1 -0
- data/spec/dummy/tmp/cache/F01/FD0/spree%2Ffrontend_configuration%2Flocale +1 -0
- data/spec/dummy/{app/assets/javascripts/admin → vendor/assets/javascripts/spree/backend}/all.js +2 -1
- data/spec/dummy/{app/assets/javascripts/store → vendor/assets/javascripts/spree/frontend}/all.js +2 -1
- data/spec/dummy/{app/assets/stylesheets/admin → vendor/assets/stylesheets/spree/backend}/all.css +2 -1
- data/spec/dummy/{app/assets/stylesheets/store → vendor/assets/stylesheets/spree/frontend}/all.css +2 -1
- data/spec/models/mercado_pago/client_spec.rb +138 -0
- data/spec/models/mercado_pago/notification_spec.rb +17 -0
- data/spec/models/mercado_pago/order_preferences_builder_spec.rb +66 -0
- data/spec/services/mercado_pago/process_notification_spec.rb +57 -0
- data/spec/spec_helper.rb +12 -53
- metadata +444 -328
- data/app/assets/javascripts/store/spree_mercado_pago_payment_method.js +0 -1
- data/app/controllers/spree/checkout_controller_decorator.rb +0 -29
- data/app/models/payment_method/mercado_pago.rb +0 -33
- data/app/models/spree_mercado_pago_client.rb +0 -102
- data/app/views/spree/mercado_pago/failure.html.erb +0 -1
- data/app/views/spree/mercado_pago/pending.html.erb +0 -1
- data/app/views/spree/mercado_pago/success.html.erb +0 -1
- data/spec/controllers/spree/checkout_controller_spec.rb +0 -57
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/db/migrate/20121121030140_spree_zero_nine_zero.spree.rb +0 -392
- data/spec/dummy/db/migrate/20121121030141_create_indexes_for_inventory_units.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030142_add_count_on_hand_to_variants_and_products.spree.rb +0 -50
- data/spec/dummy/db/migrate/20121121030143_change_taxons_to_nested_set.spree.rb +0 -47
- data/spec/dummy/db/migrate/20121121030144_move_to_configurable_gateways.spree.rb +0 -55
- data/spec/dummy/db/migrate/20121121030145_add_open_id_authentication_tables.spree.rb +0 -16
- data/spec/dummy/db/migrate/20121121030146_add_openid_field_to_users.spree.rb +0 -27
- data/spec/dummy/db/migrate/20121121030147_change_preference_value_type.spree.rb +0 -11
- data/spec/dummy/db/migrate/20121121030148_create_billing_integrations.spree.rb +0 -13
- data/spec/dummy/db/migrate/20121121030149_charge_refactoring.spree.rb +0 -40
- data/spec/dummy/db/migrate/20121121030150_add_some_indexes.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030151_checkout_state_machine.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030152_state_for_shipments.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030153_make_state_events_polymorphic.spree.rb +0 -13
- data/spec/dummy/db/migrate/20121121030154_ship_address_id_for_checkouts.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030155_shipping_method_id_for_checkouts.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030156_creditcard_last_four_digits.spree.rb +0 -15
- data/spec/dummy/db/migrate/20121121030157_populate_legacy_shipment_state.spree.rb +0 -16
- data/spec/dummy/db/migrate/20121121030158_add_cost_price.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030159_shipment_id_for_inventory_units.spree.rb +0 -26
- data/spec/dummy/db/migrate/20121121030160_cim_fields_for_creditcards.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030161_create_return_authorizations.spree.rb +0 -13
- data/spec/dummy/db/migrate/20121121030162_add_return_authorization_to_inventory_units.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030163_create_trackers.spree.rb +0 -11
- data/spec/dummy/db/migrate/20121121030164_creditcard_id_for_creditcard_txns.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030165_original_creditcard_txn_id_for_creditcard_txns.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030166_add_test_mode_to_billing_integration.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030167_create_payment_methods.spree.rb +0 -17
- data/spec/dummy/db/migrate/20121121030168_polymorphic_payments.spree.rb +0 -43
- data/spec/dummy/db/migrate/20121121030169_change_payments_payment_method_to_belongs_to.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030170_assign_creditcard_txns_to_payment.spree.rb +0 -24
- data/spec/dummy/db/migrate/20121121030171_sti_for_transactions.spree.rb +0 -16
- data/spec/dummy/db/migrate/20121121030172_drop_billing_integrations.spree.rb +0 -17
- data/spec/dummy/db/migrate/20121121030173_deleted_at_for_payment_methods.spree.rb +0 -15
- data/spec/dummy/db/migrate/20121121030174_add_adjustments_index.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030175_add_alt_text_to_images.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030176_fix_existing_coupon_credits.spree.rb +0 -14
- data/spec/dummy/db/migrate/20121121030177_add_display_to_payment_methods.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030178_add_addresses_checkouts_indexes.spree.rb +0 -9
- data/spec/dummy/db/migrate/20121121030179_add_icon_to_taxons.spree.rb +0 -18
- data/spec/dummy/db/migrate/20121121030180_add_description_to_taxons.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030181_index_for_shipments_number.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030182_add_index_on_users_persistence_token.spree.rb +0 -8
- data/spec/dummy/db/migrate/20121121030183_add_default_to_tax_categories.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030184_add_display_to_shipping_methods.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030185_rename_payment_method_display.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030186_rename_preferences_field.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030187_add_guest_flag.spree.rb +0 -8
- data/spec/dummy/db/migrate/20121121030188_drop_order_token.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030189_payments_state_and_assigned_to_order_only.spree.rb +0 -15
- data/spec/dummy/db/migrate/20121121030190_create_address_keys_for_order.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030191_payment_total_for_orders.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030192_shipping_method_id_for_orders.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030193_add_shipment_and_payment_state.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030194_refactor_adjustments.spree.rb +0 -30
- data/spec/dummy/db/migrate/20121121030195_response_code_and_avs_response_for_payments.spree.rb +0 -7
- data/spec/dummy/db/migrate/20121121030196_change_guest_flag_to_anonymous.spree.rb +0 -8
- data/spec/dummy/db/migrate/20121121030197_email_for_orders.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030198_create_mail_methods.spree.rb +0 -11
- data/spec/dummy/db/migrate/20121121030199_rename_frozen_to_locked.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030200_move_special_instructions_to_orders.spree.rb +0 -11
- data/spec/dummy/db/migrate/20121121030201_create_log_entries.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030202_migrate_transactions_to_payment_state.spree.rb +0 -99
- data/spec/dummy/db/migrate/20121121030203_delete_in_progress_orders.spree.rb +0 -20
- data/spec/dummy/db/migrate/20121121030204_migrate_checkout_to_orders.spree.rb +0 -24
- data/spec/dummy/db/migrate/20121121030205_remove_shipped_state.spree.rb +0 -13
- data/spec/dummy/db/migrate/20121121030206_prevent_nil_payment_total.spree.rb +0 -9
- data/spec/dummy/db/migrate/20121121030207_prevent_nil_email.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030208_generate_anonymous_users.spree.rb +0 -21
- data/spec/dummy/db/migrate/20121121030209_update_order_state.spree.rb +0 -13
- data/spec/dummy/db/migrate/20121121030210_cleanup_legacy_tables.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030211_remove_number_and_cvv_from_credicard.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030212_drop_anonymous_field_for_user.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030213_renamed_rma_cancelled_state.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030214_fix_problematic_index_names.spree.rb +0 -14
- data/spec/dummy/db/migrate/20121121030215_add_position_to_variants.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030216_add_next_state_to_state_events.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030217_add_position_to_option_types.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030218_remove_trailing_slashes_in_taxon_permalinks.spree.rb +0 -20
- data/spec/dummy/db/migrate/20121121030219_create_activators.spree.rb +0 -15
- data/spec/dummy/db/migrate/20121121030220_eligible_for_adjustments.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030221_namespace_top_level_models.spree.rb +0 -67
- data/spec/dummy/db/migrate/20121121030222_migrate_namespaced_polymorphic_models.spree.rb +0 -53
- data/spec/dummy/db/migrate/20121121030223_make_adjustments_polymorphic.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030224_add_company_to_addresses.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030225_add_inc_tax_to_tax_rates.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030226_rename_inc_price_attribute.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030227_add_default_tax_zone.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030228_associate_shipping_methods_and_shipping_categories.spree.rb +0 -8
- data/spec/dummy/db/migrate/20121121030229_add_match_rules_to_shipping_methods.spree.rb +0 -8
- data/spec/dummy/db/migrate/20121121030230_new_preferences.spree.rb +0 -49
- data/spec/dummy/db/migrate/20121121030231_rename_state_events_to_state_changes.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030232_add_deleted_at_to_tax_category.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030233_migrate_images_from_products_to_variants.spree.rb +0 -38
- data/spec/dummy/db/migrate/20121121030234_rename_attachment_size_to_attachment_file_size.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030235_increase_scale_of_tax_rate_amount.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030236_create_tokenized_permissions_table.spree.rb +0 -17
- data/spec/dummy/db/migrate/20121121030237_convert_sales_tax_to_default_tax.spree.rb +0 -10
- data/spec/dummy/db/migrate/20121121030238_rename_creditcards_to_credit_cards.spree.rb +0 -12
- data/spec/dummy/db/migrate/20121121030239_add_deleted_at_to_spree_shipping_methods.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030240_remove_credit_total_from_orders.spree.rb +0 -6
- data/spec/dummy/db/migrate/20121121030241_add_counter_cache_to_zone_members.spree.rb +0 -15
- data/spec/dummy/script/rails +0 -6
- data/spec/models/spree_mercado_pago_client_spec.rb +0 -131
@@ -0,0 +1,11 @@
|
|
1
|
+
# This migration comes from spree (originally 20140601011216)
|
2
|
+
class SetShipmentTotalForUsersUpgrading < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
# NOTE You might not need this at all unless you're upgrading from Spree 2.1.x
|
5
|
+
# or below. For those upgrading this should populate the Order#shipment_total
|
6
|
+
# for legacy orders
|
7
|
+
Spree::Order.complete.where('shipment_total = ?', 0).includes(:shipments).find_each do |order|
|
8
|
+
order.update_column(:shipment_total, order.shipments.sum(:cost))
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from spree (originally 20140604135309)
|
2
|
+
class DropCreditCardFirstNameAndLastName < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
remove_column :spree_credit_cards, :first_name, :string
|
5
|
+
remove_column :spree_credit_cards, :last_name, :string
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from spree (originally 20140609201656)
|
2
|
+
class AddDeletedAtToSpreePromotionActions < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :spree_promotion_actions, :deleted_at, :datetime
|
5
|
+
add_index :spree_promotion_actions, :deleted_at
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This migration comes from spree (originally 20140804185157)
|
2
|
+
class AddDefaultToShipmentCost < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
change_column :spree_shipments, :cost, :decimal, precision: 10, scale: 2, default: 0.0
|
5
|
+
Spree::Shipment.where(cost: nil).update_all(cost: 0)
|
6
|
+
end
|
7
|
+
|
8
|
+
def down
|
9
|
+
change_column :spree_shipments, :cost, :decimal, precision: 10, scale: 2
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from spree (originally 20140927193717)
|
2
|
+
class DefaultPreTaxAmountShouldBeZero < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
change_column :spree_line_items, :pre_tax_amount, :decimal, precision: 8, scale: 2, default: 0
|
5
|
+
change_column :spree_shipments, :pre_tax_amount, :decimal, precision: 8, scale: 2, default: 0
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from spree (originally 20141101231208)
|
2
|
+
class FixAdjustmentOrderPresence < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
say 'Fixing adjustments without direct order reference'
|
5
|
+
Spree::Adjustment.where(order: nil).find_each do |adjustment|
|
6
|
+
adjustable = adjustment.adjustable
|
7
|
+
if adjustable.is_a? Spree::Order
|
8
|
+
adjustment.update_attributes!(order_id: adjustable.id)
|
9
|
+
else
|
10
|
+
adjustment.update_attributes!(adjustable: adjustable.order)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This migration comes from spree (originally 20141105213646)
|
2
|
+
class UpdateClassificationsPositions < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
Spree::Taxon.all.each do |taxon|
|
5
|
+
taxon.classifications.each_with_index do |c12n, i|
|
6
|
+
c12n.set_list_position(i + 1)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This migration comes from spree_mercado_pago_payment_method_engine (originally 20141201204026)
|
2
|
+
class CreateSpreeMercadoPagoNotifications < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :mercado_pago_notifications do |t|
|
5
|
+
t.string :topic
|
6
|
+
t.string :operation_id
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,33 +9,18 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 20141202172111) do
|
15
15
|
|
16
|
-
create_table "
|
17
|
-
t.string "
|
18
|
-
t.string "
|
19
|
-
t.integer "usage_limit"
|
20
|
-
t.boolean "combine"
|
21
|
-
t.datetime "expires_at"
|
22
|
-
t.datetime "starts_at"
|
23
|
-
t.datetime "created_at", :null => false
|
24
|
-
t.datetime "updated_at", :null => false
|
25
|
-
end
|
26
|
-
|
27
|
-
create_table "spree_activators", :force => true do |t|
|
28
|
-
t.string "description"
|
29
|
-
t.datetime "expires_at"
|
16
|
+
create_table "mercado_pago_notifications", force: true do |t|
|
17
|
+
t.string "topic"
|
18
|
+
t.string "operation_id"
|
30
19
|
t.datetime "created_at"
|
31
20
|
t.datetime "updated_at"
|
32
|
-
t.datetime "starts_at"
|
33
|
-
t.string "name"
|
34
|
-
t.string "event_name"
|
35
|
-
t.string "type"
|
36
21
|
end
|
37
22
|
|
38
|
-
create_table "spree_addresses", :
|
23
|
+
create_table "spree_addresses", force: true do |t|
|
39
24
|
t.string "firstname"
|
40
25
|
t.string "lastname"
|
41
26
|
t.string "address1"
|
@@ -45,410 +30,724 @@ ActiveRecord::Schema.define(:version => 20121121030250) do
|
|
45
30
|
t.string "phone"
|
46
31
|
t.string "state_name"
|
47
32
|
t.string "alternative_phone"
|
33
|
+
t.string "company"
|
48
34
|
t.integer "state_id"
|
49
35
|
t.integer "country_id"
|
50
|
-
t.datetime "created_at"
|
51
|
-
t.datetime "updated_at"
|
52
|
-
t.string "company"
|
36
|
+
t.datetime "created_at"
|
37
|
+
t.datetime "updated_at"
|
53
38
|
end
|
54
39
|
|
55
|
-
add_index "spree_addresses", ["
|
56
|
-
add_index "spree_addresses", ["
|
40
|
+
add_index "spree_addresses", ["country_id"], name: "index_spree_addresses_on_country_id"
|
41
|
+
add_index "spree_addresses", ["firstname"], name: "index_addresses_on_firstname"
|
42
|
+
add_index "spree_addresses", ["lastname"], name: "index_addresses_on_lastname"
|
43
|
+
add_index "spree_addresses", ["state_id"], name: "index_spree_addresses_on_state_id"
|
57
44
|
|
58
|
-
create_table "spree_adjustments", :
|
45
|
+
create_table "spree_adjustments", force: true do |t|
|
59
46
|
t.integer "source_id"
|
60
|
-
t.decimal "amount", :precision => 8, :scale => 2
|
61
|
-
t.string "label"
|
62
47
|
t.string "source_type"
|
63
48
|
t.integer "adjustable_id"
|
64
|
-
t.datetime "created_at", :null => false
|
65
|
-
t.datetime "updated_at", :null => false
|
66
|
-
t.boolean "mandatory"
|
67
|
-
t.boolean "locked"
|
68
|
-
t.integer "originator_id"
|
69
|
-
t.string "originator_type"
|
70
|
-
t.boolean "eligible", :default => true
|
71
49
|
t.string "adjustable_type"
|
50
|
+
t.decimal "amount", precision: 10, scale: 2
|
51
|
+
t.string "label"
|
52
|
+
t.boolean "mandatory"
|
53
|
+
t.boolean "eligible", default: true
|
54
|
+
t.datetime "created_at"
|
55
|
+
t.datetime "updated_at"
|
56
|
+
t.string "state"
|
57
|
+
t.integer "order_id"
|
58
|
+
t.boolean "included", default: false
|
72
59
|
end
|
73
60
|
|
74
|
-
add_index "spree_adjustments", ["adjustable_id"], :
|
61
|
+
add_index "spree_adjustments", ["adjustable_id", "adjustable_type"], name: "index_spree_adjustments_on_adjustable_id_and_adjustable_type"
|
62
|
+
add_index "spree_adjustments", ["adjustable_id"], name: "index_adjustments_on_order_id"
|
63
|
+
add_index "spree_adjustments", ["eligible"], name: "index_spree_adjustments_on_eligible"
|
64
|
+
add_index "spree_adjustments", ["order_id"], name: "index_spree_adjustments_on_order_id"
|
65
|
+
add_index "spree_adjustments", ["source_id", "source_type"], name: "index_spree_adjustments_on_source_id_and_source_type"
|
75
66
|
|
76
|
-
create_table "spree_assets", :
|
67
|
+
create_table "spree_assets", force: true do |t|
|
77
68
|
t.integer "viewable_id"
|
69
|
+
t.string "viewable_type"
|
78
70
|
t.integer "attachment_width"
|
79
71
|
t.integer "attachment_height"
|
80
72
|
t.integer "attachment_file_size"
|
81
73
|
t.integer "position"
|
82
|
-
t.string "viewable_type", :limit => 50
|
83
74
|
t.string "attachment_content_type"
|
84
75
|
t.string "attachment_file_name"
|
85
|
-
t.string "type", :
|
76
|
+
t.string "type", limit: 75
|
86
77
|
t.datetime "attachment_updated_at"
|
87
78
|
t.text "alt"
|
79
|
+
t.datetime "created_at"
|
80
|
+
t.datetime "updated_at"
|
88
81
|
end
|
89
82
|
|
90
|
-
add_index "spree_assets", ["viewable_id"], :
|
91
|
-
add_index "spree_assets", ["viewable_type", "type"], :
|
83
|
+
add_index "spree_assets", ["viewable_id"], name: "index_assets_on_viewable_id"
|
84
|
+
add_index "spree_assets", ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"
|
92
85
|
|
93
|
-
create_table "spree_calculators", :
|
86
|
+
create_table "spree_calculators", force: true do |t|
|
94
87
|
t.string "type"
|
95
|
-
t.integer "calculable_id"
|
96
|
-
t.string "calculable_type"
|
97
|
-
t.datetime "created_at"
|
98
|
-
t.datetime "updated_at"
|
88
|
+
t.integer "calculable_id"
|
89
|
+
t.string "calculable_type"
|
90
|
+
t.datetime "created_at"
|
91
|
+
t.datetime "updated_at"
|
92
|
+
t.text "preferences"
|
99
93
|
end
|
100
94
|
|
101
|
-
|
95
|
+
add_index "spree_calculators", ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"
|
96
|
+
add_index "spree_calculators", ["id", "type"], name: "index_spree_calculators_on_id_and_type"
|
97
|
+
|
98
|
+
create_table "spree_configurations", force: true do |t|
|
102
99
|
t.string "name"
|
103
|
-
t.string "type", :
|
104
|
-
t.datetime "created_at"
|
105
|
-
t.datetime "updated_at"
|
100
|
+
t.string "type", limit: 50
|
101
|
+
t.datetime "created_at"
|
102
|
+
t.datetime "updated_at"
|
106
103
|
end
|
107
104
|
|
108
|
-
add_index "spree_configurations", ["name", "type"], :
|
105
|
+
add_index "spree_configurations", ["name", "type"], name: "index_spree_configurations_on_name_and_type"
|
109
106
|
|
110
|
-
create_table "spree_countries", :
|
111
|
-
t.string
|
112
|
-
t.string
|
113
|
-
t.string
|
114
|
-
t.string
|
115
|
-
t.integer
|
107
|
+
create_table "spree_countries", force: true do |t|
|
108
|
+
t.string "iso_name"
|
109
|
+
t.string "iso"
|
110
|
+
t.string "iso3"
|
111
|
+
t.string "name"
|
112
|
+
t.integer "numcode"
|
113
|
+
t.boolean "states_required", default: false
|
114
|
+
t.datetime "updated_at"
|
116
115
|
end
|
117
116
|
|
118
|
-
create_table "spree_credit_cards", :
|
117
|
+
create_table "spree_credit_cards", force: true do |t|
|
119
118
|
t.string "month"
|
120
119
|
t.string "year"
|
121
120
|
t.string "cc_type"
|
122
121
|
t.string "last_digits"
|
123
|
-
t.string "first_name"
|
124
|
-
t.string "last_name"
|
125
|
-
t.string "start_month"
|
126
|
-
t.string "start_year"
|
127
|
-
t.string "issue_number"
|
128
122
|
t.integer "address_id"
|
129
|
-
t.datetime "created_at", :null => false
|
130
|
-
t.datetime "updated_at", :null => false
|
131
123
|
t.string "gateway_customer_profile_id"
|
132
124
|
t.string "gateway_payment_profile_id"
|
125
|
+
t.datetime "created_at"
|
126
|
+
t.datetime "updated_at"
|
127
|
+
t.string "name"
|
128
|
+
t.integer "user_id"
|
129
|
+
t.integer "payment_method_id"
|
133
130
|
end
|
134
131
|
|
135
|
-
|
132
|
+
add_index "spree_credit_cards", ["address_id"], name: "index_spree_credit_cards_on_address_id"
|
133
|
+
add_index "spree_credit_cards", ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"
|
134
|
+
add_index "spree_credit_cards", ["user_id"], name: "index_spree_credit_cards_on_user_id"
|
135
|
+
|
136
|
+
create_table "spree_gateways", force: true do |t|
|
136
137
|
t.string "type"
|
137
138
|
t.string "name"
|
138
139
|
t.text "description"
|
139
|
-
t.boolean "active", :
|
140
|
-
t.string "environment", :
|
141
|
-
t.string "server", :
|
142
|
-
t.boolean "test_mode", :
|
143
|
-
t.datetime "created_at"
|
144
|
-
t.datetime "updated_at"
|
140
|
+
t.boolean "active", default: true
|
141
|
+
t.string "environment", default: "development"
|
142
|
+
t.string "server", default: "test"
|
143
|
+
t.boolean "test_mode", default: true
|
144
|
+
t.datetime "created_at"
|
145
|
+
t.datetime "updated_at"
|
146
|
+
t.text "preferences"
|
145
147
|
end
|
146
148
|
|
147
|
-
|
148
|
-
|
149
|
+
add_index "spree_gateways", ["active"], name: "index_spree_gateways_on_active"
|
150
|
+
add_index "spree_gateways", ["test_mode"], name: "index_spree_gateways_on_test_mode"
|
151
|
+
|
152
|
+
create_table "spree_inventory_units", force: true do |t|
|
149
153
|
t.string "state"
|
150
154
|
t.integer "variant_id"
|
151
155
|
t.integer "order_id"
|
152
|
-
t.datetime "created_at", :null => false
|
153
|
-
t.datetime "updated_at", :null => false
|
154
156
|
t.integer "shipment_id"
|
155
157
|
t.integer "return_authorization_id"
|
158
|
+
t.datetime "created_at"
|
159
|
+
t.datetime "updated_at"
|
160
|
+
t.boolean "pending", default: true
|
161
|
+
t.integer "line_item_id"
|
156
162
|
end
|
157
163
|
|
158
|
-
add_index "spree_inventory_units", ["
|
159
|
-
add_index "spree_inventory_units", ["
|
160
|
-
add_index "spree_inventory_units", ["
|
164
|
+
add_index "spree_inventory_units", ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"
|
165
|
+
add_index "spree_inventory_units", ["order_id"], name: "index_inventory_units_on_order_id"
|
166
|
+
add_index "spree_inventory_units", ["return_authorization_id"], name: "index_spree_inventory_units_on_return_authorization_id"
|
167
|
+
add_index "spree_inventory_units", ["shipment_id"], name: "index_inventory_units_on_shipment_id"
|
168
|
+
add_index "spree_inventory_units", ["variant_id"], name: "index_inventory_units_on_variant_id"
|
161
169
|
|
162
|
-
create_table "spree_line_items", :
|
163
|
-
t.integer "order_id"
|
170
|
+
create_table "spree_line_items", force: true do |t|
|
164
171
|
t.integer "variant_id"
|
165
|
-
t.integer "
|
166
|
-
t.
|
167
|
-
t.
|
168
|
-
t.datetime "
|
172
|
+
t.integer "order_id"
|
173
|
+
t.integer "quantity", null: false
|
174
|
+
t.decimal "price", precision: 10, scale: 2, null: false
|
175
|
+
t.datetime "created_at"
|
176
|
+
t.datetime "updated_at"
|
177
|
+
t.string "currency"
|
178
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
179
|
+
t.integer "tax_category_id"
|
180
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0
|
181
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: 0.0
|
182
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: 0.0
|
183
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: 0.0, null: false
|
184
|
+
t.decimal "pre_tax_amount", precision: 8, scale: 2, default: 0.0
|
169
185
|
end
|
170
186
|
|
171
|
-
add_index "spree_line_items", ["order_id"], :
|
172
|
-
add_index "spree_line_items", ["
|
187
|
+
add_index "spree_line_items", ["order_id"], name: "index_spree_line_items_on_order_id"
|
188
|
+
add_index "spree_line_items", ["tax_category_id"], name: "index_spree_line_items_on_tax_category_id"
|
189
|
+
add_index "spree_line_items", ["variant_id"], name: "index_spree_line_items_on_variant_id"
|
173
190
|
|
174
|
-
create_table "spree_log_entries", :
|
191
|
+
create_table "spree_log_entries", force: true do |t|
|
175
192
|
t.integer "source_id"
|
176
193
|
t.string "source_type"
|
177
194
|
t.text "details"
|
178
|
-
t.datetime "created_at"
|
179
|
-
t.datetime "updated_at"
|
195
|
+
t.datetime "created_at"
|
196
|
+
t.datetime "updated_at"
|
180
197
|
end
|
181
198
|
|
182
|
-
|
183
|
-
t.string "environment"
|
184
|
-
t.boolean "active", :default => true
|
185
|
-
t.datetime "created_at", :null => false
|
186
|
-
t.datetime "updated_at", :null => false
|
187
|
-
end
|
199
|
+
add_index "spree_log_entries", ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"
|
188
200
|
|
189
|
-
create_table "spree_option_types", :
|
190
|
-
t.string "name", :
|
191
|
-
t.string "presentation", :
|
192
|
-
t.
|
193
|
-
t.datetime "
|
194
|
-
t.
|
201
|
+
create_table "spree_option_types", force: true do |t|
|
202
|
+
t.string "name", limit: 100
|
203
|
+
t.string "presentation", limit: 100
|
204
|
+
t.integer "position", default: 0, null: false
|
205
|
+
t.datetime "created_at"
|
206
|
+
t.datetime "updated_at"
|
195
207
|
end
|
196
208
|
|
197
|
-
|
209
|
+
add_index "spree_option_types", ["position"], name: "index_spree_option_types_on_position"
|
210
|
+
|
211
|
+
create_table "spree_option_types_prototypes", id: false, force: true do |t|
|
198
212
|
t.integer "prototype_id"
|
199
213
|
t.integer "option_type_id"
|
200
214
|
end
|
201
215
|
|
202
|
-
create_table "spree_option_values", :
|
216
|
+
create_table "spree_option_values", force: true do |t|
|
203
217
|
t.integer "position"
|
204
218
|
t.string "name"
|
205
219
|
t.string "presentation"
|
206
220
|
t.integer "option_type_id"
|
207
|
-
t.datetime "created_at"
|
208
|
-
t.datetime "updated_at"
|
221
|
+
t.datetime "created_at"
|
222
|
+
t.datetime "updated_at"
|
209
223
|
end
|
210
224
|
|
211
|
-
|
225
|
+
add_index "spree_option_values", ["option_type_id"], name: "index_spree_option_values_on_option_type_id"
|
226
|
+
add_index "spree_option_values", ["position"], name: "index_spree_option_values_on_position"
|
227
|
+
|
228
|
+
create_table "spree_option_values_variants", id: false, force: true do |t|
|
212
229
|
t.integer "variant_id"
|
213
230
|
t.integer "option_value_id"
|
214
231
|
end
|
215
232
|
|
216
|
-
add_index "spree_option_values_variants", ["variant_id", "option_value_id"], :
|
217
|
-
add_index "spree_option_values_variants", ["variant_id"], :
|
233
|
+
add_index "spree_option_values_variants", ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id"
|
234
|
+
add_index "spree_option_values_variants", ["variant_id"], name: "index_spree_option_values_variants_on_variant_id"
|
218
235
|
|
219
|
-
create_table "spree_orders", :
|
220
|
-
t.string "number",
|
221
|
-
t.decimal "item_total",
|
222
|
-
t.decimal "total",
|
236
|
+
create_table "spree_orders", force: true do |t|
|
237
|
+
t.string "number", limit: 32
|
238
|
+
t.decimal "item_total", precision: 10, scale: 2, default: 0.0, null: false
|
239
|
+
t.decimal "total", precision: 10, scale: 2, default: 0.0, null: false
|
223
240
|
t.string "state"
|
224
|
-
t.decimal "adjustment_total",
|
241
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0, null: false
|
225
242
|
t.integer "user_id"
|
226
|
-
t.datetime "created_at", :null => false
|
227
|
-
t.datetime "updated_at", :null => false
|
228
243
|
t.datetime "completed_at"
|
229
244
|
t.integer "bill_address_id"
|
230
245
|
t.integer "ship_address_id"
|
231
|
-
t.decimal "payment_total",
|
246
|
+
t.decimal "payment_total", precision: 10, scale: 2, default: 0.0
|
232
247
|
t.integer "shipping_method_id"
|
233
248
|
t.string "shipment_state"
|
234
249
|
t.string "payment_state"
|
235
250
|
t.string "email"
|
236
251
|
t.text "special_instructions"
|
252
|
+
t.datetime "created_at"
|
253
|
+
t.datetime "updated_at"
|
254
|
+
t.string "currency"
|
255
|
+
t.string "last_ip_address"
|
256
|
+
t.integer "created_by_id"
|
257
|
+
t.decimal "shipment_total", precision: 10, scale: 2, default: 0.0, null: false
|
258
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: 0.0
|
259
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: 0.0
|
260
|
+
t.string "channel", default: "spree"
|
261
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: 0.0, null: false
|
262
|
+
t.integer "item_count", default: 0
|
263
|
+
t.integer "approver_id"
|
264
|
+
t.datetime "approved_at"
|
265
|
+
t.boolean "confirmation_delivered", default: false
|
266
|
+
t.boolean "considered_risky", default: false
|
267
|
+
t.string "guest_token"
|
268
|
+
t.integer "state_lock_version", default: 0, null: false
|
269
|
+
end
|
270
|
+
|
271
|
+
add_index "spree_orders", ["approver_id"], name: "index_spree_orders_on_approver_id"
|
272
|
+
add_index "spree_orders", ["bill_address_id"], name: "index_spree_orders_on_bill_address_id"
|
273
|
+
add_index "spree_orders", ["completed_at"], name: "index_spree_orders_on_completed_at"
|
274
|
+
add_index "spree_orders", ["confirmation_delivered"], name: "index_spree_orders_on_confirmation_delivered"
|
275
|
+
add_index "spree_orders", ["considered_risky"], name: "index_spree_orders_on_considered_risky"
|
276
|
+
add_index "spree_orders", ["created_by_id"], name: "index_spree_orders_on_created_by_id"
|
277
|
+
add_index "spree_orders", ["number"], name: "index_spree_orders_on_number"
|
278
|
+
add_index "spree_orders", ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"
|
279
|
+
add_index "spree_orders", ["shipping_method_id"], name: "index_spree_orders_on_shipping_method_id"
|
280
|
+
add_index "spree_orders", ["user_id", "created_by_id"], name: "index_spree_orders_on_user_id_and_created_by_id"
|
281
|
+
add_index "spree_orders", ["user_id"], name: "index_spree_orders_on_user_id"
|
282
|
+
|
283
|
+
create_table "spree_orders_promotions", id: false, force: true do |t|
|
284
|
+
t.integer "order_id"
|
285
|
+
t.integer "promotion_id"
|
286
|
+
end
|
287
|
+
|
288
|
+
add_index "spree_orders_promotions", ["order_id", "promotion_id"], name: "index_spree_orders_promotions_on_order_id_and_promotion_id"
|
289
|
+
|
290
|
+
create_table "spree_payment_capture_events", force: true do |t|
|
291
|
+
t.decimal "amount", precision: 10, scale: 2, default: 0.0
|
292
|
+
t.integer "payment_id"
|
293
|
+
t.datetime "created_at"
|
294
|
+
t.datetime "updated_at"
|
237
295
|
end
|
238
296
|
|
239
|
-
add_index "
|
297
|
+
add_index "spree_payment_capture_events", ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"
|
240
298
|
|
241
|
-
create_table "spree_payment_methods", :
|
299
|
+
create_table "spree_payment_methods", force: true do |t|
|
242
300
|
t.string "type"
|
243
301
|
t.string "name"
|
244
302
|
t.text "description"
|
245
|
-
t.boolean "active",
|
246
|
-
t.string "environment",
|
247
|
-
t.datetime "created_at", :null => false
|
248
|
-
t.datetime "updated_at", :null => false
|
303
|
+
t.boolean "active", default: true
|
304
|
+
t.string "environment", default: "development"
|
249
305
|
t.datetime "deleted_at"
|
306
|
+
t.datetime "created_at"
|
307
|
+
t.datetime "updated_at"
|
250
308
|
t.string "display_on"
|
309
|
+
t.boolean "auto_capture"
|
310
|
+
t.text "preferences"
|
251
311
|
end
|
252
312
|
|
253
|
-
|
254
|
-
|
313
|
+
add_index "spree_payment_methods", ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"
|
314
|
+
|
315
|
+
create_table "spree_payments", force: true do |t|
|
316
|
+
t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false
|
255
317
|
t.integer "order_id"
|
256
|
-
t.datetime "created_at", :null => false
|
257
|
-
t.datetime "updated_at", :null => false
|
258
318
|
t.integer "source_id"
|
259
319
|
t.string "source_type"
|
260
320
|
t.integer "payment_method_id"
|
261
321
|
t.string "state"
|
262
322
|
t.string "response_code"
|
263
323
|
t.string "avs_response"
|
324
|
+
t.datetime "created_at"
|
325
|
+
t.datetime "updated_at"
|
326
|
+
t.string "identifier"
|
327
|
+
t.string "cvv_response_code"
|
328
|
+
t.string "cvv_response_message"
|
264
329
|
end
|
265
330
|
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
t.
|
272
|
-
t.text "value", :limit => 255
|
273
|
-
t.datetime "created_at", :null => false
|
274
|
-
t.datetime "updated_at", :null => false
|
331
|
+
add_index "spree_payments", ["order_id"], name: "index_spree_payments_on_order_id"
|
332
|
+
add_index "spree_payments", ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"
|
333
|
+
add_index "spree_payments", ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"
|
334
|
+
|
335
|
+
create_table "spree_preferences", force: true do |t|
|
336
|
+
t.text "value"
|
275
337
|
t.string "key"
|
276
|
-
t.
|
338
|
+
t.datetime "created_at"
|
339
|
+
t.datetime "updated_at"
|
277
340
|
end
|
278
341
|
|
279
|
-
add_index "spree_preferences", ["key"], :
|
342
|
+
add_index "spree_preferences", ["key"], name: "index_spree_preferences_on_key", unique: true
|
280
343
|
|
281
|
-
create_table "
|
344
|
+
create_table "spree_prices", force: true do |t|
|
345
|
+
t.integer "variant_id", null: false
|
346
|
+
t.decimal "amount", precision: 10, scale: 2
|
347
|
+
t.string "currency"
|
348
|
+
t.datetime "deleted_at"
|
349
|
+
end
|
350
|
+
|
351
|
+
add_index "spree_prices", ["deleted_at"], name: "index_spree_prices_on_deleted_at"
|
352
|
+
add_index "spree_prices", ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
|
353
|
+
|
354
|
+
create_table "spree_product_option_types", force: true do |t|
|
282
355
|
t.integer "position"
|
283
356
|
t.integer "product_id"
|
284
357
|
t.integer "option_type_id"
|
285
|
-
t.datetime "created_at"
|
286
|
-
t.datetime "updated_at"
|
358
|
+
t.datetime "created_at"
|
359
|
+
t.datetime "updated_at"
|
287
360
|
end
|
288
361
|
|
289
|
-
|
362
|
+
add_index "spree_product_option_types", ["option_type_id"], name: "index_spree_product_option_types_on_option_type_id"
|
363
|
+
add_index "spree_product_option_types", ["position"], name: "index_spree_product_option_types_on_position"
|
364
|
+
add_index "spree_product_option_types", ["product_id"], name: "index_spree_product_option_types_on_product_id"
|
365
|
+
|
366
|
+
create_table "spree_product_properties", force: true do |t|
|
290
367
|
t.string "value"
|
291
368
|
t.integer "product_id"
|
292
369
|
t.integer "property_id"
|
293
|
-
t.datetime "created_at"
|
294
|
-
t.datetime "updated_at"
|
370
|
+
t.datetime "created_at"
|
371
|
+
t.datetime "updated_at"
|
372
|
+
t.integer "position", default: 0
|
295
373
|
end
|
296
374
|
|
297
|
-
add_index "spree_product_properties", ["
|
375
|
+
add_index "spree_product_properties", ["position"], name: "index_spree_product_properties_on_position"
|
376
|
+
add_index "spree_product_properties", ["product_id"], name: "index_product_properties_on_product_id"
|
377
|
+
add_index "spree_product_properties", ["property_id"], name: "index_spree_product_properties_on_property_id"
|
298
378
|
|
299
|
-
create_table "spree_products", :
|
300
|
-
t.string "name", :
|
379
|
+
create_table "spree_products", force: true do |t|
|
380
|
+
t.string "name", default: "", null: false
|
301
381
|
t.text "description"
|
302
382
|
t.datetime "available_on"
|
303
383
|
t.datetime "deleted_at"
|
304
|
-
t.string "
|
305
|
-
t.
|
384
|
+
t.string "slug"
|
385
|
+
t.text "meta_description"
|
306
386
|
t.string "meta_keywords"
|
307
387
|
t.integer "tax_category_id"
|
308
388
|
t.integer "shipping_category_id"
|
309
|
-
t.datetime "created_at"
|
310
|
-
t.datetime "updated_at"
|
311
|
-
|
389
|
+
t.datetime "created_at"
|
390
|
+
t.datetime "updated_at"
|
391
|
+
end
|
392
|
+
|
393
|
+
add_index "spree_products", ["available_on"], name: "index_spree_products_on_available_on"
|
394
|
+
add_index "spree_products", ["deleted_at"], name: "index_spree_products_on_deleted_at"
|
395
|
+
add_index "spree_products", ["name"], name: "index_spree_products_on_name"
|
396
|
+
add_index "spree_products", ["shipping_category_id"], name: "index_spree_products_on_shipping_category_id"
|
397
|
+
add_index "spree_products", ["slug"], name: "index_spree_products_on_slug"
|
398
|
+
add_index "spree_products", ["slug"], name: "permalink_idx_unique", unique: true
|
399
|
+
add_index "spree_products", ["tax_category_id"], name: "index_spree_products_on_tax_category_id"
|
400
|
+
|
401
|
+
create_table "spree_products_promotion_rules", id: false, force: true do |t|
|
402
|
+
t.integer "product_id"
|
403
|
+
t.integer "promotion_rule_id"
|
312
404
|
end
|
313
405
|
|
314
|
-
add_index "
|
315
|
-
add_index "
|
316
|
-
add_index "spree_products", ["name"], :name => "index_spree_products_on_name"
|
317
|
-
add_index "spree_products", ["permalink"], :name => "index_spree_products_on_permalink"
|
406
|
+
add_index "spree_products_promotion_rules", ["product_id"], name: "index_products_promotion_rules_on_product_id"
|
407
|
+
add_index "spree_products_promotion_rules", ["promotion_rule_id"], name: "index_products_promotion_rules_on_promotion_rule_id"
|
318
408
|
|
319
|
-
create_table "spree_products_taxons", :
|
409
|
+
create_table "spree_products_taxons", force: true do |t|
|
320
410
|
t.integer "product_id"
|
321
411
|
t.integer "taxon_id"
|
412
|
+
t.integer "position"
|
413
|
+
end
|
414
|
+
|
415
|
+
add_index "spree_products_taxons", ["position"], name: "index_spree_products_taxons_on_position"
|
416
|
+
add_index "spree_products_taxons", ["product_id"], name: "index_spree_products_taxons_on_product_id"
|
417
|
+
add_index "spree_products_taxons", ["taxon_id"], name: "index_spree_products_taxons_on_taxon_id"
|
418
|
+
|
419
|
+
create_table "spree_promotion_action_line_items", force: true do |t|
|
420
|
+
t.integer "promotion_action_id"
|
421
|
+
t.integer "variant_id"
|
422
|
+
t.integer "quantity", default: 1
|
322
423
|
end
|
323
424
|
|
324
|
-
add_index "
|
325
|
-
add_index "
|
425
|
+
add_index "spree_promotion_action_line_items", ["promotion_action_id"], name: "index_spree_promotion_action_line_items_on_promotion_action_id"
|
426
|
+
add_index "spree_promotion_action_line_items", ["variant_id"], name: "index_spree_promotion_action_line_items_on_variant_id"
|
326
427
|
|
327
|
-
create_table "
|
428
|
+
create_table "spree_promotion_actions", force: true do |t|
|
429
|
+
t.integer "promotion_id"
|
430
|
+
t.integer "position"
|
431
|
+
t.string "type"
|
432
|
+
t.datetime "deleted_at"
|
433
|
+
end
|
434
|
+
|
435
|
+
add_index "spree_promotion_actions", ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"
|
436
|
+
add_index "spree_promotion_actions", ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"
|
437
|
+
add_index "spree_promotion_actions", ["promotion_id"], name: "index_spree_promotion_actions_on_promotion_id"
|
438
|
+
|
439
|
+
create_table "spree_promotion_rules", force: true do |t|
|
440
|
+
t.integer "promotion_id"
|
441
|
+
t.integer "user_id"
|
442
|
+
t.integer "product_group_id"
|
443
|
+
t.string "type"
|
444
|
+
t.datetime "created_at"
|
445
|
+
t.datetime "updated_at"
|
446
|
+
t.string "code"
|
447
|
+
t.text "preferences"
|
448
|
+
end
|
449
|
+
|
450
|
+
add_index "spree_promotion_rules", ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
|
451
|
+
add_index "spree_promotion_rules", ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"
|
452
|
+
add_index "spree_promotion_rules", ["user_id"], name: "index_promotion_rules_on_user_id"
|
453
|
+
|
454
|
+
create_table "spree_promotion_rules_users", id: false, force: true do |t|
|
455
|
+
t.integer "user_id"
|
456
|
+
t.integer "promotion_rule_id"
|
457
|
+
end
|
458
|
+
|
459
|
+
add_index "spree_promotion_rules_users", ["promotion_rule_id"], name: "index_promotion_rules_users_on_promotion_rule_id"
|
460
|
+
add_index "spree_promotion_rules_users", ["user_id"], name: "index_promotion_rules_users_on_user_id"
|
461
|
+
|
462
|
+
create_table "spree_promotions", force: true do |t|
|
463
|
+
t.string "description"
|
464
|
+
t.datetime "expires_at"
|
465
|
+
t.datetime "starts_at"
|
328
466
|
t.string "name"
|
329
|
-
t.string "
|
330
|
-
t.
|
331
|
-
t.
|
467
|
+
t.string "type"
|
468
|
+
t.integer "usage_limit"
|
469
|
+
t.string "match_policy", default: "all"
|
470
|
+
t.string "code"
|
471
|
+
t.boolean "advertise", default: false
|
472
|
+
t.string "path"
|
473
|
+
t.datetime "created_at"
|
474
|
+
t.datetime "updated_at"
|
332
475
|
end
|
333
476
|
|
334
|
-
|
477
|
+
add_index "spree_promotions", ["advertise"], name: "index_spree_promotions_on_advertise"
|
478
|
+
add_index "spree_promotions", ["code"], name: "index_spree_promotions_on_code"
|
479
|
+
add_index "spree_promotions", ["expires_at"], name: "index_spree_promotions_on_expires_at"
|
480
|
+
add_index "spree_promotions", ["id", "type"], name: "index_spree_promotions_on_id_and_type"
|
481
|
+
add_index "spree_promotions", ["starts_at"], name: "index_spree_promotions_on_starts_at"
|
482
|
+
|
483
|
+
create_table "spree_properties", force: true do |t|
|
484
|
+
t.string "name"
|
485
|
+
t.string "presentation", null: false
|
486
|
+
t.datetime "created_at"
|
487
|
+
t.datetime "updated_at"
|
488
|
+
end
|
489
|
+
|
490
|
+
create_table "spree_properties_prototypes", id: false, force: true do |t|
|
335
491
|
t.integer "prototype_id"
|
336
492
|
t.integer "property_id"
|
337
493
|
end
|
338
494
|
|
339
|
-
create_table "spree_prototypes", :
|
495
|
+
create_table "spree_prototypes", force: true do |t|
|
340
496
|
t.string "name"
|
341
|
-
t.datetime "created_at"
|
342
|
-
t.datetime "updated_at"
|
497
|
+
t.datetime "created_at"
|
498
|
+
t.datetime "updated_at"
|
343
499
|
end
|
344
500
|
|
345
|
-
create_table "spree_return_authorizations", :
|
501
|
+
create_table "spree_return_authorizations", force: true do |t|
|
346
502
|
t.string "number"
|
347
503
|
t.string "state"
|
348
|
-
t.decimal "amount",
|
504
|
+
t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false
|
349
505
|
t.integer "order_id"
|
350
506
|
t.text "reason"
|
351
|
-
t.datetime "created_at"
|
352
|
-
t.datetime "updated_at"
|
507
|
+
t.datetime "created_at"
|
508
|
+
t.datetime "updated_at"
|
509
|
+
t.integer "stock_location_id"
|
353
510
|
end
|
354
511
|
|
355
|
-
|
512
|
+
add_index "spree_return_authorizations", ["number"], name: "index_spree_return_authorizations_on_number"
|
513
|
+
add_index "spree_return_authorizations", ["order_id"], name: "index_spree_return_authorizations_on_order_id"
|
514
|
+
add_index "spree_return_authorizations", ["stock_location_id"], name: "index_spree_return_authorizations_on_stock_location_id"
|
515
|
+
|
516
|
+
create_table "spree_roles", force: true do |t|
|
356
517
|
t.string "name"
|
357
518
|
end
|
358
519
|
|
359
|
-
create_table "spree_roles_users", :
|
520
|
+
create_table "spree_roles_users", id: false, force: true do |t|
|
360
521
|
t.integer "role_id"
|
361
522
|
t.integer "user_id"
|
362
523
|
end
|
363
524
|
|
364
|
-
add_index "spree_roles_users", ["role_id"], :
|
365
|
-
add_index "spree_roles_users", ["user_id"], :
|
525
|
+
add_index "spree_roles_users", ["role_id"], name: "index_spree_roles_users_on_role_id"
|
526
|
+
add_index "spree_roles_users", ["user_id"], name: "index_spree_roles_users_on_user_id"
|
366
527
|
|
367
|
-
create_table "spree_shipments", :
|
528
|
+
create_table "spree_shipments", force: true do |t|
|
368
529
|
t.string "tracking"
|
369
530
|
t.string "number"
|
370
|
-
t.decimal "cost",
|
531
|
+
t.decimal "cost", precision: 10, scale: 2, default: 0.0
|
371
532
|
t.datetime "shipped_at"
|
372
533
|
t.integer "order_id"
|
373
|
-
t.integer "shipping_method_id"
|
374
534
|
t.integer "address_id"
|
375
|
-
t.datetime "created_at", :null => false
|
376
|
-
t.datetime "updated_at", :null => false
|
377
535
|
t.string "state"
|
536
|
+
t.datetime "created_at"
|
537
|
+
t.datetime "updated_at"
|
538
|
+
t.integer "stock_location_id"
|
539
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0
|
540
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: 0.0
|
541
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: 0.0
|
542
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: 0.0, null: false
|
543
|
+
t.decimal "pre_tax_amount", precision: 8, scale: 2, default: 0.0
|
378
544
|
end
|
379
545
|
|
380
|
-
add_index "spree_shipments", ["
|
546
|
+
add_index "spree_shipments", ["address_id"], name: "index_spree_shipments_on_address_id"
|
547
|
+
add_index "spree_shipments", ["number"], name: "index_shipments_on_number"
|
548
|
+
add_index "spree_shipments", ["order_id"], name: "index_spree_shipments_on_order_id"
|
549
|
+
add_index "spree_shipments", ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"
|
381
550
|
|
382
|
-
create_table "spree_shipping_categories", :
|
551
|
+
create_table "spree_shipping_categories", force: true do |t|
|
383
552
|
t.string "name"
|
384
|
-
t.datetime "created_at"
|
385
|
-
t.datetime "updated_at"
|
553
|
+
t.datetime "created_at"
|
554
|
+
t.datetime "updated_at"
|
555
|
+
end
|
556
|
+
|
557
|
+
create_table "spree_shipping_method_categories", force: true do |t|
|
558
|
+
t.integer "shipping_method_id", null: false
|
559
|
+
t.integer "shipping_category_id", null: false
|
560
|
+
t.datetime "created_at"
|
561
|
+
t.datetime "updated_at"
|
386
562
|
end
|
387
563
|
|
388
|
-
|
564
|
+
add_index "spree_shipping_method_categories", ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
|
565
|
+
add_index "spree_shipping_method_categories", ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
|
566
|
+
|
567
|
+
create_table "spree_shipping_methods", force: true do |t|
|
389
568
|
t.string "name"
|
390
|
-
t.integer "zone_id"
|
391
|
-
t.datetime "created_at", :null => false
|
392
|
-
t.datetime "updated_at", :null => false
|
393
569
|
t.string "display_on"
|
394
|
-
t.integer "shipping_category_id"
|
395
|
-
t.boolean "match_none"
|
396
|
-
t.boolean "match_all"
|
397
|
-
t.boolean "match_one"
|
398
570
|
t.datetime "deleted_at"
|
571
|
+
t.datetime "created_at"
|
572
|
+
t.datetime "updated_at"
|
573
|
+
t.string "tracking_url"
|
574
|
+
t.string "admin_name"
|
575
|
+
t.integer "tax_category_id"
|
399
576
|
end
|
400
577
|
|
401
|
-
|
578
|
+
add_index "spree_shipping_methods", ["deleted_at"], name: "index_spree_shipping_methods_on_deleted_at"
|
579
|
+
add_index "spree_shipping_methods", ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"
|
580
|
+
|
581
|
+
create_table "spree_shipping_methods_zones", id: false, force: true do |t|
|
582
|
+
t.integer "shipping_method_id"
|
583
|
+
t.integer "zone_id"
|
584
|
+
end
|
585
|
+
|
586
|
+
create_table "spree_shipping_rates", force: true do |t|
|
587
|
+
t.integer "shipment_id"
|
588
|
+
t.integer "shipping_method_id"
|
589
|
+
t.boolean "selected", default: false
|
590
|
+
t.decimal "cost", precision: 8, scale: 2, default: 0.0
|
591
|
+
t.datetime "created_at"
|
592
|
+
t.datetime "updated_at"
|
593
|
+
t.integer "tax_rate_id"
|
594
|
+
end
|
595
|
+
|
596
|
+
add_index "spree_shipping_rates", ["selected"], name: "index_spree_shipping_rates_on_selected"
|
597
|
+
add_index "spree_shipping_rates", ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
|
598
|
+
add_index "spree_shipping_rates", ["tax_rate_id"], name: "index_spree_shipping_rates_on_tax_rate_id"
|
599
|
+
|
600
|
+
create_table "spree_state_changes", force: true do |t|
|
402
601
|
t.string "name"
|
403
602
|
t.string "previous_state"
|
404
603
|
t.integer "stateful_id"
|
405
604
|
t.integer "user_id"
|
406
|
-
t.datetime "created_at", :null => false
|
407
|
-
t.datetime "updated_at", :null => false
|
408
605
|
t.string "stateful_type"
|
409
606
|
t.string "next_state"
|
607
|
+
t.datetime "created_at"
|
608
|
+
t.datetime "updated_at"
|
609
|
+
end
|
610
|
+
|
611
|
+
add_index "spree_state_changes", ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"
|
612
|
+
add_index "spree_state_changes", ["user_id"], name: "index_spree_state_changes_on_user_id"
|
613
|
+
|
614
|
+
create_table "spree_states", force: true do |t|
|
615
|
+
t.string "name"
|
616
|
+
t.string "abbr"
|
617
|
+
t.integer "country_id"
|
618
|
+
t.datetime "updated_at"
|
619
|
+
end
|
620
|
+
|
621
|
+
add_index "spree_states", ["country_id"], name: "index_spree_states_on_country_id"
|
622
|
+
|
623
|
+
create_table "spree_stock_items", force: true do |t|
|
624
|
+
t.integer "stock_location_id"
|
625
|
+
t.integer "variant_id"
|
626
|
+
t.integer "count_on_hand", default: 0, null: false
|
627
|
+
t.datetime "created_at"
|
628
|
+
t.datetime "updated_at"
|
629
|
+
t.boolean "backorderable", default: false
|
630
|
+
t.datetime "deleted_at"
|
631
|
+
end
|
632
|
+
|
633
|
+
add_index "spree_stock_items", ["backorderable"], name: "index_spree_stock_items_on_backorderable"
|
634
|
+
add_index "spree_stock_items", ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
|
635
|
+
add_index "spree_stock_items", ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
|
636
|
+
add_index "spree_stock_items", ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
|
637
|
+
|
638
|
+
create_table "spree_stock_locations", force: true do |t|
|
639
|
+
t.string "name"
|
640
|
+
t.datetime "created_at"
|
641
|
+
t.datetime "updated_at"
|
642
|
+
t.string "address1"
|
643
|
+
t.string "address2"
|
644
|
+
t.string "city"
|
645
|
+
t.integer "state_id"
|
646
|
+
t.string "state_name"
|
647
|
+
t.integer "country_id"
|
648
|
+
t.string "zipcode"
|
649
|
+
t.string "phone"
|
650
|
+
t.boolean "active", default: true
|
651
|
+
t.boolean "backorderable_default", default: false
|
652
|
+
t.boolean "propagate_all_variants", default: true
|
653
|
+
t.string "admin_name"
|
654
|
+
end
|
655
|
+
|
656
|
+
add_index "spree_stock_locations", ["active"], name: "index_spree_stock_locations_on_active"
|
657
|
+
add_index "spree_stock_locations", ["backorderable_default"], name: "index_spree_stock_locations_on_backorderable_default"
|
658
|
+
add_index "spree_stock_locations", ["country_id"], name: "index_spree_stock_locations_on_country_id"
|
659
|
+
add_index "spree_stock_locations", ["propagate_all_variants"], name: "index_spree_stock_locations_on_propagate_all_variants"
|
660
|
+
add_index "spree_stock_locations", ["state_id"], name: "index_spree_stock_locations_on_state_id"
|
661
|
+
|
662
|
+
create_table "spree_stock_movements", force: true do |t|
|
663
|
+
t.integer "stock_item_id"
|
664
|
+
t.integer "quantity", default: 0
|
665
|
+
t.string "action"
|
666
|
+
t.datetime "created_at"
|
667
|
+
t.datetime "updated_at"
|
668
|
+
t.integer "originator_id"
|
669
|
+
t.string "originator_type"
|
410
670
|
end
|
411
671
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
t.
|
672
|
+
add_index "spree_stock_movements", ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
|
673
|
+
|
674
|
+
create_table "spree_stock_transfers", force: true do |t|
|
675
|
+
t.string "type"
|
676
|
+
t.string "reference"
|
677
|
+
t.integer "source_location_id"
|
678
|
+
t.integer "destination_location_id"
|
679
|
+
t.datetime "created_at"
|
680
|
+
t.datetime "updated_at"
|
681
|
+
t.string "number"
|
682
|
+
end
|
683
|
+
|
684
|
+
add_index "spree_stock_transfers", ["destination_location_id"], name: "index_spree_stock_transfers_on_destination_location_id"
|
685
|
+
add_index "spree_stock_transfers", ["number"], name: "index_spree_stock_transfers_on_number"
|
686
|
+
add_index "spree_stock_transfers", ["source_location_id"], name: "index_spree_stock_transfers_on_source_location_id"
|
687
|
+
|
688
|
+
create_table "spree_stores", force: true do |t|
|
689
|
+
t.string "name"
|
690
|
+
t.string "url"
|
691
|
+
t.text "meta_description"
|
692
|
+
t.text "meta_keywords"
|
693
|
+
t.string "seo_title"
|
694
|
+
t.string "mail_from_address"
|
695
|
+
t.string "default_currency"
|
696
|
+
t.string "code"
|
697
|
+
t.boolean "default", default: false, null: false
|
698
|
+
t.datetime "created_at"
|
699
|
+
t.datetime "updated_at"
|
416
700
|
end
|
417
701
|
|
418
|
-
|
702
|
+
add_index "spree_stores", ["code"], name: "index_spree_stores_on_code"
|
703
|
+
add_index "spree_stores", ["default"], name: "index_spree_stores_on_default"
|
704
|
+
add_index "spree_stores", ["url"], name: "index_spree_stores_on_url"
|
705
|
+
|
706
|
+
create_table "spree_tax_categories", force: true do |t|
|
419
707
|
t.string "name"
|
420
708
|
t.string "description"
|
421
|
-
t.
|
422
|
-
t.datetime "updated_at", :null => false
|
423
|
-
t.boolean "is_default", :default => false
|
709
|
+
t.boolean "is_default", default: false
|
424
710
|
t.datetime "deleted_at"
|
711
|
+
t.datetime "created_at"
|
712
|
+
t.datetime "updated_at"
|
425
713
|
end
|
426
714
|
|
427
|
-
|
428
|
-
|
715
|
+
add_index "spree_tax_categories", ["deleted_at"], name: "index_spree_tax_categories_on_deleted_at"
|
716
|
+
add_index "spree_tax_categories", ["is_default"], name: "index_spree_tax_categories_on_is_default"
|
717
|
+
|
718
|
+
create_table "spree_tax_rates", force: true do |t|
|
719
|
+
t.decimal "amount", precision: 8, scale: 5
|
429
720
|
t.integer "zone_id"
|
430
721
|
t.integer "tax_category_id"
|
431
|
-
t.
|
432
|
-
t.datetime "
|
433
|
-
t.
|
722
|
+
t.boolean "included_in_price", default: false
|
723
|
+
t.datetime "created_at"
|
724
|
+
t.datetime "updated_at"
|
434
725
|
t.string "name"
|
435
|
-
t.boolean "show_rate_in_label",
|
726
|
+
t.boolean "show_rate_in_label", default: true
|
727
|
+
t.datetime "deleted_at"
|
436
728
|
end
|
437
729
|
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
730
|
+
add_index "spree_tax_rates", ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"
|
731
|
+
add_index "spree_tax_rates", ["included_in_price"], name: "index_spree_tax_rates_on_included_in_price"
|
732
|
+
add_index "spree_tax_rates", ["show_rate_in_label"], name: "index_spree_tax_rates_on_show_rate_in_label"
|
733
|
+
add_index "spree_tax_rates", ["tax_category_id"], name: "index_spree_tax_rates_on_tax_category_id"
|
734
|
+
add_index "spree_tax_rates", ["zone_id"], name: "index_spree_tax_rates_on_zone_id"
|
735
|
+
|
736
|
+
create_table "spree_taxonomies", force: true do |t|
|
737
|
+
t.string "name", null: false
|
738
|
+
t.datetime "created_at"
|
739
|
+
t.datetime "updated_at"
|
740
|
+
t.integer "position", default: 0
|
442
741
|
end
|
443
742
|
|
444
|
-
|
743
|
+
add_index "spree_taxonomies", ["position"], name: "index_spree_taxonomies_on_position"
|
744
|
+
|
745
|
+
create_table "spree_taxons", force: true do |t|
|
445
746
|
t.integer "parent_id"
|
446
|
-
t.integer "position", :
|
447
|
-
t.string "name",
|
747
|
+
t.integer "position", default: 0
|
748
|
+
t.string "name", null: false
|
448
749
|
t.string "permalink"
|
449
750
|
t.integer "taxonomy_id"
|
450
|
-
t.datetime "created_at", :null => false
|
451
|
-
t.datetime "updated_at", :null => false
|
452
751
|
t.integer "lft"
|
453
752
|
t.integer "rgt"
|
454
753
|
t.string "icon_file_name"
|
@@ -456,40 +755,49 @@ ActiveRecord::Schema.define(:version => 20121121030250) do
|
|
456
755
|
t.integer "icon_file_size"
|
457
756
|
t.datetime "icon_updated_at"
|
458
757
|
t.text "description"
|
758
|
+
t.datetime "created_at"
|
759
|
+
t.datetime "updated_at"
|
760
|
+
t.string "meta_title"
|
761
|
+
t.string "meta_description"
|
762
|
+
t.string "meta_keywords"
|
763
|
+
t.integer "depth"
|
459
764
|
end
|
460
765
|
|
461
|
-
add_index "spree_taxons", ["parent_id"], :
|
462
|
-
add_index "spree_taxons", ["permalink"], :
|
463
|
-
add_index "spree_taxons", ["
|
766
|
+
add_index "spree_taxons", ["parent_id"], name: "index_taxons_on_parent_id"
|
767
|
+
add_index "spree_taxons", ["permalink"], name: "index_taxons_on_permalink"
|
768
|
+
add_index "spree_taxons", ["position"], name: "index_spree_taxons_on_position"
|
769
|
+
add_index "spree_taxons", ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
|
464
770
|
|
465
|
-
create_table "spree_tokenized_permissions", :
|
771
|
+
create_table "spree_tokenized_permissions", force: true do |t|
|
466
772
|
t.integer "permissable_id"
|
467
773
|
t.string "permissable_type"
|
468
774
|
t.string "token"
|
469
|
-
t.datetime "created_at"
|
470
|
-
t.datetime "updated_at"
|
775
|
+
t.datetime "created_at"
|
776
|
+
t.datetime "updated_at"
|
471
777
|
end
|
472
778
|
|
473
|
-
add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], :
|
779
|
+
add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], name: "index_tokenized_name_and_type"
|
474
780
|
|
475
|
-
create_table "spree_trackers", :
|
781
|
+
create_table "spree_trackers", force: true do |t|
|
476
782
|
t.string "environment"
|
477
783
|
t.string "analytics_id"
|
478
|
-
t.boolean "active", :
|
479
|
-
t.datetime "created_at"
|
480
|
-
t.datetime "updated_at"
|
784
|
+
t.boolean "active", default: true
|
785
|
+
t.datetime "created_at"
|
786
|
+
t.datetime "updated_at"
|
481
787
|
end
|
482
788
|
|
483
|
-
|
484
|
-
|
485
|
-
|
789
|
+
add_index "spree_trackers", ["active"], name: "index_spree_trackers_on_active"
|
790
|
+
|
791
|
+
create_table "spree_users", force: true do |t|
|
792
|
+
t.string "encrypted_password", limit: 128
|
793
|
+
t.string "password_salt", limit: 128
|
486
794
|
t.string "email"
|
487
795
|
t.string "remember_token"
|
488
796
|
t.string "persistence_token"
|
489
797
|
t.string "reset_password_token"
|
490
798
|
t.string "perishable_token"
|
491
|
-
t.integer "sign_in_count",
|
492
|
-
t.integer "failed_attempts",
|
799
|
+
t.integer "sign_in_count", default: 0, null: false
|
800
|
+
t.integer "failed_attempts", default: 0, null: false
|
493
801
|
t.datetime "last_request_at"
|
494
802
|
t.datetime "current_sign_in_at"
|
495
803
|
t.datetime "last_sign_in_at"
|
@@ -498,51 +806,64 @@ ActiveRecord::Schema.define(:version => 20121121030250) do
|
|
498
806
|
t.string "login"
|
499
807
|
t.integer "ship_address_id"
|
500
808
|
t.integer "bill_address_id"
|
501
|
-
t.datetime "created_at", :null => false
|
502
|
-
t.datetime "updated_at", :null => false
|
503
809
|
t.string "authentication_token"
|
504
810
|
t.string "unlock_token"
|
505
811
|
t.datetime "locked_at"
|
506
|
-
t.datetime "remember_created_at"
|
507
812
|
t.datetime "reset_password_sent_at"
|
813
|
+
t.datetime "created_at"
|
814
|
+
t.datetime "updated_at"
|
815
|
+
t.string "spree_api_key", limit: 48
|
816
|
+
t.datetime "remember_created_at"
|
508
817
|
end
|
509
818
|
|
510
|
-
add_index "spree_users", ["email"], :
|
511
|
-
add_index "spree_users", ["
|
819
|
+
add_index "spree_users", ["email"], name: "email_idx_unique", unique: true
|
820
|
+
add_index "spree_users", ["spree_api_key"], name: "index_spree_users_on_spree_api_key"
|
512
821
|
|
513
|
-
create_table "spree_variants", :
|
514
|
-
t.string "sku",
|
515
|
-
t.decimal "
|
516
|
-
t.decimal "
|
517
|
-
t.decimal "
|
518
|
-
t.decimal "
|
519
|
-
t.decimal "depth", :precision => 8, :scale => 2
|
822
|
+
create_table "spree_variants", force: true do |t|
|
823
|
+
t.string "sku", default: "", null: false
|
824
|
+
t.decimal "weight", precision: 8, scale: 2, default: 0.0
|
825
|
+
t.decimal "height", precision: 8, scale: 2
|
826
|
+
t.decimal "width", precision: 8, scale: 2
|
827
|
+
t.decimal "depth", precision: 8, scale: 2
|
520
828
|
t.datetime "deleted_at"
|
521
|
-
t.boolean "is_master",
|
829
|
+
t.boolean "is_master", default: false
|
522
830
|
t.integer "product_id"
|
523
|
-
t.
|
524
|
-
t.decimal "cost_price", :precision => 8, :scale => 2
|
831
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
525
832
|
t.integer "position"
|
526
|
-
t.
|
833
|
+
t.string "cost_currency"
|
834
|
+
t.boolean "track_inventory", default: true
|
835
|
+
t.integer "tax_category_id"
|
836
|
+
t.datetime "updated_at"
|
527
837
|
end
|
528
838
|
|
529
|
-
add_index "spree_variants", ["
|
839
|
+
add_index "spree_variants", ["deleted_at"], name: "index_spree_variants_on_deleted_at"
|
840
|
+
add_index "spree_variants", ["is_master"], name: "index_spree_variants_on_is_master"
|
841
|
+
add_index "spree_variants", ["position"], name: "index_spree_variants_on_position"
|
842
|
+
add_index "spree_variants", ["product_id"], name: "index_spree_variants_on_product_id"
|
843
|
+
add_index "spree_variants", ["sku"], name: "index_spree_variants_on_sku"
|
844
|
+
add_index "spree_variants", ["tax_category_id"], name: "index_spree_variants_on_tax_category_id"
|
845
|
+
add_index "spree_variants", ["track_inventory"], name: "index_spree_variants_on_track_inventory"
|
530
846
|
|
531
|
-
create_table "spree_zone_members", :
|
847
|
+
create_table "spree_zone_members", force: true do |t|
|
532
848
|
t.integer "zoneable_id"
|
533
849
|
t.string "zoneable_type"
|
534
850
|
t.integer "zone_id"
|
535
|
-
t.datetime "created_at"
|
536
|
-
t.datetime "updated_at"
|
851
|
+
t.datetime "created_at"
|
852
|
+
t.datetime "updated_at"
|
537
853
|
end
|
538
854
|
|
539
|
-
|
855
|
+
add_index "spree_zone_members", ["zone_id"], name: "index_spree_zone_members_on_zone_id"
|
856
|
+
add_index "spree_zone_members", ["zoneable_id", "zoneable_type"], name: "index_spree_zone_members_on_zoneable_id_and_zoneable_type"
|
857
|
+
|
858
|
+
create_table "spree_zones", force: true do |t|
|
540
859
|
t.string "name"
|
541
860
|
t.string "description"
|
542
|
-
t.
|
543
|
-
t.
|
544
|
-
t.
|
545
|
-
t.
|
861
|
+
t.boolean "default_tax", default: false
|
862
|
+
t.integer "zone_members_count", default: 0
|
863
|
+
t.datetime "created_at"
|
864
|
+
t.datetime "updated_at"
|
546
865
|
end
|
547
866
|
|
867
|
+
add_index "spree_zones", ["default_tax"], name: "index_spree_zones_on_default_tax"
|
868
|
+
|
548
869
|
end
|