spree_purchase_order 3.2.0.rc1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/spree/admin/payments/source_views/_purchaseorder.html.erb +13 -0
- data/app/views/spree/checkout/payment/_purchaseorder.html.erb +2 -2
- data/config/locales/en.yml +2 -0
- data/lib/spree_purchase_order/version.rb +1 -1
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/db/migrate/20180516181839_spree_one_two.spree.rb +482 -0
- data/spec/dummy/db/migrate/20180516181840_spree_promo_one_two.spree.rb +46 -0
- data/spec/dummy/db/migrate/20180516181841_add_tax_rate_label.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181842_add_toggle_tax_rate_display.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181844_add_lock_version_to_variant.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181845_add_states_required_to_countries.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181846_add_on_demand_to_product_and_variant.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181847_remove_not_null_constraint_from_products_on_hand.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516181848_split_prices_from_variants.spree.rb +32 -0
- data/spec/dummy/db/migrate/20180516181849_remove_not_null_from_spree_prices_amount.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181850_add_currency_to_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181851_add_currency_to_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181852_add_cost_currency_to_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181853_remove_display_on_from_payment_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181854_add_position_to_taxonomies.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181855_add_last_ip_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181856_add_state_to_spree_adjustments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181857_add_display_on_to_spree_payment_methods.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181858_add_position_to_product_properties.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181859_add_identifier_to_spree_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181860_add_order_id_index_to_payments.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181861_add_primary_to_spree_products_taxons.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516181863_create_spree_stock_locations.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516181864_create_default_stock.spree.rb +34 -0
- data/spec/dummy/db/migrate/20180516181865_add_order_id_index_to_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181866_change_meta_description_on_spree_products_to_text.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181867_add_stock_location_id_to_spree_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181868_add_pending_to_inventory_unit.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181869_remove_on_demand_from_product_and_variant.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181870_create_shipping_method_zone.spree.rb +22 -0
- data/spec/dummy/db/migrate/20180516181871_remove_shipping_category_id_from_shipping_method.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181872_create_shipping_method_categories.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516181873_add_tracking_url_to_spree_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181874_create_spree_shipping_rates.spree.rb +25 -0
- data/spec/dummy/db/migrate/20180516181875_remove_category_match_attributes_from_shipping_method.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181876_create_stock_movements.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516181877_add_address_fields_to_stock_location.spree.rb +23 -0
- data/spec/dummy/db/migrate/20180516181878_add_active_field_to_stock_locations.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181879_add_backorderable_to_stock_item.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181880_add_default_quantity_to_stock_movement.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181881_add_source_and_destination_to_stock_movements.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181882_change_orders_total_precision.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181883_change_spree_payments_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181884_change_spree_return_authorization_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181885_change_adjustments_amount_precision.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181886_add_originator_to_stock_movement.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181887_drop_source_and_destination_from_stock_movement.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516181888_migrate_inventory_unit_sold_to_on_hand.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181889_add_stock_location_to_rma.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181890_update_shipment_state_for_canceled_orders.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516181891_add_seo_metas_to_taxons.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181892_remove_stock_item_and_variant_lock.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516181893_add_name_to_spree_credit_cards.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181894_update_name_fields_on_spree_credit_cards.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516181895_add_index_to_source_columns_on_adjustments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181896_update_adjustment_states.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516181897_add_shipping_rates_to_shipments.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516181898_create_spree_stock_transfers.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516181899_drop_products_count_on_hand.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181900_set_default_shipping_rate_cost.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181901_add_number_to_stock_transfer.spree.rb +24 -0
- data/spec/dummy/db/migrate/20180516181902_add_sku_index_to_spree_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181903_add_backorderable_default_to_spree_stock_location.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181904_add_propage_all_variants_to_spree_stock_location.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181905_rename_shipping_methods_zones_to_spree_shipping_methods_zones.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181906_add_user_id_index_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181907_add_updated_at_to_spree_countries.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181908_add_updated_at_to_spree_states.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181909_add_cvv_result_code_and_cvv_result_message_to_spree_payments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181910_add_unique_index_to_permalink_on_spree_products.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181911_add_unique_index_to_orders_shipments_and_stock_transfers.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181912_add_deleted_at_to_spree_tax_rates.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181913_remove_lock_version_from_inventory_units.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181914_add_cost_price_to_line_item.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181915_set_backorderable_to_default_to_false.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181916_add_created_by_id_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181917_index_completed_at_on_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181918_add_tax_category_id_to_spree_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181919_migrate_tax_categories_to_line_items.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516181920_drop_spree_mail_methods.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516181921_set_default_stock_location_on_shipments.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181922_upgrade_adjustments.spree.rb +41 -0
- data/spec/dummy/db/migrate/20180516181923_rename_adjustment_fields.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516181924_add_admin_name_column_to_spree_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181925_add_admin_name_column_to_spree_stock_locations.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181926_add_shipment_total_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181927_expand_order_number_size.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181928_rename_activators_to_promotions.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181929_add_adjustment_total_to_line_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181930_add_adjustment_total_to_shipments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516181932_add_tax_total_to_line_items_shipments_and_orders.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181933_add_shipping_category_to_shipping_methods_and_products.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516181934_migrate_old_shipping_calculators.spree.rb +20 -0
- data/spec/dummy/db/migrate/20180516181935_add_code_to_spree_promotion_rules.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181936_change_states_required_for_countries.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181937_add_deleted_at_to_spree_stock_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181938_remove_promotions_event_name_field.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181939_add_promo_total_to_line_items_and_shipments_and_orders.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181940_remove_unused_credit_card_fields.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516181941_add_track_inventory_to_variant.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181942_add_tax_category_to_variants.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181943_add_channel_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181944_add_included_to_adjustments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181945_rename_tax_total_fields.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516181946_add_line_item_id_to_spree_inventory_units.spree.rb +22 -0
- data/spec/dummy/db/migrate/20180516181947_add_updated_at_to_variants.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181948_add_position_to_classifications.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181949_create_spree_orders_promotions.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181950_unique_shipping_method_categories.spree.rb +25 -0
- data/spec/dummy/db/migrate/20180516181951_add_item_count_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181952_remove_value_type_from_spree_preferences.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181953_rename_permalink_to_slug_for_products.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181954_add_index_to_variant_id_and_currency_on_prices.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181955_rename_activator_id_in_rules_and_actions_to_promotion_id.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181956_add_deleted_at_to_spree_prices.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181957_add_approver_id_and_approved_at_to_orders.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181958_add_confirmation_delivered_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181959_add_auto_capture_to_payment_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181960_create_spree_payment_capture_events.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516181961_add_uncaptured_amount_to_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181962_default_variant_weight_to_zero.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516181963_add_tax_category_id_to_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181964_add_tax_rate_id_to_shipping_rates.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181965_add_pre_tax_amount_to_line_items_and_shipments.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181966_add_more_indexes.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516181967_add_considered_risky_to_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181968_add_preference_store_to_everything.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181969_add_user_id_to_spree_credit_cards.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516181970_migrate_old_preferences.spree.rb +24 -0
- data/spec/dummy/db/migrate/20180516181971_create_spree_stores.spree.rb +26 -0
- data/spec/dummy/db/migrate/20180516181972_create_store_from_preferences.spree.rb +38 -0
- data/spec/dummy/db/migrate/20180516181973_add_timestamps_to_spree_assets.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181974_create_spree_taxons_promotion_rules.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181975_add_additional_store_fields.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181976_add_many_missing_indexes.spree.rb +19 -0
- data/spec/dummy/db/migrate/20180516181977_correct_some_polymorphic_index_and_add_more_missing.spree.rb +67 -0
- data/spec/dummy/db/migrate/20180516181978_add_user_id_created_by_id_index_to_order.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181979_change_spree_price_amount_precision.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516181980_add_token_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181981_move_order_token_from_tokenized_permission.spree.rb +30 -0
- data/spec/dummy/db/migrate/20180516181982_set_shipment_total_for_users_upgrading.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516181983_drop_credit_card_first_name_and_last_name.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181984_add_deleted_at_to_spree_promotion_actions.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181985_remove_uncaptured_amount_from_spree_payments.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181986_create_spree_refunds.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516181987_create_spree_return_authorization_inventory_unit.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516181988_rename_return_authorization_inventory_unit_to_return_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181989_backfill_line_item_pre_tax_amount.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516181990_recreate_spree_return_authorizations.spree.rb +56 -0
- data/spec/dummy/db/migrate/20180516181991_add_amount_fields_to_return_items.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516181992_drop_return_authorization_amount.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb +29 -0
- data/spec/dummy/db/migrate/20180516181994_create_spree_refund_reasons.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516181995_rename_return_authorization_reason.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516181996_create_spree_promotion_categories.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516181997_drop_received_at_on_return_items.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516181998_add_reception_and_acceptance_status_to_return_items.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516181999_create_default_refund_reason.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182000_add_default_to_spree_stock_locations.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516182001_create_spree_customer_returns.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182002_add_customer_return_id_to_return_item.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182003_create_friendly_id_slugs.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516182004_rename_spree_refund_return_authorization_id.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182005_increase_return_item_pre_tax_amount_precision.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516182006_copy_product_slugs_to_slug_history.spree.rb +16 -0
- data/spec/dummy/db/migrate/20180516182007_create_spree_reimbursements.spree.rb +22 -0
- data/spec/dummy/db/migrate/20180516182008_add_promotionable_to_spree_products.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182009_add_exchange_inventory_unit_foreign_keys.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516182010_add_acceptance_status_errors_to_return_item.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182011_create_spree_reimbursement_types.spree.rb +21 -0
- data/spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516182013_add_default_to_spree_credit_cards.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182014_make_existing_credit_cards_default.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516182015_add_type_to_reimbursement_type.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182016_create_spree_reimbursement_credits.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516182017_add_meta_title_to_spree_products.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516182018_add_kind_to_zone.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516182019_add_code_to_spree_tax_categories.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182020_default_pre_tax_amount_should_be_zero.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182021_add_code_to_spree_shipping_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182022_add_cancel_audit_fields_to_spree_orders.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516182024_create_spree_taxons_prototypes.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516182025_add_state_lock_version_to_order.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182026_add_counter_cache_from_spree_variants_to_spree_stock_items.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516182027_fix_adjustment_order_presence.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516182028_update_classifications_positions.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182029_add_guest_token_index_to_spree_orders.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182030_remove_token_permissions_table.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182031_remove_extra_products_slug_index.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182032_update_product_slug_index.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182033_rename_identifier_to_number_for_payment.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182034_create_spree_store_credits.spree.rb +25 -0
- data/spec/dummy/db/migrate/20180516182035_create_spree_store_credit_categories.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516182036_create_spree_store_credit_events.spree.rb +18 -0
- data/spec/dummy/db/migrate/20180516182037_create_spree_store_credit_types.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516182038_remove_environment_from_payment_method.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182039_add_resellable_to_return_items.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182040_add_code_to_spree_promotion_categories.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182041_remove_environment_from_tracker.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182042_remove_spree_configurations.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516182043_add_index_to_spree_stock_items_variant_id.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516182044_ensure_payments_have_numbers.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182045_add_missing_indexes_on_spree_tables.spree.rb +68 -0
- data/spec/dummy/db/migrate/20180516182046_remove_duplicated_indexes_from_multi_columns.spree.rb +19 -0
- data/spec/dummy/db/migrate/20180516182047_remove_user_index_from_spree_state_changes.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516182048_fix_adjustment_order_id.spree.rb +71 -0
- data/spec/dummy/db/migrate/20180516182049_add_position_to_spree_payment_methods.spree.rb +6 -0
- data/spec/dummy/db/migrate/20180516182050_add_deleted_at_to_friendly_id_slugs.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182051_increase_scale_on_pre_tax_amounts.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516182052_add_taxable_adjustment_total_to_line_item.spree.rb +20 -0
- data/spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516182054_enable_acts_as_paranoid_on_calculators.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb +13 -0
- data/spec/dummy/db/migrate/20180516182056_rename_has_and_belongs_to_associations_to_model_names.spree.rb +19 -0
- data/spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb +12 -0
- data/spec/dummy/db/migrate/20180516182058_add_discontinued_to_products_and_variants.spree.rb +69 -0
- data/spec/dummy/db/migrate/20180516182059_remove_shipping_method_id_from_spree_orders.spree.rb +14 -0
- data/spec/dummy/db/migrate/20180516182060_add_id_column_to_earlier_habtm_tables.spree.rb +17 -0
- data/spec/dummy/db/migrate/20180516182061_add_indexes.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516182062_remove_counter_cache_from_spree_variants_to_spree_stock_items.spree.rb +11 -0
- data/spec/dummy/db/migrate/20180516182063_acts_as_taggable_on_spree_migration.spree.rb +41 -0
- data/spec/dummy/db/migrate/20180516182064_change_collation_for_spree_tag_names.spree.rb +10 -0
- data/spec/dummy/db/migrate/20180516182065_add_missing_indexes_to_spree_taggings.spree.rb +15 -0
- data/spec/dummy/db/migrate/20180516182066_add_zipcode_required_to_spree_countries.spree.rb +8 -0
- data/spec/dummy/db/migrate/20180516182067_add_created_at_to_variant.spree.rb +9 -0
- data/spec/dummy/db/migrate/20180516182068_add_null_false_to_spree_variants_timestamps.spree.rb +7 -0
- data/spec/dummy/db/migrate/20180516182069_create_spree_purchase_orders.spree_purchase_order.rb +11 -0
- data/spec/dummy/db/migrate/20180516182070_add_payment_method_id_to_spree_purchase_orders.spree_purchase_order.rb +7 -0
- data/spec/dummy/db/migrate/20180516182071_add_user_id_to_spree_purchase_orders.spree_purchase_order.rb +7 -0
- data/spec/dummy/db/schema.rb +1027 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +27686 -0
- data/spec/dummy/tmp/cache/17E/D61/spree%2Fapp_configuration%2Fdefault_seo_title +1 -0
- data/spec/dummy/tmp/cache/334/AA1/spree%2Fapp_configuration%2Fdefault_meta_keywords +1 -0
- data/spec/dummy/tmp/cache/3A7/4A1/spree%2Fapp_configuration%2Faddress_requires_state +1 -0
- data/spec/dummy/tmp/cache/460/D81/spree%2Fapp_configuration%2Fdefault_meta_description +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/factories/purchase_orders.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +498 -7
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from spree_purchase_order (originally 20161214190805)
|
2
|
+
class AddPaymentMethodIdToSpreePurchaseOrders < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :spree_purchase_orders, :payment_method_id, :integer
|
5
|
+
add_index :spree_purchase_orders, :payment_method_id
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,1027 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your
|
6
|
+
# database schema. If you need to create the application database on another
|
7
|
+
# system, you should be using db:schema:load, not running all the migrations
|
8
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(version: 20180516182071) do
|
14
|
+
|
15
|
+
create_table "friendly_id_slugs", force: :cascade do |t|
|
16
|
+
t.string "slug", null: false
|
17
|
+
t.integer "sluggable_id", null: false
|
18
|
+
t.string "sluggable_type", limit: 50
|
19
|
+
t.string "scope"
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "deleted_at"
|
22
|
+
t.index ["deleted_at"], name: "index_friendly_id_slugs_on_deleted_at"
|
23
|
+
t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
|
24
|
+
t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
|
25
|
+
t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
|
26
|
+
t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "spree_addresses", force: :cascade do |t|
|
30
|
+
t.string "firstname"
|
31
|
+
t.string "lastname"
|
32
|
+
t.string "address1"
|
33
|
+
t.string "address2"
|
34
|
+
t.string "city"
|
35
|
+
t.string "zipcode"
|
36
|
+
t.string "phone"
|
37
|
+
t.string "state_name"
|
38
|
+
t.string "alternative_phone"
|
39
|
+
t.string "company"
|
40
|
+
t.integer "state_id"
|
41
|
+
t.integer "country_id"
|
42
|
+
t.datetime "created_at", null: false
|
43
|
+
t.datetime "updated_at", null: false
|
44
|
+
t.index ["country_id"], name: "index_spree_addresses_on_country_id"
|
45
|
+
t.index ["firstname"], name: "index_addresses_on_firstname"
|
46
|
+
t.index ["lastname"], name: "index_addresses_on_lastname"
|
47
|
+
t.index ["state_id"], name: "index_spree_addresses_on_state_id"
|
48
|
+
end
|
49
|
+
|
50
|
+
create_table "spree_adjustments", force: :cascade do |t|
|
51
|
+
t.string "source_type"
|
52
|
+
t.integer "source_id"
|
53
|
+
t.string "adjustable_type"
|
54
|
+
t.integer "adjustable_id"
|
55
|
+
t.decimal "amount", precision: 10, scale: 2
|
56
|
+
t.string "label"
|
57
|
+
t.boolean "mandatory"
|
58
|
+
t.boolean "eligible", default: true
|
59
|
+
t.datetime "created_at", null: false
|
60
|
+
t.datetime "updated_at", null: false
|
61
|
+
t.string "state"
|
62
|
+
t.integer "order_id", null: false
|
63
|
+
t.boolean "included", default: false
|
64
|
+
t.index ["adjustable_id", "adjustable_type"], name: "index_spree_adjustments_on_adjustable_id_and_adjustable_type"
|
65
|
+
t.index ["eligible"], name: "index_spree_adjustments_on_eligible"
|
66
|
+
t.index ["order_id"], name: "index_spree_adjustments_on_order_id"
|
67
|
+
t.index ["source_id", "source_type"], name: "index_spree_adjustments_on_source_id_and_source_type"
|
68
|
+
end
|
69
|
+
|
70
|
+
create_table "spree_assets", force: :cascade do |t|
|
71
|
+
t.string "viewable_type"
|
72
|
+
t.integer "viewable_id"
|
73
|
+
t.integer "attachment_width"
|
74
|
+
t.integer "attachment_height"
|
75
|
+
t.integer "attachment_file_size"
|
76
|
+
t.integer "position"
|
77
|
+
t.string "attachment_content_type"
|
78
|
+
t.string "attachment_file_name"
|
79
|
+
t.string "type", limit: 75
|
80
|
+
t.datetime "attachment_updated_at"
|
81
|
+
t.text "alt"
|
82
|
+
t.datetime "created_at"
|
83
|
+
t.datetime "updated_at"
|
84
|
+
t.index ["position"], name: "index_spree_assets_on_position"
|
85
|
+
t.index ["viewable_id"], name: "index_assets_on_viewable_id"
|
86
|
+
t.index ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"
|
87
|
+
end
|
88
|
+
|
89
|
+
create_table "spree_calculators", force: :cascade do |t|
|
90
|
+
t.string "type"
|
91
|
+
t.string "calculable_type"
|
92
|
+
t.integer "calculable_id"
|
93
|
+
t.datetime "created_at", null: false
|
94
|
+
t.datetime "updated_at", null: false
|
95
|
+
t.text "preferences"
|
96
|
+
t.datetime "deleted_at"
|
97
|
+
t.index ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"
|
98
|
+
t.index ["deleted_at"], name: "index_spree_calculators_on_deleted_at"
|
99
|
+
t.index ["id", "type"], name: "index_spree_calculators_on_id_and_type"
|
100
|
+
end
|
101
|
+
|
102
|
+
create_table "spree_countries", force: :cascade do |t|
|
103
|
+
t.string "iso_name"
|
104
|
+
t.string "iso"
|
105
|
+
t.string "iso3"
|
106
|
+
t.string "name"
|
107
|
+
t.integer "numcode"
|
108
|
+
t.boolean "states_required", default: false
|
109
|
+
t.datetime "updated_at"
|
110
|
+
t.boolean "zipcode_required", default: true
|
111
|
+
end
|
112
|
+
|
113
|
+
create_table "spree_credit_cards", force: :cascade do |t|
|
114
|
+
t.string "month"
|
115
|
+
t.string "year"
|
116
|
+
t.string "cc_type"
|
117
|
+
t.string "last_digits"
|
118
|
+
t.integer "address_id"
|
119
|
+
t.string "gateway_customer_profile_id"
|
120
|
+
t.string "gateway_payment_profile_id"
|
121
|
+
t.datetime "created_at", null: false
|
122
|
+
t.datetime "updated_at", null: false
|
123
|
+
t.string "name"
|
124
|
+
t.integer "user_id"
|
125
|
+
t.integer "payment_method_id"
|
126
|
+
t.boolean "default", default: false, null: false
|
127
|
+
t.index ["address_id"], name: "index_spree_credit_cards_on_address_id"
|
128
|
+
t.index ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"
|
129
|
+
t.index ["user_id"], name: "index_spree_credit_cards_on_user_id"
|
130
|
+
end
|
131
|
+
|
132
|
+
create_table "spree_customer_returns", force: :cascade do |t|
|
133
|
+
t.string "number"
|
134
|
+
t.integer "stock_location_id"
|
135
|
+
t.datetime "created_at", null: false
|
136
|
+
t.datetime "updated_at", null: false
|
137
|
+
end
|
138
|
+
|
139
|
+
create_table "spree_gateways", force: :cascade do |t|
|
140
|
+
t.string "type"
|
141
|
+
t.string "name"
|
142
|
+
t.text "description"
|
143
|
+
t.boolean "active", default: true
|
144
|
+
t.string "environment", default: "development"
|
145
|
+
t.string "server", default: "test"
|
146
|
+
t.boolean "test_mode", default: true
|
147
|
+
t.datetime "created_at", null: false
|
148
|
+
t.datetime "updated_at", null: false
|
149
|
+
t.text "preferences"
|
150
|
+
t.index ["active"], name: "index_spree_gateways_on_active"
|
151
|
+
t.index ["test_mode"], name: "index_spree_gateways_on_test_mode"
|
152
|
+
end
|
153
|
+
|
154
|
+
create_table "spree_inventory_units", force: :cascade do |t|
|
155
|
+
t.string "state"
|
156
|
+
t.integer "variant_id"
|
157
|
+
t.integer "order_id"
|
158
|
+
t.integer "shipment_id"
|
159
|
+
t.datetime "created_at", null: false
|
160
|
+
t.datetime "updated_at", null: false
|
161
|
+
t.boolean "pending", default: true
|
162
|
+
t.integer "line_item_id"
|
163
|
+
t.index ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"
|
164
|
+
t.index ["order_id"], name: "index_inventory_units_on_order_id"
|
165
|
+
t.index ["shipment_id"], name: "index_inventory_units_on_shipment_id"
|
166
|
+
t.index ["variant_id"], name: "index_inventory_units_on_variant_id"
|
167
|
+
end
|
168
|
+
|
169
|
+
create_table "spree_line_items", force: :cascade do |t|
|
170
|
+
t.integer "variant_id"
|
171
|
+
t.integer "order_id"
|
172
|
+
t.integer "quantity", null: false
|
173
|
+
t.decimal "price", precision: 10, scale: 2, null: false
|
174
|
+
t.datetime "created_at", null: false
|
175
|
+
t.datetime "updated_at", null: false
|
176
|
+
t.string "currency"
|
177
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
178
|
+
t.integer "tax_category_id"
|
179
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
|
180
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
181
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
182
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
183
|
+
t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
|
184
|
+
t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
185
|
+
t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
186
|
+
t.index ["order_id"], name: "index_spree_line_items_on_order_id"
|
187
|
+
t.index ["tax_category_id"], name: "index_spree_line_items_on_tax_category_id"
|
188
|
+
t.index ["variant_id"], name: "index_spree_line_items_on_variant_id"
|
189
|
+
end
|
190
|
+
|
191
|
+
create_table "spree_log_entries", force: :cascade do |t|
|
192
|
+
t.string "source_type"
|
193
|
+
t.integer "source_id"
|
194
|
+
t.text "details"
|
195
|
+
t.datetime "created_at", null: false
|
196
|
+
t.datetime "updated_at", null: false
|
197
|
+
t.index ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"
|
198
|
+
end
|
199
|
+
|
200
|
+
create_table "spree_option_type_prototypes", force: :cascade do |t|
|
201
|
+
t.integer "prototype_id"
|
202
|
+
t.integer "option_type_id"
|
203
|
+
t.index ["option_type_id"], name: "index_spree_option_type_prototypes_on_option_type_id"
|
204
|
+
t.index ["prototype_id", "option_type_id"], name: "index_option_types_prototypes_on_prototype_and_option_type"
|
205
|
+
end
|
206
|
+
|
207
|
+
create_table "spree_option_types", force: :cascade do |t|
|
208
|
+
t.string "name", limit: 100
|
209
|
+
t.string "presentation", limit: 100
|
210
|
+
t.integer "position", default: 0, null: false
|
211
|
+
t.datetime "created_at", null: false
|
212
|
+
t.datetime "updated_at", null: false
|
213
|
+
t.index ["name"], name: "index_spree_option_types_on_name"
|
214
|
+
t.index ["position"], name: "index_spree_option_types_on_position"
|
215
|
+
end
|
216
|
+
|
217
|
+
create_table "spree_option_value_variants", force: :cascade do |t|
|
218
|
+
t.integer "variant_id"
|
219
|
+
t.integer "option_value_id"
|
220
|
+
t.index ["option_value_id"], name: "index_spree_option_value_variants_on_option_value_id"
|
221
|
+
t.index ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id"
|
222
|
+
end
|
223
|
+
|
224
|
+
create_table "spree_option_values", force: :cascade do |t|
|
225
|
+
t.integer "position"
|
226
|
+
t.string "name"
|
227
|
+
t.string "presentation"
|
228
|
+
t.integer "option_type_id"
|
229
|
+
t.datetime "created_at", null: false
|
230
|
+
t.datetime "updated_at", null: false
|
231
|
+
t.index ["name"], name: "index_spree_option_values_on_name"
|
232
|
+
t.index ["option_type_id"], name: "index_spree_option_values_on_option_type_id"
|
233
|
+
t.index ["position"], name: "index_spree_option_values_on_position"
|
234
|
+
end
|
235
|
+
|
236
|
+
create_table "spree_order_promotions", force: :cascade do |t|
|
237
|
+
t.integer "order_id"
|
238
|
+
t.integer "promotion_id"
|
239
|
+
t.index ["order_id"], name: "index_spree_order_promotions_on_order_id"
|
240
|
+
t.index ["promotion_id", "order_id"], name: "index_spree_order_promotions_on_promotion_id_and_order_id"
|
241
|
+
end
|
242
|
+
|
243
|
+
create_table "spree_orders", force: :cascade do |t|
|
244
|
+
t.string "number", limit: 32
|
245
|
+
t.decimal "item_total", precision: 10, scale: 2, default: "0.0", null: false
|
246
|
+
t.decimal "total", precision: 10, scale: 2, default: "0.0", null: false
|
247
|
+
t.string "state"
|
248
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
249
|
+
t.integer "user_id"
|
250
|
+
t.datetime "completed_at"
|
251
|
+
t.integer "bill_address_id"
|
252
|
+
t.integer "ship_address_id"
|
253
|
+
t.decimal "payment_total", precision: 10, scale: 2, default: "0.0"
|
254
|
+
t.string "shipment_state"
|
255
|
+
t.string "payment_state"
|
256
|
+
t.string "email"
|
257
|
+
t.text "special_instructions"
|
258
|
+
t.datetime "created_at", null: false
|
259
|
+
t.datetime "updated_at", null: false
|
260
|
+
t.string "currency"
|
261
|
+
t.string "last_ip_address"
|
262
|
+
t.integer "created_by_id"
|
263
|
+
t.decimal "shipment_total", precision: 10, scale: 2, default: "0.0", null: false
|
264
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
265
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
266
|
+
t.string "channel", default: "spree"
|
267
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
268
|
+
t.integer "item_count", default: 0
|
269
|
+
t.integer "approver_id"
|
270
|
+
t.datetime "approved_at"
|
271
|
+
t.boolean "confirmation_delivered", default: false
|
272
|
+
t.boolean "considered_risky", default: false
|
273
|
+
t.string "guest_token"
|
274
|
+
t.datetime "canceled_at"
|
275
|
+
t.integer "canceler_id"
|
276
|
+
t.integer "store_id"
|
277
|
+
t.integer "state_lock_version", default: 0, null: false
|
278
|
+
t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
279
|
+
t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
280
|
+
t.index ["approver_id"], name: "index_spree_orders_on_approver_id"
|
281
|
+
t.index ["bill_address_id"], name: "index_spree_orders_on_bill_address_id"
|
282
|
+
t.index ["canceler_id"], name: "index_spree_orders_on_canceler_id"
|
283
|
+
t.index ["completed_at"], name: "index_spree_orders_on_completed_at"
|
284
|
+
t.index ["confirmation_delivered"], name: "index_spree_orders_on_confirmation_delivered"
|
285
|
+
t.index ["considered_risky"], name: "index_spree_orders_on_considered_risky"
|
286
|
+
t.index ["created_by_id"], name: "index_spree_orders_on_created_by_id"
|
287
|
+
t.index ["guest_token"], name: "index_spree_orders_on_guest_token"
|
288
|
+
t.index ["number"], name: "index_spree_orders_on_number"
|
289
|
+
t.index ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"
|
290
|
+
t.index ["store_id"], name: "index_spree_orders_on_store_id"
|
291
|
+
t.index ["user_id", "created_by_id"], name: "index_spree_orders_on_user_id_and_created_by_id"
|
292
|
+
end
|
293
|
+
|
294
|
+
create_table "spree_payment_capture_events", force: :cascade do |t|
|
295
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0"
|
296
|
+
t.integer "payment_id"
|
297
|
+
t.datetime "created_at", null: false
|
298
|
+
t.datetime "updated_at", null: false
|
299
|
+
t.index ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"
|
300
|
+
end
|
301
|
+
|
302
|
+
create_table "spree_payment_methods", force: :cascade do |t|
|
303
|
+
t.string "type"
|
304
|
+
t.string "name"
|
305
|
+
t.text "description"
|
306
|
+
t.boolean "active", default: true
|
307
|
+
t.datetime "deleted_at"
|
308
|
+
t.datetime "created_at", null: false
|
309
|
+
t.datetime "updated_at", null: false
|
310
|
+
t.string "display_on", default: "both"
|
311
|
+
t.boolean "auto_capture"
|
312
|
+
t.text "preferences"
|
313
|
+
t.integer "position", default: 0
|
314
|
+
t.index ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"
|
315
|
+
end
|
316
|
+
|
317
|
+
create_table "spree_payments", force: :cascade do |t|
|
318
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
319
|
+
t.integer "order_id"
|
320
|
+
t.string "source_type"
|
321
|
+
t.integer "source_id"
|
322
|
+
t.integer "payment_method_id"
|
323
|
+
t.string "state"
|
324
|
+
t.string "response_code"
|
325
|
+
t.string "avs_response"
|
326
|
+
t.datetime "created_at", null: false
|
327
|
+
t.datetime "updated_at", null: false
|
328
|
+
t.string "number"
|
329
|
+
t.string "cvv_response_code"
|
330
|
+
t.string "cvv_response_message"
|
331
|
+
t.index ["number"], name: "index_spree_payments_on_number"
|
332
|
+
t.index ["order_id"], name: "index_spree_payments_on_order_id"
|
333
|
+
t.index ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"
|
334
|
+
t.index ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"
|
335
|
+
end
|
336
|
+
|
337
|
+
create_table "spree_preferences", force: :cascade do |t|
|
338
|
+
t.text "value"
|
339
|
+
t.string "key"
|
340
|
+
t.datetime "created_at", null: false
|
341
|
+
t.datetime "updated_at", null: false
|
342
|
+
t.index ["key"], name: "index_spree_preferences_on_key", unique: true
|
343
|
+
end
|
344
|
+
|
345
|
+
create_table "spree_prices", force: :cascade do |t|
|
346
|
+
t.integer "variant_id", null: false
|
347
|
+
t.decimal "amount", precision: 10, scale: 2
|
348
|
+
t.string "currency"
|
349
|
+
t.datetime "deleted_at"
|
350
|
+
t.index ["deleted_at"], name: "index_spree_prices_on_deleted_at"
|
351
|
+
t.index ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
|
352
|
+
t.index ["variant_id"], name: "index_spree_prices_on_variant_id"
|
353
|
+
end
|
354
|
+
|
355
|
+
create_table "spree_product_option_types", force: :cascade do |t|
|
356
|
+
t.integer "position"
|
357
|
+
t.integer "product_id"
|
358
|
+
t.integer "option_type_id"
|
359
|
+
t.datetime "created_at", null: false
|
360
|
+
t.datetime "updated_at", null: false
|
361
|
+
t.index ["option_type_id"], name: "index_spree_product_option_types_on_option_type_id"
|
362
|
+
t.index ["position"], name: "index_spree_product_option_types_on_position"
|
363
|
+
t.index ["product_id"], name: "index_spree_product_option_types_on_product_id"
|
364
|
+
end
|
365
|
+
|
366
|
+
create_table "spree_product_promotion_rules", force: :cascade do |t|
|
367
|
+
t.integer "product_id"
|
368
|
+
t.integer "promotion_rule_id"
|
369
|
+
t.index ["product_id"], name: "index_products_promotion_rules_on_product_id"
|
370
|
+
t.index ["promotion_rule_id", "product_id"], name: "index_products_promotion_rules_on_promotion_rule_and_product"
|
371
|
+
end
|
372
|
+
|
373
|
+
create_table "spree_product_properties", force: :cascade do |t|
|
374
|
+
t.string "value"
|
375
|
+
t.integer "product_id"
|
376
|
+
t.integer "property_id"
|
377
|
+
t.datetime "created_at", null: false
|
378
|
+
t.datetime "updated_at", null: false
|
379
|
+
t.integer "position", default: 0
|
380
|
+
t.index ["position"], name: "index_spree_product_properties_on_position"
|
381
|
+
t.index ["product_id"], name: "index_product_properties_on_product_id"
|
382
|
+
t.index ["property_id"], name: "index_spree_product_properties_on_property_id"
|
383
|
+
end
|
384
|
+
|
385
|
+
create_table "spree_products", force: :cascade do |t|
|
386
|
+
t.string "name", default: "", null: false
|
387
|
+
t.text "description"
|
388
|
+
t.datetime "available_on"
|
389
|
+
t.datetime "deleted_at"
|
390
|
+
t.string "slug"
|
391
|
+
t.text "meta_description"
|
392
|
+
t.string "meta_keywords"
|
393
|
+
t.integer "tax_category_id"
|
394
|
+
t.integer "shipping_category_id"
|
395
|
+
t.datetime "created_at", null: false
|
396
|
+
t.datetime "updated_at", null: false
|
397
|
+
t.boolean "promotionable", default: true
|
398
|
+
t.string "meta_title"
|
399
|
+
t.datetime "discontinue_on"
|
400
|
+
t.index ["available_on"], name: "index_spree_products_on_available_on"
|
401
|
+
t.index ["deleted_at"], name: "index_spree_products_on_deleted_at"
|
402
|
+
t.index ["discontinue_on"], name: "index_spree_products_on_discontinue_on"
|
403
|
+
t.index ["name"], name: "index_spree_products_on_name"
|
404
|
+
t.index ["shipping_category_id"], name: "index_spree_products_on_shipping_category_id"
|
405
|
+
t.index ["slug"], name: "index_spree_products_on_slug", unique: true
|
406
|
+
t.index ["tax_category_id"], name: "index_spree_products_on_tax_category_id"
|
407
|
+
end
|
408
|
+
|
409
|
+
create_table "spree_products_taxons", force: :cascade do |t|
|
410
|
+
t.integer "product_id"
|
411
|
+
t.integer "taxon_id"
|
412
|
+
t.integer "position"
|
413
|
+
t.index ["position"], name: "index_spree_products_taxons_on_position"
|
414
|
+
t.index ["product_id"], name: "index_spree_products_taxons_on_product_id"
|
415
|
+
t.index ["taxon_id"], name: "index_spree_products_taxons_on_taxon_id"
|
416
|
+
end
|
417
|
+
|
418
|
+
create_table "spree_promotion_action_line_items", force: :cascade do |t|
|
419
|
+
t.integer "promotion_action_id"
|
420
|
+
t.integer "variant_id"
|
421
|
+
t.integer "quantity", default: 1
|
422
|
+
t.index ["promotion_action_id"], name: "index_spree_promotion_action_line_items_on_promotion_action_id"
|
423
|
+
t.index ["variant_id"], name: "index_spree_promotion_action_line_items_on_variant_id"
|
424
|
+
end
|
425
|
+
|
426
|
+
create_table "spree_promotion_actions", force: :cascade do |t|
|
427
|
+
t.integer "promotion_id"
|
428
|
+
t.integer "position"
|
429
|
+
t.string "type"
|
430
|
+
t.datetime "deleted_at"
|
431
|
+
t.index ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"
|
432
|
+
t.index ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"
|
433
|
+
t.index ["promotion_id"], name: "index_spree_promotion_actions_on_promotion_id"
|
434
|
+
end
|
435
|
+
|
436
|
+
create_table "spree_promotion_categories", force: :cascade do |t|
|
437
|
+
t.string "name"
|
438
|
+
t.datetime "created_at", null: false
|
439
|
+
t.datetime "updated_at", null: false
|
440
|
+
t.string "code"
|
441
|
+
end
|
442
|
+
|
443
|
+
create_table "spree_promotion_rule_taxons", force: :cascade do |t|
|
444
|
+
t.integer "taxon_id"
|
445
|
+
t.integer "promotion_rule_id"
|
446
|
+
t.index ["promotion_rule_id"], name: "index_spree_promotion_rule_taxons_on_promotion_rule_id"
|
447
|
+
t.index ["taxon_id"], name: "index_spree_promotion_rule_taxons_on_taxon_id"
|
448
|
+
end
|
449
|
+
|
450
|
+
create_table "spree_promotion_rule_users", force: :cascade do |t|
|
451
|
+
t.integer "user_id"
|
452
|
+
t.integer "promotion_rule_id"
|
453
|
+
t.index ["promotion_rule_id"], name: "index_promotion_rules_users_on_promotion_rule_id"
|
454
|
+
t.index ["user_id", "promotion_rule_id"], name: "index_promotion_rules_users_on_user_id_and_promotion_rule_id"
|
455
|
+
end
|
456
|
+
|
457
|
+
create_table "spree_promotion_rules", force: :cascade do |t|
|
458
|
+
t.integer "promotion_id"
|
459
|
+
t.integer "user_id"
|
460
|
+
t.integer "product_group_id"
|
461
|
+
t.string "type"
|
462
|
+
t.datetime "created_at", null: false
|
463
|
+
t.datetime "updated_at", null: false
|
464
|
+
t.string "code"
|
465
|
+
t.text "preferences"
|
466
|
+
t.index ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
|
467
|
+
t.index ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"
|
468
|
+
t.index ["user_id"], name: "index_promotion_rules_on_user_id"
|
469
|
+
end
|
470
|
+
|
471
|
+
create_table "spree_promotions", force: :cascade do |t|
|
472
|
+
t.string "description"
|
473
|
+
t.datetime "expires_at"
|
474
|
+
t.datetime "starts_at"
|
475
|
+
t.string "name"
|
476
|
+
t.string "type"
|
477
|
+
t.integer "usage_limit"
|
478
|
+
t.string "match_policy", default: "all"
|
479
|
+
t.string "code"
|
480
|
+
t.boolean "advertise", default: false
|
481
|
+
t.string "path"
|
482
|
+
t.datetime "created_at", null: false
|
483
|
+
t.datetime "updated_at", null: false
|
484
|
+
t.integer "promotion_category_id"
|
485
|
+
t.index ["advertise"], name: "index_spree_promotions_on_advertise"
|
486
|
+
t.index ["code"], name: "index_spree_promotions_on_code"
|
487
|
+
t.index ["expires_at"], name: "index_spree_promotions_on_expires_at"
|
488
|
+
t.index ["id", "type"], name: "index_spree_promotions_on_id_and_type"
|
489
|
+
t.index ["promotion_category_id"], name: "index_spree_promotions_on_promotion_category_id"
|
490
|
+
t.index ["starts_at"], name: "index_spree_promotions_on_starts_at"
|
491
|
+
end
|
492
|
+
|
493
|
+
create_table "spree_properties", force: :cascade do |t|
|
494
|
+
t.string "name"
|
495
|
+
t.string "presentation", null: false
|
496
|
+
t.datetime "created_at", null: false
|
497
|
+
t.datetime "updated_at", null: false
|
498
|
+
t.index ["name"], name: "index_spree_properties_on_name"
|
499
|
+
end
|
500
|
+
|
501
|
+
create_table "spree_property_prototypes", force: :cascade do |t|
|
502
|
+
t.integer "prototype_id"
|
503
|
+
t.integer "property_id"
|
504
|
+
t.index ["prototype_id", "property_id"], name: "index_properties_prototypes_on_prototype_and_property"
|
505
|
+
end
|
506
|
+
|
507
|
+
create_table "spree_prototype_taxons", force: :cascade do |t|
|
508
|
+
t.integer "taxon_id"
|
509
|
+
t.integer "prototype_id"
|
510
|
+
t.index ["prototype_id", "taxon_id"], name: "index_spree_prototype_taxons_on_prototype_id_and_taxon_id"
|
511
|
+
t.index ["taxon_id"], name: "index_spree_prototype_taxons_on_taxon_id"
|
512
|
+
end
|
513
|
+
|
514
|
+
create_table "spree_prototypes", force: :cascade do |t|
|
515
|
+
t.string "name"
|
516
|
+
t.datetime "created_at", null: false
|
517
|
+
t.datetime "updated_at", null: false
|
518
|
+
end
|
519
|
+
|
520
|
+
create_table "spree_purchase_orders", force: :cascade do |t|
|
521
|
+
t.string "po_number"
|
522
|
+
t.string "organization_name"
|
523
|
+
t.datetime "created_at"
|
524
|
+
t.datetime "updated_at"
|
525
|
+
t.integer "payment_method_id"
|
526
|
+
t.integer "user_id"
|
527
|
+
t.index ["payment_method_id"], name: "index_spree_purchase_orders_on_payment_method_id"
|
528
|
+
t.index ["user_id"], name: "index_spree_purchase_orders_on_user_id"
|
529
|
+
end
|
530
|
+
|
531
|
+
create_table "spree_refund_reasons", force: :cascade do |t|
|
532
|
+
t.string "name"
|
533
|
+
t.boolean "active", default: true
|
534
|
+
t.boolean "mutable", default: true
|
535
|
+
t.datetime "created_at", null: false
|
536
|
+
t.datetime "updated_at", null: false
|
537
|
+
end
|
538
|
+
|
539
|
+
create_table "spree_refunds", force: :cascade do |t|
|
540
|
+
t.integer "payment_id"
|
541
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
542
|
+
t.string "transaction_id"
|
543
|
+
t.datetime "created_at", null: false
|
544
|
+
t.datetime "updated_at", null: false
|
545
|
+
t.integer "refund_reason_id"
|
546
|
+
t.integer "reimbursement_id"
|
547
|
+
t.index ["refund_reason_id"], name: "index_refunds_on_refund_reason_id"
|
548
|
+
end
|
549
|
+
|
550
|
+
create_table "spree_reimbursement_credits", force: :cascade do |t|
|
551
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
552
|
+
t.integer "reimbursement_id"
|
553
|
+
t.integer "creditable_id"
|
554
|
+
t.string "creditable_type"
|
555
|
+
end
|
556
|
+
|
557
|
+
create_table "spree_reimbursement_types", force: :cascade do |t|
|
558
|
+
t.string "name"
|
559
|
+
t.boolean "active", default: true
|
560
|
+
t.boolean "mutable", default: true
|
561
|
+
t.datetime "created_at", null: false
|
562
|
+
t.datetime "updated_at", null: false
|
563
|
+
t.string "type"
|
564
|
+
t.index ["type"], name: "index_spree_reimbursement_types_on_type"
|
565
|
+
end
|
566
|
+
|
567
|
+
create_table "spree_reimbursements", force: :cascade do |t|
|
568
|
+
t.string "number"
|
569
|
+
t.string "reimbursement_status"
|
570
|
+
t.integer "customer_return_id"
|
571
|
+
t.integer "order_id"
|
572
|
+
t.decimal "total", precision: 10, scale: 2
|
573
|
+
t.datetime "created_at", null: false
|
574
|
+
t.datetime "updated_at", null: false
|
575
|
+
t.index ["customer_return_id"], name: "index_spree_reimbursements_on_customer_return_id"
|
576
|
+
t.index ["order_id"], name: "index_spree_reimbursements_on_order_id"
|
577
|
+
end
|
578
|
+
|
579
|
+
create_table "spree_return_authorization_reasons", force: :cascade do |t|
|
580
|
+
t.string "name"
|
581
|
+
t.boolean "active", default: true
|
582
|
+
t.boolean "mutable", default: true
|
583
|
+
t.datetime "created_at", null: false
|
584
|
+
t.datetime "updated_at", null: false
|
585
|
+
end
|
586
|
+
|
587
|
+
create_table "spree_return_authorizations", force: :cascade do |t|
|
588
|
+
t.string "number"
|
589
|
+
t.string "state"
|
590
|
+
t.integer "order_id"
|
591
|
+
t.text "memo"
|
592
|
+
t.datetime "created_at"
|
593
|
+
t.datetime "updated_at"
|
594
|
+
t.integer "stock_location_id"
|
595
|
+
t.integer "return_authorization_reason_id"
|
596
|
+
t.index ["return_authorization_reason_id"], name: "index_return_authorizations_on_return_authorization_reason_id"
|
597
|
+
end
|
598
|
+
|
599
|
+
create_table "spree_return_items", force: :cascade do |t|
|
600
|
+
t.integer "return_authorization_id"
|
601
|
+
t.integer "inventory_unit_id"
|
602
|
+
t.integer "exchange_variant_id"
|
603
|
+
t.datetime "created_at", null: false
|
604
|
+
t.datetime "updated_at", null: false
|
605
|
+
t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
|
606
|
+
t.decimal "included_tax_total", precision: 12, scale: 4, default: "0.0", null: false
|
607
|
+
t.decimal "additional_tax_total", precision: 12, scale: 4, default: "0.0", null: false
|
608
|
+
t.string "reception_status"
|
609
|
+
t.string "acceptance_status"
|
610
|
+
t.integer "customer_return_id"
|
611
|
+
t.integer "reimbursement_id"
|
612
|
+
t.integer "exchange_inventory_unit_id"
|
613
|
+
t.text "acceptance_status_errors"
|
614
|
+
t.integer "preferred_reimbursement_type_id"
|
615
|
+
t.integer "override_reimbursement_type_id"
|
616
|
+
t.boolean "resellable", default: true, null: false
|
617
|
+
t.index ["customer_return_id"], name: "index_return_items_on_customer_return_id"
|
618
|
+
t.index ["exchange_inventory_unit_id"], name: "index_spree_return_items_on_exchange_inventory_unit_id"
|
619
|
+
end
|
620
|
+
|
621
|
+
create_table "spree_role_users", force: :cascade do |t|
|
622
|
+
t.integer "role_id"
|
623
|
+
t.integer "user_id"
|
624
|
+
t.index ["role_id"], name: "index_spree_role_users_on_role_id"
|
625
|
+
t.index ["user_id"], name: "index_spree_role_users_on_user_id"
|
626
|
+
end
|
627
|
+
|
628
|
+
create_table "spree_roles", force: :cascade do |t|
|
629
|
+
t.string "name"
|
630
|
+
t.index ["name"], name: "index_spree_roles_on_name"
|
631
|
+
end
|
632
|
+
|
633
|
+
create_table "spree_shipments", force: :cascade do |t|
|
634
|
+
t.string "tracking"
|
635
|
+
t.string "number"
|
636
|
+
t.decimal "cost", precision: 10, scale: 2, default: "0.0"
|
637
|
+
t.datetime "shipped_at"
|
638
|
+
t.integer "order_id"
|
639
|
+
t.integer "address_id"
|
640
|
+
t.string "state"
|
641
|
+
t.datetime "created_at", null: false
|
642
|
+
t.datetime "updated_at", null: false
|
643
|
+
t.integer "stock_location_id"
|
644
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
|
645
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
646
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
647
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
648
|
+
t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
|
649
|
+
t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
650
|
+
t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
651
|
+
t.index ["address_id"], name: "index_spree_shipments_on_address_id"
|
652
|
+
t.index ["number"], name: "index_shipments_on_number"
|
653
|
+
t.index ["order_id"], name: "index_spree_shipments_on_order_id"
|
654
|
+
t.index ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"
|
655
|
+
end
|
656
|
+
|
657
|
+
create_table "spree_shipping_categories", force: :cascade do |t|
|
658
|
+
t.string "name"
|
659
|
+
t.datetime "created_at", null: false
|
660
|
+
t.datetime "updated_at", null: false
|
661
|
+
t.index ["name"], name: "index_spree_shipping_categories_on_name"
|
662
|
+
end
|
663
|
+
|
664
|
+
create_table "spree_shipping_method_categories", force: :cascade do |t|
|
665
|
+
t.integer "shipping_method_id", null: false
|
666
|
+
t.integer "shipping_category_id", null: false
|
667
|
+
t.datetime "created_at", null: false
|
668
|
+
t.datetime "updated_at", null: false
|
669
|
+
t.index ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
|
670
|
+
t.index ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
|
671
|
+
end
|
672
|
+
|
673
|
+
create_table "spree_shipping_method_zones", force: :cascade do |t|
|
674
|
+
t.integer "shipping_method_id"
|
675
|
+
t.integer "zone_id"
|
676
|
+
end
|
677
|
+
|
678
|
+
create_table "spree_shipping_methods", force: :cascade do |t|
|
679
|
+
t.string "name"
|
680
|
+
t.string "display_on"
|
681
|
+
t.datetime "deleted_at"
|
682
|
+
t.datetime "created_at", null: false
|
683
|
+
t.datetime "updated_at", null: false
|
684
|
+
t.string "tracking_url"
|
685
|
+
t.string "admin_name"
|
686
|
+
t.integer "tax_category_id"
|
687
|
+
t.string "code"
|
688
|
+
t.index ["deleted_at"], name: "index_spree_shipping_methods_on_deleted_at"
|
689
|
+
t.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"
|
690
|
+
end
|
691
|
+
|
692
|
+
create_table "spree_shipping_rates", force: :cascade do |t|
|
693
|
+
t.integer "shipment_id"
|
694
|
+
t.integer "shipping_method_id"
|
695
|
+
t.boolean "selected", default: false
|
696
|
+
t.decimal "cost", precision: 8, scale: 2, default: "0.0"
|
697
|
+
t.datetime "created_at", null: false
|
698
|
+
t.datetime "updated_at", null: false
|
699
|
+
t.integer "tax_rate_id"
|
700
|
+
t.index ["selected"], name: "index_spree_shipping_rates_on_selected"
|
701
|
+
t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
|
702
|
+
t.index ["tax_rate_id"], name: "index_spree_shipping_rates_on_tax_rate_id"
|
703
|
+
end
|
704
|
+
|
705
|
+
create_table "spree_state_changes", force: :cascade do |t|
|
706
|
+
t.string "name"
|
707
|
+
t.string "previous_state"
|
708
|
+
t.integer "stateful_id"
|
709
|
+
t.integer "user_id"
|
710
|
+
t.string "stateful_type"
|
711
|
+
t.string "next_state"
|
712
|
+
t.datetime "created_at", null: false
|
713
|
+
t.datetime "updated_at", null: false
|
714
|
+
t.index ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"
|
715
|
+
end
|
716
|
+
|
717
|
+
create_table "spree_states", force: :cascade do |t|
|
718
|
+
t.string "name"
|
719
|
+
t.string "abbr"
|
720
|
+
t.integer "country_id"
|
721
|
+
t.datetime "updated_at"
|
722
|
+
t.index ["country_id"], name: "index_spree_states_on_country_id"
|
723
|
+
end
|
724
|
+
|
725
|
+
create_table "spree_stock_items", force: :cascade do |t|
|
726
|
+
t.integer "stock_location_id"
|
727
|
+
t.integer "variant_id"
|
728
|
+
t.integer "count_on_hand", default: 0, null: false
|
729
|
+
t.datetime "created_at", null: false
|
730
|
+
t.datetime "updated_at", null: false
|
731
|
+
t.boolean "backorderable", default: false
|
732
|
+
t.datetime "deleted_at"
|
733
|
+
t.index ["backorderable"], name: "index_spree_stock_items_on_backorderable"
|
734
|
+
t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
|
735
|
+
t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
|
736
|
+
t.index ["variant_id"], name: "index_spree_stock_items_on_variant_id"
|
737
|
+
end
|
738
|
+
|
739
|
+
create_table "spree_stock_locations", force: :cascade do |t|
|
740
|
+
t.string "name"
|
741
|
+
t.datetime "created_at", null: false
|
742
|
+
t.datetime "updated_at", null: false
|
743
|
+
t.boolean "default", default: false, null: false
|
744
|
+
t.string "address1"
|
745
|
+
t.string "address2"
|
746
|
+
t.string "city"
|
747
|
+
t.integer "state_id"
|
748
|
+
t.string "state_name"
|
749
|
+
t.integer "country_id"
|
750
|
+
t.string "zipcode"
|
751
|
+
t.string "phone"
|
752
|
+
t.boolean "active", default: true
|
753
|
+
t.boolean "backorderable_default", default: false
|
754
|
+
t.boolean "propagate_all_variants", default: true
|
755
|
+
t.string "admin_name"
|
756
|
+
t.index ["active"], name: "index_spree_stock_locations_on_active"
|
757
|
+
t.index ["backorderable_default"], name: "index_spree_stock_locations_on_backorderable_default"
|
758
|
+
t.index ["country_id"], name: "index_spree_stock_locations_on_country_id"
|
759
|
+
t.index ["propagate_all_variants"], name: "index_spree_stock_locations_on_propagate_all_variants"
|
760
|
+
t.index ["state_id"], name: "index_spree_stock_locations_on_state_id"
|
761
|
+
end
|
762
|
+
|
763
|
+
create_table "spree_stock_movements", force: :cascade do |t|
|
764
|
+
t.integer "stock_item_id"
|
765
|
+
t.integer "quantity", default: 0
|
766
|
+
t.string "action"
|
767
|
+
t.datetime "created_at", null: false
|
768
|
+
t.datetime "updated_at", null: false
|
769
|
+
t.string "originator_type"
|
770
|
+
t.integer "originator_id"
|
771
|
+
t.index ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
|
772
|
+
end
|
773
|
+
|
774
|
+
create_table "spree_stock_transfers", force: :cascade do |t|
|
775
|
+
t.string "type"
|
776
|
+
t.string "reference"
|
777
|
+
t.integer "source_location_id"
|
778
|
+
t.integer "destination_location_id"
|
779
|
+
t.datetime "created_at", null: false
|
780
|
+
t.datetime "updated_at", null: false
|
781
|
+
t.string "number"
|
782
|
+
t.index ["destination_location_id"], name: "index_spree_stock_transfers_on_destination_location_id"
|
783
|
+
t.index ["number"], name: "index_spree_stock_transfers_on_number"
|
784
|
+
t.index ["source_location_id"], name: "index_spree_stock_transfers_on_source_location_id"
|
785
|
+
end
|
786
|
+
|
787
|
+
create_table "spree_store_credit_categories", force: :cascade do |t|
|
788
|
+
t.string "name"
|
789
|
+
t.datetime "created_at", null: false
|
790
|
+
t.datetime "updated_at", null: false
|
791
|
+
end
|
792
|
+
|
793
|
+
create_table "spree_store_credit_events", force: :cascade do |t|
|
794
|
+
t.integer "store_credit_id", null: false
|
795
|
+
t.string "action", null: false
|
796
|
+
t.decimal "amount", precision: 8, scale: 2
|
797
|
+
t.string "authorization_code", null: false
|
798
|
+
t.decimal "user_total_amount", precision: 8, scale: 2, default: "0.0", null: false
|
799
|
+
t.integer "originator_id"
|
800
|
+
t.string "originator_type"
|
801
|
+
t.datetime "deleted_at"
|
802
|
+
t.datetime "created_at", null: false
|
803
|
+
t.datetime "updated_at", null: false
|
804
|
+
t.index ["originator_id", "originator_type"], name: "spree_store_credit_events_originator"
|
805
|
+
t.index ["store_credit_id"], name: "index_spree_store_credit_events_on_store_credit_id"
|
806
|
+
end
|
807
|
+
|
808
|
+
create_table "spree_store_credit_types", force: :cascade do |t|
|
809
|
+
t.string "name"
|
810
|
+
t.integer "priority"
|
811
|
+
t.datetime "created_at", null: false
|
812
|
+
t.datetime "updated_at", null: false
|
813
|
+
t.index ["priority"], name: "index_spree_store_credit_types_on_priority"
|
814
|
+
end
|
815
|
+
|
816
|
+
create_table "spree_store_credits", force: :cascade do |t|
|
817
|
+
t.integer "user_id"
|
818
|
+
t.integer "category_id"
|
819
|
+
t.integer "created_by_id"
|
820
|
+
t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
|
821
|
+
t.decimal "amount_used", precision: 8, scale: 2, default: "0.0", null: false
|
822
|
+
t.text "memo"
|
823
|
+
t.datetime "deleted_at"
|
824
|
+
t.string "currency"
|
825
|
+
t.decimal "amount_authorized", precision: 8, scale: 2, default: "0.0", null: false
|
826
|
+
t.integer "originator_id"
|
827
|
+
t.string "originator_type"
|
828
|
+
t.integer "type_id"
|
829
|
+
t.datetime "created_at", null: false
|
830
|
+
t.datetime "updated_at", null: false
|
831
|
+
t.index ["deleted_at"], name: "index_spree_store_credits_on_deleted_at"
|
832
|
+
t.index ["originator_id", "originator_type"], name: "spree_store_credits_originator"
|
833
|
+
t.index ["type_id"], name: "index_spree_store_credits_on_type_id"
|
834
|
+
t.index ["user_id"], name: "index_spree_store_credits_on_user_id"
|
835
|
+
end
|
836
|
+
|
837
|
+
create_table "spree_stores", force: :cascade do |t|
|
838
|
+
t.string "name"
|
839
|
+
t.string "url"
|
840
|
+
t.text "meta_description"
|
841
|
+
t.text "meta_keywords"
|
842
|
+
t.string "seo_title"
|
843
|
+
t.string "mail_from_address"
|
844
|
+
t.string "default_currency"
|
845
|
+
t.string "code"
|
846
|
+
t.boolean "default", default: false, null: false
|
847
|
+
t.datetime "created_at", null: false
|
848
|
+
t.datetime "updated_at", null: false
|
849
|
+
t.index ["code"], name: "index_spree_stores_on_code"
|
850
|
+
t.index ["default"], name: "index_spree_stores_on_default"
|
851
|
+
t.index ["url"], name: "index_spree_stores_on_url"
|
852
|
+
end
|
853
|
+
|
854
|
+
create_table "spree_taggings", force: :cascade do |t|
|
855
|
+
t.integer "tag_id"
|
856
|
+
t.string "taggable_type"
|
857
|
+
t.integer "taggable_id"
|
858
|
+
t.string "tagger_type"
|
859
|
+
t.integer "tagger_id"
|
860
|
+
t.string "context", limit: 128
|
861
|
+
t.datetime "created_at"
|
862
|
+
t.index ["context"], name: "index_spree_taggings_on_context"
|
863
|
+
t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "spree_taggings_idx", unique: true
|
864
|
+
t.index ["tag_id"], name: "index_spree_taggings_on_tag_id"
|
865
|
+
t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "spree_taggings_idy"
|
866
|
+
t.index ["taggable_id"], name: "index_spree_taggings_on_taggable_id"
|
867
|
+
t.index ["taggable_type"], name: "index_spree_taggings_on_taggable_type"
|
868
|
+
t.index ["tagger_id", "tagger_type"], name: "index_spree_taggings_on_tagger_id_and_tagger_type"
|
869
|
+
t.index ["tagger_id"], name: "index_spree_taggings_on_tagger_id"
|
870
|
+
end
|
871
|
+
|
872
|
+
create_table "spree_tags", force: :cascade do |t|
|
873
|
+
t.string "name"
|
874
|
+
t.integer "taggings_count", default: 0
|
875
|
+
t.index ["name"], name: "index_spree_tags_on_name", unique: true
|
876
|
+
end
|
877
|
+
|
878
|
+
create_table "spree_tax_categories", force: :cascade do |t|
|
879
|
+
t.string "name"
|
880
|
+
t.string "description"
|
881
|
+
t.boolean "is_default", default: false
|
882
|
+
t.datetime "deleted_at"
|
883
|
+
t.datetime "created_at", null: false
|
884
|
+
t.datetime "updated_at", null: false
|
885
|
+
t.string "tax_code"
|
886
|
+
t.index ["deleted_at"], name: "index_spree_tax_categories_on_deleted_at"
|
887
|
+
t.index ["is_default"], name: "index_spree_tax_categories_on_is_default"
|
888
|
+
end
|
889
|
+
|
890
|
+
create_table "spree_tax_rates", force: :cascade do |t|
|
891
|
+
t.decimal "amount", precision: 8, scale: 5
|
892
|
+
t.integer "zone_id"
|
893
|
+
t.integer "tax_category_id"
|
894
|
+
t.boolean "included_in_price", default: false
|
895
|
+
t.datetime "created_at", null: false
|
896
|
+
t.datetime "updated_at", null: false
|
897
|
+
t.string "name"
|
898
|
+
t.boolean "show_rate_in_label", default: true
|
899
|
+
t.datetime "deleted_at"
|
900
|
+
t.index ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"
|
901
|
+
t.index ["included_in_price"], name: "index_spree_tax_rates_on_included_in_price"
|
902
|
+
t.index ["show_rate_in_label"], name: "index_spree_tax_rates_on_show_rate_in_label"
|
903
|
+
t.index ["tax_category_id"], name: "index_spree_tax_rates_on_tax_category_id"
|
904
|
+
t.index ["zone_id"], name: "index_spree_tax_rates_on_zone_id"
|
905
|
+
end
|
906
|
+
|
907
|
+
create_table "spree_taxonomies", force: :cascade do |t|
|
908
|
+
t.string "name", null: false
|
909
|
+
t.datetime "created_at", null: false
|
910
|
+
t.datetime "updated_at", null: false
|
911
|
+
t.integer "position", default: 0
|
912
|
+
t.index ["position"], name: "index_spree_taxonomies_on_position"
|
913
|
+
end
|
914
|
+
|
915
|
+
create_table "spree_taxons", force: :cascade do |t|
|
916
|
+
t.integer "parent_id"
|
917
|
+
t.integer "position", default: 0
|
918
|
+
t.string "name", null: false
|
919
|
+
t.string "permalink"
|
920
|
+
t.integer "taxonomy_id"
|
921
|
+
t.integer "lft"
|
922
|
+
t.integer "rgt"
|
923
|
+
t.string "icon_file_name"
|
924
|
+
t.string "icon_content_type"
|
925
|
+
t.integer "icon_file_size"
|
926
|
+
t.datetime "icon_updated_at"
|
927
|
+
t.text "description"
|
928
|
+
t.datetime "created_at", null: false
|
929
|
+
t.datetime "updated_at", null: false
|
930
|
+
t.string "meta_title"
|
931
|
+
t.string "meta_description"
|
932
|
+
t.string "meta_keywords"
|
933
|
+
t.integer "depth"
|
934
|
+
t.index ["lft"], name: "index_spree_taxons_on_lft"
|
935
|
+
t.index ["name"], name: "index_spree_taxons_on_name"
|
936
|
+
t.index ["parent_id"], name: "index_taxons_on_parent_id"
|
937
|
+
t.index ["permalink"], name: "index_taxons_on_permalink"
|
938
|
+
t.index ["position"], name: "index_spree_taxons_on_position"
|
939
|
+
t.index ["rgt"], name: "index_spree_taxons_on_rgt"
|
940
|
+
t.index ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
|
941
|
+
end
|
942
|
+
|
943
|
+
create_table "spree_trackers", force: :cascade do |t|
|
944
|
+
t.string "analytics_id"
|
945
|
+
t.boolean "active", default: true
|
946
|
+
t.datetime "created_at", null: false
|
947
|
+
t.datetime "updated_at", null: false
|
948
|
+
t.index ["active"], name: "index_spree_trackers_on_active"
|
949
|
+
end
|
950
|
+
|
951
|
+
create_table "spree_users", force: :cascade do |t|
|
952
|
+
t.string "encrypted_password", limit: 128
|
953
|
+
t.string "password_salt", limit: 128
|
954
|
+
t.string "email"
|
955
|
+
t.string "remember_token"
|
956
|
+
t.string "persistence_token"
|
957
|
+
t.string "reset_password_token"
|
958
|
+
t.string "perishable_token"
|
959
|
+
t.integer "sign_in_count", default: 0, null: false
|
960
|
+
t.integer "failed_attempts", default: 0, null: false
|
961
|
+
t.datetime "last_request_at"
|
962
|
+
t.datetime "current_sign_in_at"
|
963
|
+
t.datetime "last_sign_in_at"
|
964
|
+
t.string "current_sign_in_ip"
|
965
|
+
t.string "last_sign_in_ip"
|
966
|
+
t.string "login"
|
967
|
+
t.integer "ship_address_id"
|
968
|
+
t.integer "bill_address_id"
|
969
|
+
t.string "authentication_token"
|
970
|
+
t.string "unlock_token"
|
971
|
+
t.datetime "locked_at"
|
972
|
+
t.datetime "remember_created_at"
|
973
|
+
t.datetime "reset_password_sent_at"
|
974
|
+
t.datetime "created_at", null: false
|
975
|
+
t.datetime "updated_at", null: false
|
976
|
+
end
|
977
|
+
|
978
|
+
create_table "spree_variants", force: :cascade do |t|
|
979
|
+
t.string "sku", default: "", null: false
|
980
|
+
t.decimal "weight", precision: 8, scale: 2, default: "0.0"
|
981
|
+
t.decimal "height", precision: 8, scale: 2
|
982
|
+
t.decimal "width", precision: 8, scale: 2
|
983
|
+
t.decimal "depth", precision: 8, scale: 2
|
984
|
+
t.datetime "deleted_at"
|
985
|
+
t.boolean "is_master", default: false
|
986
|
+
t.integer "product_id"
|
987
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
988
|
+
t.integer "position"
|
989
|
+
t.string "cost_currency"
|
990
|
+
t.boolean "track_inventory", default: true
|
991
|
+
t.integer "tax_category_id"
|
992
|
+
t.datetime "updated_at", null: false
|
993
|
+
t.datetime "discontinue_on"
|
994
|
+
t.datetime "created_at", null: false
|
995
|
+
t.index ["deleted_at"], name: "index_spree_variants_on_deleted_at"
|
996
|
+
t.index ["discontinue_on"], name: "index_spree_variants_on_discontinue_on"
|
997
|
+
t.index ["is_master"], name: "index_spree_variants_on_is_master"
|
998
|
+
t.index ["position"], name: "index_spree_variants_on_position"
|
999
|
+
t.index ["product_id"], name: "index_spree_variants_on_product_id"
|
1000
|
+
t.index ["sku"], name: "index_spree_variants_on_sku"
|
1001
|
+
t.index ["tax_category_id"], name: "index_spree_variants_on_tax_category_id"
|
1002
|
+
t.index ["track_inventory"], name: "index_spree_variants_on_track_inventory"
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
create_table "spree_zone_members", force: :cascade do |t|
|
1006
|
+
t.string "zoneable_type"
|
1007
|
+
t.integer "zoneable_id"
|
1008
|
+
t.integer "zone_id"
|
1009
|
+
t.datetime "created_at", null: false
|
1010
|
+
t.datetime "updated_at", null: false
|
1011
|
+
t.index ["zone_id"], name: "index_spree_zone_members_on_zone_id"
|
1012
|
+
t.index ["zoneable_id", "zoneable_type"], name: "index_spree_zone_members_on_zoneable_id_and_zoneable_type"
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
create_table "spree_zones", force: :cascade do |t|
|
1016
|
+
t.string "name"
|
1017
|
+
t.string "description"
|
1018
|
+
t.boolean "default_tax", default: false
|
1019
|
+
t.integer "zone_members_count", default: 0
|
1020
|
+
t.datetime "created_at", null: false
|
1021
|
+
t.datetime "updated_at", null: false
|
1022
|
+
t.string "kind"
|
1023
|
+
t.index ["default_tax"], name: "index_spree_zones_on_default_tax"
|
1024
|
+
t.index ["kind"], name: "index_spree_zones_on_kind"
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
end
|