spree_pag_seguro 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/app/models/spree/pag_seguro_payment.rb +1 -0
- data/lib/spree_pag_seguro/engine.rb +1 -7
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/admin/all.js +10 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/javascripts/store/all.js +10 -0
- data/spec/dummy/app/assets/stylesheets/admin/all.css +11 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/assets/stylesheets/store/all.css +11 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +60 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +18 -0
- data/spec/dummy/config/environment.rb +7 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/spree.rb +12 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/spree.yml +2 -0
- data/spec/dummy/db/dummy_test +0 -0
- data/spec/dummy/db/migrate/20120301154050_spree_zero_nine_zero.rb +389 -0
- data/spec/dummy/db/migrate/20120301154051_create_indexes_for_inventory_units.rb +6 -0
- data/spec/dummy/db/migrate/20120301154052_add_count_on_hand_to_variants_and_products.rb +49 -0
- data/spec/dummy/db/migrate/20120301154053_change_taxons_to_nested_set.rb +46 -0
- data/spec/dummy/db/migrate/20120301154054_move_to_configurable_gateways.rb +54 -0
- data/spec/dummy/db/migrate/20120301154055_product_groups_and_scopes.rb +18 -0
- data/spec/dummy/db/migrate/20120301154056_add_open_id_authentication_tables.rb +15 -0
- data/spec/dummy/db/migrate/20120301154057_add_openid_field_to_users.rb +24 -0
- data/spec/dummy/db/migrate/20120301154058_change_preference_value_type.rb +10 -0
- data/spec/dummy/db/migrate/20120301154059_create_billing_integrations.rb +12 -0
- data/spec/dummy/db/migrate/20120301154060_charge_refactoring.rb +39 -0
- data/spec/dummy/db/migrate/20120301154061_add_some_indexes.rb +11 -0
- data/spec/dummy/db/migrate/20120301154062_checkout_state_machine.rb +5 -0
- data/spec/dummy/db/migrate/20120301154063_state_for_shipments.rb +5 -0
- data/spec/dummy/db/migrate/20120301154064_make_state_events_polymorphic.rb +12 -0
- data/spec/dummy/db/migrate/20120301154065_ship_address_id_for_checkouts.rb +5 -0
- data/spec/dummy/db/migrate/20120301154066_shipping_method_id_for_checkouts.rb +5 -0
- data/spec/dummy/db/migrate/20120301154067_creditcard_last_four_digits.rb +14 -0
- data/spec/dummy/db/migrate/20120301154068_populate_legacy_shipment_state.rb +15 -0
- data/spec/dummy/db/migrate/20120301154069_add_cost_price.rb +5 -0
- data/spec/dummy/db/migrate/20120301154070_shipment_id_for_inventory_units.rb +25 -0
- data/spec/dummy/db/migrate/20120301154071_cim_fields_for_creditcards.rb +6 -0
- data/spec/dummy/db/migrate/20120301154072_create_return_authorizations.rb +12 -0
- data/spec/dummy/db/migrate/20120301154073_add_return_authorization_to_inventory_units.rb +5 -0
- data/spec/dummy/db/migrate/20120301154074_create_trackers.rb +10 -0
- data/spec/dummy/db/migrate/20120301154075_creditcard_id_for_creditcard_txns.rb +5 -0
- data/spec/dummy/db/migrate/20120301154076_original_creditcard_txn_id_for_creditcard_txns.rb +5 -0
- data/spec/dummy/db/migrate/20120301154077_add_test_mode_to_billing_integration.rb +6 -0
- data/spec/dummy/db/migrate/20120301154078_create_products_product_groups.rb +8 -0
- data/spec/dummy/db/migrate/20120301154079_create_payment_methods.rb +16 -0
- data/spec/dummy/db/migrate/20120301154080_polymorphic_payments.rb +42 -0
- data/spec/dummy/db/migrate/20120301154081_change_payments_payment_method_to_belongs_to.rb +11 -0
- data/spec/dummy/db/migrate/20120301154082_assign_creditcard_txns_to_payment.rb +23 -0
- data/spec/dummy/db/migrate/20120301154083_sti_for_transactions.rb +15 -0
- data/spec/dummy/db/migrate/20120301154084_drop_billing_integrations.rb +16 -0
- data/spec/dummy/db/migrate/20120301154085_deleted_at_for_payment_methods.rb +14 -0
- data/spec/dummy/db/migrate/20120301154086_add_adjustments_index.rb +6 -0
- data/spec/dummy/db/migrate/20120301154087_fix_by_popularity.rb +9 -0
- data/spec/dummy/db/migrate/20120301154088_add_alt_text_to_images.rb +5 -0
- data/spec/dummy/db/migrate/20120301154089_fix_existing_coupon_credits.rb +13 -0
- data/spec/dummy/db/migrate/20120301154090_add_display_to_payment_methods.rb +5 -0
- data/spec/dummy/db/migrate/20120301154091_add_addresses_checkouts_indexes.rb +8 -0
- data/spec/dummy/db/migrate/20120301154092_add_icon_to_taxons.rb +17 -0
- data/spec/dummy/db/migrate/20120301154093_add_description_to_taxons.rb +11 -0
- data/spec/dummy/db/migrate/20120301154094_index_for_shipments_number.rb +5 -0
- data/spec/dummy/db/migrate/20120301154095_add_index_on_users_persistence_token.rb +5 -0
- data/spec/dummy/db/migrate/20120301154096_add_default_to_tax_categories.rb +5 -0
- data/spec/dummy/db/migrate/20120301154097_add_display_to_shipping_methods.rb +5 -0
- data/spec/dummy/db/migrate/20120301154098_rename_payment_method_display.rb +5 -0
- data/spec/dummy/db/migrate/20120301154099_rename_preferences_field.rb +5 -0
- data/spec/dummy/db/migrate/20120301154100_add_guest_flag.rb +5 -0
- data/spec/dummy/db/migrate/20120301154101_drop_order_token.rb +9 -0
- data/spec/dummy/db/migrate/20120301154102_payments_state_and_assigned_to_order_only.rb +14 -0
- data/spec/dummy/db/migrate/20120301154103_create_address_keys_for_order.rb +6 -0
- data/spec/dummy/db/migrate/20120301154104_payment_total_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154105_shipping_method_id_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154106_add_shipment_and_payment_state.rb +6 -0
- data/spec/dummy/db/migrate/20120301154107_refactor_adjustments.rb +29 -0
- data/spec/dummy/db/migrate/20120301154108_response_code_and_avs_response_for_payments.rb +6 -0
- data/spec/dummy/db/migrate/20120301154109_change_guest_flag_to_anonymous.rb +5 -0
- data/spec/dummy/db/migrate/20120301154110_email_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154111_create_mail_methods.rb +10 -0
- data/spec/dummy/db/migrate/20120301154112_rename_frozen_to_locked.rb +5 -0
- data/spec/dummy/db/migrate/20120301154113_move_special_instructions_to_orders.rb +10 -0
- data/spec/dummy/db/migrate/20120301154114_create_log_entries.rb +11 -0
- data/spec/dummy/db/migrate/20120301154115_migrate_transactions_to_payment_state.rb +98 -0
- data/spec/dummy/db/migrate/20120301154116_delete_in_progress_orders.rb +19 -0
- data/spec/dummy/db/migrate/20120301154117_migrate_checkout_to_orders.rb +23 -0
- data/spec/dummy/db/migrate/20120301154118_remove_shipped_state.rb +12 -0
- data/spec/dummy/db/migrate/20120301154119_prevent_nil_payment_total.rb +8 -0
- data/spec/dummy/db/migrate/20120301154120_prevent_nil_email.rb +9 -0
- data/spec/dummy/db/migrate/20120301154121_generate_anonymous_users.rb +20 -0
- data/spec/dummy/db/migrate/20120301154122_update_order_state.rb +12 -0
- data/spec/dummy/db/migrate/20120301154123_cleanup_legacy_tables.rb +11 -0
- data/spec/dummy/db/migrate/20120301154124_remove_number_and_cvv_from_credicard.rb +11 -0
- data/spec/dummy/db/migrate/20120301154125_drop_anonymous_field_for_user.rb +9 -0
- data/spec/dummy/db/migrate/20120301154126_renamed_rma_cancelled_state.rb +9 -0
- data/spec/dummy/db/migrate/20120301154127_fix_problematic_index_names.rb +13 -0
- data/spec/dummy/db/migrate/20120301154128_add_position_to_variants.rb +5 -0
- data/spec/dummy/db/migrate/20120301154129_add_next_state_to_state_events.rb +5 -0
- data/spec/dummy/db/migrate/20120301154130_add_position_to_option_types.rb +5 -0
- data/spec/dummy/db/migrate/20120301154131_remove_trailing_slashes_in_taxon_permalinks.rb +19 -0
- data/spec/dummy/db/migrate/20120301154132_create_activators.rb +14 -0
- data/spec/dummy/db/migrate/20120301154133_eligible_for_adjustments.rb +5 -0
- data/spec/dummy/db/migrate/20120301154134_namespace_top_level_models.rb +52 -0
- data/spec/dummy/db/migrate/20120301154135_migrate_namespaced_polymorphic_models.rb +52 -0
- data/spec/dummy/db/migrate/20120301154136_make_adjustments_polymorphic.rb +9 -0
- data/spec/dummy/db/migrate/20120301154137_add_company_to_addresses.rb +5 -0
- data/spec/dummy/db/migrate/20120301154138_add_inc_tax_to_tax_rates.rb +5 -0
- data/spec/dummy/db/migrate/20120301154139_rename_inc_price_attribute.rb +5 -0
- data/spec/dummy/db/migrate/20120301154140_add_default_tax_zone.rb +5 -0
- data/spec/dummy/db/migrate/20120301154141_associate_shipping_methods_and_shipping_categories.rb +7 -0
- data/spec/dummy/db/migrate/20120301154142_add_match_rules_to_shipping_methods.rb +7 -0
- data/spec/dummy/db/migrate/20120301154143_new_preferences.rb +48 -0
- data/spec/dummy/db/migrate/20120301154144_add_deleted_at_to_tax_category.rb +5 -0
- data/spec/dummy/db/migrate/20120301154145_create_spree_payment_notifications.rb +12 -0
- data/spec/dummy/db/migrate/20120301154146_create_spree_pag_seguro_payments.rb +8 -0
- data/spec/dummy/db/schema.rb +569 -0
- data/spec/dummy/db/seeds.rb +11 -0
- data/spec/dummy/log/test.log +1073 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/dummy/script/rails +6 -0
- metadata +151 -16
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateSpreePaymentNotifications < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :spree_payment_notifications do |t|
|
4
|
+
t.text :params
|
5
|
+
t.string :status
|
6
|
+
t.string :transaction_id
|
7
|
+
t.integer :order_id
|
8
|
+
t.string :notification_code
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,569 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20120301154146) do
|
15
|
+
|
16
|
+
create_table "coupons", :force => true do |t|
|
17
|
+
t.string "code"
|
18
|
+
t.string "description"
|
19
|
+
t.integer "usage_limit"
|
20
|
+
t.boolean "combine"
|
21
|
+
t.datetime "expires_at"
|
22
|
+
t.datetime "starts_at"
|
23
|
+
t.datetime "created_at"
|
24
|
+
t.datetime "updated_at"
|
25
|
+
end
|
26
|
+
|
27
|
+
create_table "spree_activators", :force => true do |t|
|
28
|
+
t.string "description"
|
29
|
+
t.datetime "expires_at"
|
30
|
+
t.datetime "created_at"
|
31
|
+
t.datetime "updated_at"
|
32
|
+
t.datetime "starts_at"
|
33
|
+
t.string "name"
|
34
|
+
t.string "event_name"
|
35
|
+
t.string "type"
|
36
|
+
end
|
37
|
+
|
38
|
+
create_table "spree_addresses", :force => true do |t|
|
39
|
+
t.string "firstname"
|
40
|
+
t.string "lastname"
|
41
|
+
t.string "address1"
|
42
|
+
t.string "address2"
|
43
|
+
t.string "city"
|
44
|
+
t.string "zipcode"
|
45
|
+
t.string "phone"
|
46
|
+
t.string "state_name"
|
47
|
+
t.string "alternative_phone"
|
48
|
+
t.integer "state_id"
|
49
|
+
t.integer "country_id"
|
50
|
+
t.datetime "created_at"
|
51
|
+
t.datetime "updated_at"
|
52
|
+
t.string "company"
|
53
|
+
end
|
54
|
+
|
55
|
+
add_index "spree_addresses", ["firstname"], :name => "index_addresses_on_firstname"
|
56
|
+
add_index "spree_addresses", ["lastname"], :name => "index_addresses_on_lastname"
|
57
|
+
|
58
|
+
create_table "spree_adjustments", :force => true do |t|
|
59
|
+
t.integer "source_id"
|
60
|
+
t.decimal "amount"
|
61
|
+
t.string "label"
|
62
|
+
t.string "source_type"
|
63
|
+
t.integer "adjustable_id"
|
64
|
+
t.datetime "created_at"
|
65
|
+
t.datetime "updated_at"
|
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
|
+
t.string "adjustable_type"
|
72
|
+
end
|
73
|
+
|
74
|
+
add_index "spree_adjustments", ["adjustable_id"], :name => "index_adjustments_on_order_id"
|
75
|
+
|
76
|
+
create_table "spree_assets", :force => true do |t|
|
77
|
+
t.integer "viewable_id"
|
78
|
+
t.integer "attachment_width"
|
79
|
+
t.integer "attachment_height"
|
80
|
+
t.integer "attachment_size"
|
81
|
+
t.integer "position"
|
82
|
+
t.string "viewable_type", :limit => 50
|
83
|
+
t.string "attachment_content_type"
|
84
|
+
t.string "attachment_file_name"
|
85
|
+
t.string "type", :limit => 75
|
86
|
+
t.datetime "attachment_updated_at"
|
87
|
+
t.text "alt"
|
88
|
+
end
|
89
|
+
|
90
|
+
add_index "spree_assets", ["viewable_id"], :name => "index_assets_on_viewable_id"
|
91
|
+
add_index "spree_assets", ["viewable_type", "type"], :name => "index_assets_on_viewable_type_and_type"
|
92
|
+
|
93
|
+
create_table "spree_calculators", :force => true do |t|
|
94
|
+
t.string "type"
|
95
|
+
t.integer "calculable_id", :null => false
|
96
|
+
t.string "calculable_type", :null => false
|
97
|
+
t.datetime "created_at"
|
98
|
+
t.datetime "updated_at"
|
99
|
+
end
|
100
|
+
|
101
|
+
create_table "spree_configurations", :force => true do |t|
|
102
|
+
t.string "name"
|
103
|
+
t.string "type", :limit => 50
|
104
|
+
t.datetime "created_at"
|
105
|
+
t.datetime "updated_at"
|
106
|
+
end
|
107
|
+
|
108
|
+
add_index "spree_configurations", ["name", "type"], :name => "index_configurations_on_name_and_type"
|
109
|
+
|
110
|
+
create_table "spree_countries", :force => true do |t|
|
111
|
+
t.string "iso_name"
|
112
|
+
t.string "iso"
|
113
|
+
t.string "iso3"
|
114
|
+
t.string "name"
|
115
|
+
t.integer "numcode"
|
116
|
+
end
|
117
|
+
|
118
|
+
create_table "spree_creditcards", :force => true do |t|
|
119
|
+
t.string "month"
|
120
|
+
t.string "year"
|
121
|
+
t.string "cc_type"
|
122
|
+
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
|
+
t.integer "address_id"
|
129
|
+
t.datetime "created_at"
|
130
|
+
t.datetime "updated_at"
|
131
|
+
t.string "gateway_customer_profile_id"
|
132
|
+
t.string "gateway_payment_profile_id"
|
133
|
+
end
|
134
|
+
|
135
|
+
create_table "spree_gateways", :force => true do |t|
|
136
|
+
t.string "type"
|
137
|
+
t.string "name"
|
138
|
+
t.text "description"
|
139
|
+
t.boolean "active", :default => true
|
140
|
+
t.string "environment", :default => "development"
|
141
|
+
t.string "server", :default => "test"
|
142
|
+
t.boolean "test_mode", :default => true
|
143
|
+
t.datetime "created_at"
|
144
|
+
t.datetime "updated_at"
|
145
|
+
end
|
146
|
+
|
147
|
+
create_table "spree_inventory_units", :force => true do |t|
|
148
|
+
t.integer "lock_version", :default => 0
|
149
|
+
t.string "state"
|
150
|
+
t.integer "variant_id"
|
151
|
+
t.integer "order_id"
|
152
|
+
t.datetime "created_at"
|
153
|
+
t.datetime "updated_at"
|
154
|
+
t.integer "shipment_id"
|
155
|
+
t.integer "return_authorization_id"
|
156
|
+
end
|
157
|
+
|
158
|
+
add_index "spree_inventory_units", ["order_id"], :name => "index_inventory_units_on_order_id"
|
159
|
+
add_index "spree_inventory_units", ["shipment_id"], :name => "index_inventory_units_on_shipment_id"
|
160
|
+
add_index "spree_inventory_units", ["variant_id"], :name => "index_inventory_units_on_variant_id"
|
161
|
+
|
162
|
+
create_table "spree_line_items", :force => true do |t|
|
163
|
+
t.integer "order_id"
|
164
|
+
t.integer "variant_id"
|
165
|
+
t.integer "quantity", :null => false
|
166
|
+
t.decimal "price", :precision => 8, :scale => 2, :null => false
|
167
|
+
t.datetime "created_at"
|
168
|
+
t.datetime "updated_at"
|
169
|
+
end
|
170
|
+
|
171
|
+
add_index "spree_line_items", ["order_id"], :name => "index_line_items_on_order_id"
|
172
|
+
add_index "spree_line_items", ["variant_id"], :name => "index_line_items_on_variant_id"
|
173
|
+
|
174
|
+
create_table "spree_log_entries", :force => true do |t|
|
175
|
+
t.integer "source_id"
|
176
|
+
t.string "source_type"
|
177
|
+
t.text "details"
|
178
|
+
t.datetime "created_at"
|
179
|
+
t.datetime "updated_at"
|
180
|
+
end
|
181
|
+
|
182
|
+
create_table "spree_mail_methods", :force => true do |t|
|
183
|
+
t.string "environment"
|
184
|
+
t.boolean "active", :default => true
|
185
|
+
t.datetime "created_at"
|
186
|
+
t.datetime "updated_at"
|
187
|
+
end
|
188
|
+
|
189
|
+
create_table "spree_option_types", :force => true do |t|
|
190
|
+
t.string "name", :limit => 100
|
191
|
+
t.string "presentation", :limit => 100
|
192
|
+
t.datetime "created_at"
|
193
|
+
t.datetime "updated_at"
|
194
|
+
t.integer "position", :default => 0, :null => false
|
195
|
+
end
|
196
|
+
|
197
|
+
create_table "spree_option_types_prototypes", :id => false, :force => true do |t|
|
198
|
+
t.integer "prototype_id"
|
199
|
+
t.integer "option_type_id"
|
200
|
+
end
|
201
|
+
|
202
|
+
create_table "spree_option_values", :force => true do |t|
|
203
|
+
t.integer "position"
|
204
|
+
t.string "name"
|
205
|
+
t.string "presentation"
|
206
|
+
t.integer "option_type_id"
|
207
|
+
t.datetime "created_at"
|
208
|
+
t.datetime "updated_at"
|
209
|
+
end
|
210
|
+
|
211
|
+
create_table "spree_option_values_variants", :id => false, :force => true do |t|
|
212
|
+
t.integer "variant_id"
|
213
|
+
t.integer "option_value_id"
|
214
|
+
end
|
215
|
+
|
216
|
+
add_index "spree_option_values_variants", ["variant_id", "option_value_id"], :name => "index_option_values_variants_on_variant_id_and_option_value_id"
|
217
|
+
add_index "spree_option_values_variants", ["variant_id"], :name => "index_option_values_variants_on_variant_id"
|
218
|
+
|
219
|
+
create_table "spree_orders", :force => true do |t|
|
220
|
+
t.string "number", :limit => 15
|
221
|
+
t.decimal "item_total", :default => 0.0, :null => false
|
222
|
+
t.decimal "total", :default => 0.0, :null => false
|
223
|
+
t.string "state"
|
224
|
+
t.decimal "adjustment_total", :default => 0.0, :null => false
|
225
|
+
t.decimal "credit_total", :default => 0.0, :null => false
|
226
|
+
t.integer "user_id"
|
227
|
+
t.datetime "created_at"
|
228
|
+
t.datetime "updated_at"
|
229
|
+
t.datetime "completed_at"
|
230
|
+
t.integer "bill_address_id"
|
231
|
+
t.integer "ship_address_id"
|
232
|
+
t.decimal "payment_total", :precision => 8, :scale => 2, :default => 0.0
|
233
|
+
t.integer "shipping_method_id"
|
234
|
+
t.string "shipment_state"
|
235
|
+
t.string "payment_state"
|
236
|
+
t.string "email"
|
237
|
+
t.text "special_instructions"
|
238
|
+
end
|
239
|
+
|
240
|
+
add_index "spree_orders", ["number"], :name => "index_orders_on_number"
|
241
|
+
|
242
|
+
create_table "spree_pag_seguro_payments", :force => true do |t|
|
243
|
+
t.string "code"
|
244
|
+
t.datetime "date"
|
245
|
+
end
|
246
|
+
|
247
|
+
create_table "spree_payment_methods", :force => true do |t|
|
248
|
+
t.string "type"
|
249
|
+
t.string "name"
|
250
|
+
t.text "description"
|
251
|
+
t.boolean "active", :default => true
|
252
|
+
t.string "environment", :default => "development"
|
253
|
+
t.datetime "created_at"
|
254
|
+
t.datetime "updated_at"
|
255
|
+
t.datetime "deleted_at"
|
256
|
+
t.string "display_on"
|
257
|
+
end
|
258
|
+
|
259
|
+
create_table "spree_payment_notifications", :force => true do |t|
|
260
|
+
t.text "params"
|
261
|
+
t.string "status"
|
262
|
+
t.string "transaction_id"
|
263
|
+
t.integer "order_id"
|
264
|
+
t.string "notification_code"
|
265
|
+
t.datetime "created_at"
|
266
|
+
t.datetime "updated_at"
|
267
|
+
end
|
268
|
+
|
269
|
+
create_table "spree_payments", :force => true do |t|
|
270
|
+
t.decimal "amount", :default => 0.0, :null => false
|
271
|
+
t.integer "order_id"
|
272
|
+
t.datetime "created_at"
|
273
|
+
t.datetime "updated_at"
|
274
|
+
t.integer "source_id"
|
275
|
+
t.string "source_type"
|
276
|
+
t.integer "payment_method_id"
|
277
|
+
t.string "state"
|
278
|
+
t.string "response_code"
|
279
|
+
t.string "avs_response"
|
280
|
+
end
|
281
|
+
|
282
|
+
create_table "spree_preferences", :force => true do |t|
|
283
|
+
t.string "name", :limit => 100
|
284
|
+
t.integer "owner_id", :limit => 30
|
285
|
+
t.string "owner_type", :limit => 50
|
286
|
+
t.integer "group_id"
|
287
|
+
t.string "group_type", :limit => 50
|
288
|
+
t.text "value", :limit => 255
|
289
|
+
t.datetime "created_at"
|
290
|
+
t.datetime "updated_at"
|
291
|
+
t.string "key"
|
292
|
+
t.string "value_type"
|
293
|
+
end
|
294
|
+
|
295
|
+
add_index "spree_preferences", ["key"], :name => "index_spree_preferences_on_key", :unique => true
|
296
|
+
|
297
|
+
create_table "spree_product_groups", :force => true do |t|
|
298
|
+
t.string "name"
|
299
|
+
t.string "permalink"
|
300
|
+
t.string "order"
|
301
|
+
end
|
302
|
+
|
303
|
+
add_index "spree_product_groups", ["name"], :name => "index_product_groups_on_name"
|
304
|
+
add_index "spree_product_groups", ["permalink"], :name => "index_product_groups_on_permalink"
|
305
|
+
|
306
|
+
create_table "spree_product_groups_products", :id => false, :force => true do |t|
|
307
|
+
t.integer "product_id"
|
308
|
+
t.integer "product_group_id"
|
309
|
+
end
|
310
|
+
|
311
|
+
create_table "spree_product_option_types", :force => true do |t|
|
312
|
+
t.integer "position"
|
313
|
+
t.integer "product_id"
|
314
|
+
t.integer "option_type_id"
|
315
|
+
t.datetime "created_at"
|
316
|
+
t.datetime "updated_at"
|
317
|
+
end
|
318
|
+
|
319
|
+
create_table "spree_product_properties", :force => true do |t|
|
320
|
+
t.string "value"
|
321
|
+
t.integer "product_id"
|
322
|
+
t.integer "property_id"
|
323
|
+
t.datetime "created_at"
|
324
|
+
t.datetime "updated_at"
|
325
|
+
end
|
326
|
+
|
327
|
+
add_index "spree_product_properties", ["product_id"], :name => "index_product_properties_on_product_id"
|
328
|
+
|
329
|
+
create_table "spree_product_scopes", :force => true do |t|
|
330
|
+
t.string "name"
|
331
|
+
t.text "arguments"
|
332
|
+
t.integer "product_group_id"
|
333
|
+
end
|
334
|
+
|
335
|
+
add_index "spree_product_scopes", ["name"], :name => "index_product_scopes_on_name"
|
336
|
+
add_index "spree_product_scopes", ["product_group_id"], :name => "index_product_scopes_on_product_group_id"
|
337
|
+
|
338
|
+
create_table "spree_products", :force => true do |t|
|
339
|
+
t.string "name", :default => "", :null => false
|
340
|
+
t.text "description"
|
341
|
+
t.datetime "available_on"
|
342
|
+
t.datetime "deleted_at"
|
343
|
+
t.string "permalink"
|
344
|
+
t.string "meta_description"
|
345
|
+
t.string "meta_keywords"
|
346
|
+
t.integer "tax_category_id"
|
347
|
+
t.integer "shipping_category_id"
|
348
|
+
t.datetime "created_at"
|
349
|
+
t.datetime "updated_at"
|
350
|
+
t.integer "count_on_hand", :default => 0, :null => false
|
351
|
+
end
|
352
|
+
|
353
|
+
add_index "spree_products", ["available_on"], :name => "index_products_on_available_on"
|
354
|
+
add_index "spree_products", ["deleted_at"], :name => "index_products_on_deleted_at"
|
355
|
+
add_index "spree_products", ["name"], :name => "index_products_on_name"
|
356
|
+
add_index "spree_products", ["permalink"], :name => "index_products_on_permalink"
|
357
|
+
|
358
|
+
create_table "spree_products_taxons", :id => false, :force => true do |t|
|
359
|
+
t.integer "product_id"
|
360
|
+
t.integer "taxon_id"
|
361
|
+
end
|
362
|
+
|
363
|
+
add_index "spree_products_taxons", ["product_id"], :name => "index_products_taxons_on_product_id"
|
364
|
+
add_index "spree_products_taxons", ["taxon_id"], :name => "index_products_taxons_on_taxon_id"
|
365
|
+
|
366
|
+
create_table "spree_properties", :force => true do |t|
|
367
|
+
t.string "name"
|
368
|
+
t.string "presentation", :null => false
|
369
|
+
t.datetime "created_at"
|
370
|
+
t.datetime "updated_at"
|
371
|
+
end
|
372
|
+
|
373
|
+
create_table "spree_properties_prototypes", :id => false, :force => true do |t|
|
374
|
+
t.integer "prototype_id"
|
375
|
+
t.integer "property_id"
|
376
|
+
end
|
377
|
+
|
378
|
+
create_table "spree_prototypes", :force => true do |t|
|
379
|
+
t.string "name"
|
380
|
+
t.datetime "created_at"
|
381
|
+
t.datetime "updated_at"
|
382
|
+
end
|
383
|
+
|
384
|
+
create_table "spree_return_authorizations", :force => true do |t|
|
385
|
+
t.string "number"
|
386
|
+
t.string "state"
|
387
|
+
t.decimal "amount", :precision => 8, :scale => 2, :default => 0.0, :null => false
|
388
|
+
t.integer "order_id"
|
389
|
+
t.text "reason"
|
390
|
+
t.datetime "created_at"
|
391
|
+
t.datetime "updated_at"
|
392
|
+
end
|
393
|
+
|
394
|
+
create_table "spree_roles", :force => true do |t|
|
395
|
+
t.string "name"
|
396
|
+
end
|
397
|
+
|
398
|
+
create_table "spree_roles_users", :id => false, :force => true do |t|
|
399
|
+
t.integer "role_id"
|
400
|
+
t.integer "user_id"
|
401
|
+
end
|
402
|
+
|
403
|
+
add_index "spree_roles_users", ["role_id"], :name => "index_roles_users_on_role_id"
|
404
|
+
add_index "spree_roles_users", ["user_id"], :name => "index_roles_users_on_user_id"
|
405
|
+
|
406
|
+
create_table "spree_shipments", :force => true do |t|
|
407
|
+
t.string "tracking"
|
408
|
+
t.string "number"
|
409
|
+
t.decimal "cost", :precision => 8, :scale => 2
|
410
|
+
t.datetime "shipped_at"
|
411
|
+
t.integer "order_id"
|
412
|
+
t.integer "shipping_method_id"
|
413
|
+
t.integer "address_id"
|
414
|
+
t.datetime "created_at"
|
415
|
+
t.datetime "updated_at"
|
416
|
+
t.string "state"
|
417
|
+
end
|
418
|
+
|
419
|
+
add_index "spree_shipments", ["number"], :name => "index_shipments_on_number"
|
420
|
+
|
421
|
+
create_table "spree_shipping_categories", :force => true do |t|
|
422
|
+
t.string "name"
|
423
|
+
t.datetime "created_at"
|
424
|
+
t.datetime "updated_at"
|
425
|
+
end
|
426
|
+
|
427
|
+
create_table "spree_shipping_methods", :force => true do |t|
|
428
|
+
t.string "name"
|
429
|
+
t.integer "zone_id"
|
430
|
+
t.datetime "created_at"
|
431
|
+
t.datetime "updated_at"
|
432
|
+
t.string "display_on"
|
433
|
+
t.integer "shipping_category_id"
|
434
|
+
t.boolean "match_none"
|
435
|
+
t.boolean "match_all"
|
436
|
+
t.boolean "match_one"
|
437
|
+
end
|
438
|
+
|
439
|
+
create_table "spree_state_events", :force => true do |t|
|
440
|
+
t.string "name"
|
441
|
+
t.string "previous_state"
|
442
|
+
t.integer "stateful_id"
|
443
|
+
t.integer "user_id"
|
444
|
+
t.datetime "created_at"
|
445
|
+
t.datetime "updated_at"
|
446
|
+
t.string "stateful_type"
|
447
|
+
t.string "next_state"
|
448
|
+
end
|
449
|
+
|
450
|
+
create_table "spree_states", :force => true do |t|
|
451
|
+
t.string "name"
|
452
|
+
t.string "abbr"
|
453
|
+
t.integer "country_id"
|
454
|
+
end
|
455
|
+
|
456
|
+
create_table "spree_tax_categories", :force => true do |t|
|
457
|
+
t.string "name"
|
458
|
+
t.string "description"
|
459
|
+
t.datetime "created_at"
|
460
|
+
t.datetime "updated_at"
|
461
|
+
t.boolean "is_default", :default => false
|
462
|
+
t.datetime "deleted_at"
|
463
|
+
end
|
464
|
+
|
465
|
+
create_table "spree_tax_rates", :force => true do |t|
|
466
|
+
t.decimal "amount"
|
467
|
+
t.integer "zone_id"
|
468
|
+
t.integer "tax_category_id"
|
469
|
+
t.datetime "created_at"
|
470
|
+
t.datetime "updated_at"
|
471
|
+
t.boolean "included_in_price", :default => false
|
472
|
+
end
|
473
|
+
|
474
|
+
create_table "spree_taxonomies", :force => true do |t|
|
475
|
+
t.string "name", :null => false
|
476
|
+
t.datetime "created_at"
|
477
|
+
t.datetime "updated_at"
|
478
|
+
end
|
479
|
+
|
480
|
+
create_table "spree_taxons", :force => true do |t|
|
481
|
+
t.integer "parent_id"
|
482
|
+
t.integer "position", :default => 0
|
483
|
+
t.string "name", :null => false
|
484
|
+
t.string "permalink"
|
485
|
+
t.integer "taxonomy_id"
|
486
|
+
t.datetime "created_at"
|
487
|
+
t.datetime "updated_at"
|
488
|
+
t.integer "lft"
|
489
|
+
t.integer "rgt"
|
490
|
+
t.string "icon_file_name"
|
491
|
+
t.string "icon_content_type"
|
492
|
+
t.integer "icon_file_size"
|
493
|
+
t.datetime "icon_updated_at"
|
494
|
+
t.text "description"
|
495
|
+
end
|
496
|
+
|
497
|
+
add_index "spree_taxons", ["parent_id"], :name => "index_taxons_on_parent_id"
|
498
|
+
add_index "spree_taxons", ["permalink"], :name => "index_taxons_on_permalink"
|
499
|
+
add_index "spree_taxons", ["taxonomy_id"], :name => "index_taxons_on_taxonomy_id"
|
500
|
+
|
501
|
+
create_table "spree_trackers", :force => true do |t|
|
502
|
+
t.string "environment"
|
503
|
+
t.string "analytics_id"
|
504
|
+
t.boolean "active", :default => true
|
505
|
+
t.datetime "created_at"
|
506
|
+
t.datetime "updated_at"
|
507
|
+
end
|
508
|
+
|
509
|
+
create_table "spree_users", :force => true do |t|
|
510
|
+
t.string "crypted_password", :limit => 128
|
511
|
+
t.string "salt", :limit => 128
|
512
|
+
t.string "email"
|
513
|
+
t.string "remember_token"
|
514
|
+
t.string "remember_token_expires_at"
|
515
|
+
t.string "persistence_token"
|
516
|
+
t.string "single_access_token"
|
517
|
+
t.string "perishable_token"
|
518
|
+
t.integer "login_count", :default => 0, :null => false
|
519
|
+
t.integer "failed_login_count", :default => 0, :null => false
|
520
|
+
t.datetime "last_request_at"
|
521
|
+
t.datetime "current_login_at"
|
522
|
+
t.datetime "last_login_at"
|
523
|
+
t.string "current_login_ip"
|
524
|
+
t.string "last_login_ip"
|
525
|
+
t.string "login"
|
526
|
+
t.integer "ship_address_id"
|
527
|
+
t.integer "bill_address_id"
|
528
|
+
t.datetime "created_at"
|
529
|
+
t.datetime "updated_at"
|
530
|
+
t.string "openid_identifier"
|
531
|
+
end
|
532
|
+
|
533
|
+
add_index "spree_users", ["openid_identifier"], :name => "index_users_on_openid_identifier"
|
534
|
+
add_index "spree_users", ["persistence_token"], :name => "index_users_on_persistence_token"
|
535
|
+
|
536
|
+
create_table "spree_variants", :force => true do |t|
|
537
|
+
t.string "sku", :default => "", :null => false
|
538
|
+
t.decimal "price", :precision => 8, :scale => 2, :null => false
|
539
|
+
t.decimal "weight", :precision => 8, :scale => 2
|
540
|
+
t.decimal "height", :precision => 8, :scale => 2
|
541
|
+
t.decimal "width", :precision => 8, :scale => 2
|
542
|
+
t.decimal "depth", :precision => 8, :scale => 2
|
543
|
+
t.datetime "deleted_at"
|
544
|
+
t.boolean "is_master", :default => false
|
545
|
+
t.integer "product_id"
|
546
|
+
t.integer "count_on_hand", :default => 0, :null => false
|
547
|
+
t.decimal "cost_price", :precision => 8, :scale => 2
|
548
|
+
t.integer "position"
|
549
|
+
end
|
550
|
+
|
551
|
+
add_index "spree_variants", ["product_id"], :name => "index_variants_on_product_id"
|
552
|
+
|
553
|
+
create_table "spree_zone_members", :force => true do |t|
|
554
|
+
t.integer "zoneable_id"
|
555
|
+
t.string "zoneable_type"
|
556
|
+
t.integer "zone_id"
|
557
|
+
t.datetime "created_at"
|
558
|
+
t.datetime "updated_at"
|
559
|
+
end
|
560
|
+
|
561
|
+
create_table "spree_zones", :force => true do |t|
|
562
|
+
t.string "name"
|
563
|
+
t.string "description"
|
564
|
+
t.datetime "created_at"
|
565
|
+
t.datetime "updated_at"
|
566
|
+
t.boolean "default_tax", :default => false
|
567
|
+
end
|
568
|
+
|
569
|
+
end
|