spree_purchase_order 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/db/migrate/20160111123141_create_spree_purchase_orders.rb +1 -1
  3. data/db/migrate/20161214190805_add_payment_method_id_to_spree_purchase_orders.rb +1 -1
  4. data/db/migrate/20161214191512_add_user_id_to_spree_purchase_orders.rb +1 -1
  5. data/lib/spree_purchase_order/version.rb +1 -1
  6. data/spec/dummy/config/application.rb +0 -2
  7. data/spec/dummy/db/migrate/20180516191805_add_quantity_to_inventory_units.spree.rb +6 -0
  8. data/spec/dummy/db/migrate/20180516191806_add_original_return_item_id_to_spree_inventory_units.spree.rb +30 -0
  9. data/spec/dummy/db/migrate/20180516191807_add_unique_index_on_number_to_spree_orders.spree.rb +17 -0
  10. data/spec/dummy/db/migrate/20180516191808_add_unique_index_on_number_to_spree_stock_transfer.spree.rb +17 -0
  11. data/spec/dummy/db/migrate/20180516191809_add_unique_index_on_number_to_spree_shipment.spree.rb +17 -0
  12. data/spec/dummy/db/migrate/20180516191810_add_unique_index_on_number_to_spree_payments.spree.rb +18 -0
  13. data/spec/dummy/db/migrate/20180516191811_add_unique_index_on_number_to_spree_return_authorizations.spree.rb +17 -0
  14. data/spec/dummy/db/migrate/20180516191812_add_unique_index_on_number_to_spree_customer_returns.spree.rb +17 -0
  15. data/spec/dummy/db/migrate/20180516191813_add_unique_index_on_number_to_spree_reimbursements.spree.rb +17 -0
  16. data/spec/dummy/db/migrate/20180516191814_add_missing_unique_indexes_for_unique_attributes.spree.rb +38 -0
  17. data/spec/dummy/db/migrate/20180516191815_add_index_on_stock_location_to_spree_customer_returns.spree.rb +6 -0
  18. data/spec/dummy/db/migrate/20180516191816_add_index_on_prototype_to_spree_option_type_prototype.spree.rb +20 -0
  19. data/spec/dummy/db/migrate/20180516191817_add_indexes_to_spree_option_value_variant.spree.rb +20 -0
  20. data/spec/dummy/db/migrate/20180516191818_add_index_on_promotion_id_to_order_promotions.spree.rb +6 -0
  21. data/spec/dummy/db/migrate/20180516191819_add_indexes_for_property_prototype.spree.rb +21 -0
  22. data/spec/dummy/db/migrate/20180516191820_add_index_for_prototype_id_to_prototype_taxons.spree.rb +6 -0
  23. data/spec/dummy/db/migrate/20180516191821_add_indexes_to_refunds.spree.rb +7 -0
  24. data/spec/dummy/db/migrate/20180516191822_add_indexes_to_reimbursement_credits.spree.rb +7 -0
  25. data/spec/dummy/db/migrate/20180516191823_add_indexes_to_return_authorizations.spree.rb +7 -0
  26. data/spec/dummy/db/migrate/20180516191824_add_indexes_to_return_items.spree.rb +12 -0
  27. data/spec/dummy/db/migrate/20180516191825_add_index_to_role_users.spree.rb +19 -0
  28. data/spec/dummy/db/migrate/20180516191826_add_index_to_shipping_method_categories.spree.rb +6 -0
  29. data/spec/dummy/db/migrate/20180516191827_add_index_to_shipping_method_zones.spree.rb +21 -0
  30. data/spec/dummy/db/migrate/20180516191828_add_index_to_spree_shipping_rates.spree.rb +7 -0
  31. data/spec/dummy/db/migrate/20180516191829_add_index_to_spree_stock_items.spree.rb +6 -0
  32. data/spec/dummy/db/migrate/20180516191830_add_index_to_spree_stock_movement.spree.rb +6 -0
  33. data/spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb +11 -0
  34. data/spec/dummy/db/migrate/20180516191832_add_analytics_kind_to_spree_trackers.spree.rb +6 -0
  35. data/spec/dummy/db/migrate/20180516191833_rename_tracker_kind_field.spree.rb +6 -0
  36. data/spec/dummy/db/schema.rb +553 -517
  37. data/spec/dummy/db/test.sqlite3 +0 -0
  38. data/spec/dummy/log/test.log +3913 -0
  39. metadata +62 -4
@@ -10,13 +10,13 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20180516182071) do
13
+ ActiveRecord::Schema.define(version: 20180516191833) do
14
14
 
15
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"
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
20
  t.datetime "created_at"
21
21
  t.datetime "deleted_at"
22
22
  t.index ["deleted_at"], name: "index_friendly_id_slugs_on_deleted_at"
@@ -27,20 +27,20 @@ ActiveRecord::Schema.define(version: 20180516182071) do
27
27
  end
28
28
 
29
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
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
44
  t.index ["country_id"], name: "index_spree_addresses_on_country_id"
45
45
  t.index ["firstname"], name: "index_addresses_on_firstname"
46
46
  t.index ["lastname"], name: "index_addresses_on_lastname"
@@ -48,19 +48,19 @@ ActiveRecord::Schema.define(version: 20180516182071) do
48
48
  end
49
49
 
50
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
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
64
  t.index ["adjustable_id", "adjustable_type"], name: "index_spree_adjustments_on_adjustable_id_and_adjustable_type"
65
65
  t.index ["eligible"], name: "index_spree_adjustments_on_eligible"
66
66
  t.index ["order_id"], name: "index_spree_adjustments_on_order_id"
@@ -68,17 +68,17 @@ ActiveRecord::Schema.define(version: 20180516182071) do
68
68
  end
69
69
 
70
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
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
80
  t.datetime "attachment_updated_at"
81
- t.text "alt"
81
+ t.text "alt"
82
82
  t.datetime "created_at"
83
83
  t.datetime "updated_at"
84
84
  t.index ["position"], name: "index_spree_assets_on_position"
@@ -87,12 +87,12 @@ ActiveRecord::Schema.define(version: 20180516182071) do
87
87
  end
88
88
 
89
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"
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
96
  t.datetime "deleted_at"
97
97
  t.index ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"
98
98
  t.index ["deleted_at"], name: "index_spree_calculators_on_deleted_at"
@@ -100,100 +100,107 @@ ActiveRecord::Schema.define(version: 20180516182071) do
100
100
  end
101
101
 
102
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
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
109
  t.datetime "updated_at"
110
- t.boolean "zipcode_required", default: true
110
+ t.boolean "zipcode_required", default: true
111
+ t.index ["iso_name"], name: "index_spree_countries_on_iso_name", unique: true
112
+ t.index ["name"], name: "index_spree_countries_on_name", unique: true
111
113
  end
112
114
 
113
115
  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
116
+ t.string "month"
117
+ t.string "year"
118
+ t.string "cc_type"
119
+ t.string "last_digits"
120
+ t.integer "address_id"
121
+ t.string "gateway_customer_profile_id"
122
+ t.string "gateway_payment_profile_id"
123
+ t.datetime "created_at", null: false
124
+ t.datetime "updated_at", null: false
125
+ t.string "name"
126
+ t.integer "user_id"
127
+ t.integer "payment_method_id"
128
+ t.boolean "default", default: false, null: false
127
129
  t.index ["address_id"], name: "index_spree_credit_cards_on_address_id"
128
130
  t.index ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"
129
131
  t.index ["user_id"], name: "index_spree_credit_cards_on_user_id"
130
132
  end
131
133
 
132
134
  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
135
+ t.string "number"
136
+ t.integer "stock_location_id"
137
+ t.datetime "created_at", null: false
138
+ t.datetime "updated_at", null: false
139
+ t.index ["number"], name: "index_spree_customer_returns_on_number", unique: true
140
+ t.index ["stock_location_id"], name: "index_spree_customer_returns_on_stock_location_id"
137
141
  end
138
142
 
139
143
  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"
144
+ t.string "type"
145
+ t.string "name"
146
+ t.text "description"
147
+ t.boolean "active", default: true
148
+ t.string "environment", default: "development"
149
+ t.string "server", default: "test"
150
+ t.boolean "test_mode", default: true
151
+ t.datetime "created_at", null: false
152
+ t.datetime "updated_at", null: false
153
+ t.text "preferences"
150
154
  t.index ["active"], name: "index_spree_gateways_on_active"
151
155
  t.index ["test_mode"], name: "index_spree_gateways_on_test_mode"
152
156
  end
153
157
 
154
158
  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"
159
+ t.string "state"
160
+ t.integer "variant_id"
161
+ t.integer "order_id"
162
+ t.integer "shipment_id"
163
+ t.datetime "created_at", null: false
164
+ t.datetime "updated_at", null: false
165
+ t.boolean "pending", default: true
166
+ t.integer "line_item_id"
167
+ t.integer "quantity", default: 1
168
+ t.integer "original_return_item_id"
163
169
  t.index ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"
164
170
  t.index ["order_id"], name: "index_inventory_units_on_order_id"
171
+ t.index ["original_return_item_id"], name: "index_spree_inventory_units_on_original_return_item_id"
165
172
  t.index ["shipment_id"], name: "index_inventory_units_on_shipment_id"
166
173
  t.index ["variant_id"], name: "index_inventory_units_on_variant_id"
167
174
  end
168
175
 
169
176
  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
177
+ t.integer "variant_id"
178
+ t.integer "order_id"
179
+ t.integer "quantity", null: false
180
+ t.decimal "price", precision: 10, scale: 2, null: false
181
+ t.datetime "created_at", null: false
182
+ t.datetime "updated_at", null: false
183
+ t.string "currency"
184
+ t.decimal "cost_price", precision: 10, scale: 2
185
+ t.integer "tax_category_id"
186
+ t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
187
+ t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
188
+ t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
189
+ t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
190
+ t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
191
+ t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
192
+ t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
186
193
  t.index ["order_id"], name: "index_spree_line_items_on_order_id"
187
194
  t.index ["tax_category_id"], name: "index_spree_line_items_on_tax_category_id"
188
195
  t.index ["variant_id"], name: "index_spree_line_items_on_variant_id"
189
196
  end
190
197
 
191
198
  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
199
+ t.string "source_type"
200
+ t.integer "source_id"
201
+ t.text "details"
202
+ t.datetime "created_at", null: false
203
+ t.datetime "updated_at", null: false
197
204
  t.index ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"
198
205
  end
199
206
 
@@ -201,15 +208,16 @@ ActiveRecord::Schema.define(version: 20180516182071) do
201
208
  t.integer "prototype_id"
202
209
  t.integer "option_type_id"
203
210
  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"
211
+ t.index ["prototype_id", "option_type_id"], name: "spree_option_type_prototypes_prototype_id_option_type_id", unique: true
212
+ t.index ["prototype_id"], name: "index_spree_option_type_prototypes_on_prototype_id"
205
213
  end
206
214
 
207
215
  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
216
+ t.string "name", limit: 100
217
+ t.string "presentation", limit: 100
218
+ t.integer "position", default: 0, null: false
219
+ t.datetime "created_at", null: false
220
+ t.datetime "updated_at", null: false
213
221
  t.index ["name"], name: "index_spree_option_types_on_name"
214
222
  t.index ["position"], name: "index_spree_option_types_on_position"
215
223
  end
@@ -218,16 +226,17 @@ ActiveRecord::Schema.define(version: 20180516182071) do
218
226
  t.integer "variant_id"
219
227
  t.integer "option_value_id"
220
228
  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"
229
+ t.index ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id", unique: true
230
+ t.index ["variant_id"], name: "index_spree_option_value_variants_on_variant_id"
222
231
  end
223
232
 
224
233
  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
234
+ t.integer "position"
235
+ t.string "name"
236
+ t.string "presentation"
237
+ t.integer "option_type_id"
238
+ t.datetime "created_at", null: false
239
+ t.datetime "updated_at", null: false
231
240
  t.index ["name"], name: "index_spree_option_values_on_name"
232
241
  t.index ["option_type_id"], name: "index_spree_option_values_on_option_type_id"
233
242
  t.index ["position"], name: "index_spree_option_values_on_position"
@@ -238,45 +247,46 @@ ActiveRecord::Schema.define(version: 20180516182071) do
238
247
  t.integer "promotion_id"
239
248
  t.index ["order_id"], name: "index_spree_order_promotions_on_order_id"
240
249
  t.index ["promotion_id", "order_id"], name: "index_spree_order_promotions_on_promotion_id_and_order_id"
250
+ t.index ["promotion_id"], name: "index_spree_order_promotions_on_promotion_id"
241
251
  end
242
252
 
243
253
  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"
254
+ t.string "number", limit: 32
255
+ t.decimal "item_total", precision: 10, scale: 2, default: "0.0", null: false
256
+ t.decimal "total", precision: 10, scale: 2, default: "0.0", null: false
257
+ t.string "state"
258
+ t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
259
+ t.integer "user_id"
250
260
  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"
261
+ t.integer "bill_address_id"
262
+ t.integer "ship_address_id"
263
+ t.decimal "payment_total", precision: 10, scale: 2, default: "0.0"
264
+ t.string "shipment_state"
265
+ t.string "payment_state"
266
+ t.string "email"
267
+ t.text "special_instructions"
268
+ t.datetime "created_at", null: false
269
+ t.datetime "updated_at", null: false
270
+ t.string "currency"
271
+ t.string "last_ip_address"
272
+ t.integer "created_by_id"
273
+ t.decimal "shipment_total", precision: 10, scale: 2, default: "0.0", null: false
274
+ t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
275
+ t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
276
+ t.string "channel", default: "spree"
277
+ t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
278
+ t.integer "item_count", default: 0
279
+ t.integer "approver_id"
270
280
  t.datetime "approved_at"
271
- t.boolean "confirmation_delivered", default: false
272
- t.boolean "considered_risky", default: false
273
- t.string "guest_token"
281
+ t.boolean "confirmation_delivered", default: false
282
+ t.boolean "considered_risky", default: false
283
+ t.string "guest_token"
274
284
  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
285
+ t.integer "canceler_id"
286
+ t.integer "store_id"
287
+ t.integer "state_lock_version", default: 0, null: false
288
+ t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
289
+ t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
280
290
  t.index ["approver_id"], name: "index_spree_orders_on_approver_id"
281
291
  t.index ["bill_address_id"], name: "index_spree_orders_on_bill_address_id"
282
292
  t.index ["canceler_id"], name: "index_spree_orders_on_canceler_id"
@@ -285,67 +295,67 @@ ActiveRecord::Schema.define(version: 20180516182071) do
285
295
  t.index ["considered_risky"], name: "index_spree_orders_on_considered_risky"
286
296
  t.index ["created_by_id"], name: "index_spree_orders_on_created_by_id"
287
297
  t.index ["guest_token"], name: "index_spree_orders_on_guest_token"
288
- t.index ["number"], name: "index_spree_orders_on_number"
298
+ t.index ["number"], name: "index_spree_orders_on_number", unique: true
289
299
  t.index ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"
290
300
  t.index ["store_id"], name: "index_spree_orders_on_store_id"
291
301
  t.index ["user_id", "created_by_id"], name: "index_spree_orders_on_user_id_and_created_by_id"
292
302
  end
293
303
 
294
304
  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
305
+ t.decimal "amount", precision: 10, scale: 2, default: "0.0"
306
+ t.integer "payment_id"
307
+ t.datetime "created_at", null: false
308
+ t.datetime "updated_at", null: false
299
309
  t.index ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"
300
310
  end
301
311
 
302
312
  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
313
+ t.string "type"
314
+ t.string "name"
315
+ t.text "description"
316
+ t.boolean "active", default: true
307
317
  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
318
+ t.datetime "created_at", null: false
319
+ t.datetime "updated_at", null: false
320
+ t.string "display_on", default: "both"
321
+ t.boolean "auto_capture"
322
+ t.text "preferences"
323
+ t.integer "position", default: 0
314
324
  t.index ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"
315
325
  end
316
326
 
317
327
  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"
328
+ t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
329
+ t.integer "order_id"
330
+ t.string "source_type"
331
+ t.integer "source_id"
332
+ t.integer "payment_method_id"
333
+ t.string "state"
334
+ t.string "response_code"
335
+ t.string "avs_response"
336
+ t.datetime "created_at", null: false
337
+ t.datetime "updated_at", null: false
338
+ t.string "number"
339
+ t.string "cvv_response_code"
340
+ t.string "cvv_response_message"
341
+ t.index ["number"], name: "index_spree_payments_on_number", unique: true
332
342
  t.index ["order_id"], name: "index_spree_payments_on_order_id"
333
343
  t.index ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"
334
344
  t.index ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"
335
345
  end
336
346
 
337
347
  create_table "spree_preferences", force: :cascade do |t|
338
- t.text "value"
339
- t.string "key"
348
+ t.text "value"
349
+ t.string "key"
340
350
  t.datetime "created_at", null: false
341
351
  t.datetime "updated_at", null: false
342
352
  t.index ["key"], name: "index_spree_preferences_on_key", unique: true
343
353
  end
344
354
 
345
355
  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"
356
+ t.integer "variant_id", null: false
357
+ t.decimal "amount", precision: 10, scale: 2
358
+ t.string "currency"
349
359
  t.datetime "deleted_at"
350
360
  t.index ["deleted_at"], name: "index_spree_prices_on_deleted_at"
351
361
  t.index ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
@@ -353,11 +363,11 @@ ActiveRecord::Schema.define(version: 20180516182071) do
353
363
  end
354
364
 
355
365
  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
366
+ t.integer "position"
367
+ t.integer "product_id"
368
+ t.integer "option_type_id"
369
+ t.datetime "created_at", null: false
370
+ t.datetime "updated_at", null: false
361
371
  t.index ["option_type_id"], name: "index_spree_product_option_types_on_option_type_id"
362
372
  t.index ["position"], name: "index_spree_product_option_types_on_position"
363
373
  t.index ["product_id"], name: "index_spree_product_option_types_on_product_id"
@@ -371,31 +381,31 @@ ActiveRecord::Schema.define(version: 20180516182071) do
371
381
  end
372
382
 
373
383
  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
384
+ t.string "value"
385
+ t.integer "product_id"
386
+ t.integer "property_id"
387
+ t.datetime "created_at", null: false
388
+ t.datetime "updated_at", null: false
389
+ t.integer "position", default: 0
380
390
  t.index ["position"], name: "index_spree_product_properties_on_position"
381
391
  t.index ["product_id"], name: "index_product_properties_on_product_id"
382
392
  t.index ["property_id"], name: "index_spree_product_properties_on_property_id"
383
393
  end
384
394
 
385
395
  create_table "spree_products", force: :cascade do |t|
386
- t.string "name", default: "", null: false
387
- t.text "description"
396
+ t.string "name", default: "", null: false
397
+ t.text "description"
388
398
  t.datetime "available_on"
389
399
  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"
400
+ t.string "slug"
401
+ t.text "meta_description"
402
+ t.string "meta_keywords"
403
+ t.integer "tax_category_id"
404
+ t.integer "shipping_category_id"
405
+ t.datetime "created_at", null: false
406
+ t.datetime "updated_at", null: false
407
+ t.boolean "promotionable", default: true
408
+ t.string "meta_title"
399
409
  t.datetime "discontinue_on"
400
410
  t.index ["available_on"], name: "index_spree_products_on_available_on"
401
411
  t.index ["deleted_at"], name: "index_spree_products_on_deleted_at"
@@ -418,15 +428,15 @@ ActiveRecord::Schema.define(version: 20180516182071) do
418
428
  create_table "spree_promotion_action_line_items", force: :cascade do |t|
419
429
  t.integer "promotion_action_id"
420
430
  t.integer "variant_id"
421
- t.integer "quantity", default: 1
431
+ t.integer "quantity", default: 1
422
432
  t.index ["promotion_action_id"], name: "index_spree_promotion_action_line_items_on_promotion_action_id"
423
433
  t.index ["variant_id"], name: "index_spree_promotion_action_line_items_on_variant_id"
424
434
  end
425
435
 
426
436
  create_table "spree_promotion_actions", force: :cascade do |t|
427
- t.integer "promotion_id"
428
- t.integer "position"
429
- t.string "type"
437
+ t.integer "promotion_id"
438
+ t.integer "position"
439
+ t.string "type"
430
440
  t.datetime "deleted_at"
431
441
  t.index ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"
432
442
  t.index ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"
@@ -434,10 +444,10 @@ ActiveRecord::Schema.define(version: 20180516182071) do
434
444
  end
435
445
 
436
446
  create_table "spree_promotion_categories", force: :cascade do |t|
437
- t.string "name"
447
+ t.string "name"
438
448
  t.datetime "created_at", null: false
439
449
  t.datetime "updated_at", null: false
440
- t.string "code"
450
+ t.string "code"
441
451
  end
442
452
 
443
453
  create_table "spree_promotion_rule_taxons", force: :cascade do |t|
@@ -455,33 +465,33 @@ ActiveRecord::Schema.define(version: 20180516182071) do
455
465
  end
456
466
 
457
467
  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"
468
+ t.integer "promotion_id"
469
+ t.integer "user_id"
470
+ t.integer "product_group_id"
471
+ t.string "type"
472
+ t.datetime "created_at", null: false
473
+ t.datetime "updated_at", null: false
474
+ t.string "code"
475
+ t.text "preferences"
466
476
  t.index ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
467
477
  t.index ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"
468
478
  t.index ["user_id"], name: "index_promotion_rules_on_user_id"
469
479
  end
470
480
 
471
481
  create_table "spree_promotions", force: :cascade do |t|
472
- t.string "description"
482
+ t.string "description"
473
483
  t.datetime "expires_at"
474
484
  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.string "name"
486
+ t.string "type"
487
+ t.integer "usage_limit"
488
+ t.string "match_policy", default: "all"
489
+ t.string "code"
490
+ t.boolean "advertise", default: false
491
+ t.string "path"
492
+ t.datetime "created_at", null: false
493
+ t.datetime "updated_at", null: false
494
+ t.integer "promotion_category_id"
485
495
  t.index ["advertise"], name: "index_spree_promotions_on_advertise"
486
496
  t.index ["code"], name: "index_spree_promotions_on_code"
487
497
  t.index ["expires_at"], name: "index_spree_promotions_on_expires_at"
@@ -491,131 +501,149 @@ ActiveRecord::Schema.define(version: 20180516182071) do
491
501
  end
492
502
 
493
503
  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
504
+ t.string "name"
505
+ t.string "presentation", null: false
506
+ t.datetime "created_at", null: false
507
+ t.datetime "updated_at", null: false
498
508
  t.index ["name"], name: "index_spree_properties_on_name"
499
509
  end
500
510
 
501
511
  create_table "spree_property_prototypes", force: :cascade do |t|
502
512
  t.integer "prototype_id"
503
513
  t.integer "property_id"
504
- t.index ["prototype_id", "property_id"], name: "index_properties_prototypes_on_prototype_and_property"
514
+ t.index ["property_id"], name: "index_spree_property_prototypes_on_property_id"
515
+ t.index ["prototype_id", "property_id"], name: "index_property_prototypes_on_prototype_id_and_property_id", unique: true
516
+ t.index ["prototype_id"], name: "index_spree_property_prototypes_on_prototype_id"
505
517
  end
506
518
 
507
519
  create_table "spree_prototype_taxons", force: :cascade do |t|
508
520
  t.integer "taxon_id"
509
521
  t.integer "prototype_id"
510
522
  t.index ["prototype_id", "taxon_id"], name: "index_spree_prototype_taxons_on_prototype_id_and_taxon_id"
523
+ t.index ["prototype_id"], name: "index_spree_prototype_taxons_on_prototype_id"
511
524
  t.index ["taxon_id"], name: "index_spree_prototype_taxons_on_taxon_id"
512
525
  end
513
526
 
514
527
  create_table "spree_prototypes", force: :cascade do |t|
515
- t.string "name"
528
+ t.string "name"
516
529
  t.datetime "created_at", null: false
517
530
  t.datetime "updated_at", null: false
518
531
  end
519
532
 
520
533
  create_table "spree_purchase_orders", force: :cascade do |t|
521
- t.string "po_number"
522
- t.string "organization_name"
534
+ t.string "po_number"
535
+ t.string "organization_name"
523
536
  t.datetime "created_at"
524
537
  t.datetime "updated_at"
525
- t.integer "payment_method_id"
526
- t.integer "user_id"
538
+ t.integer "payment_method_id"
539
+ t.integer "user_id"
527
540
  t.index ["payment_method_id"], name: "index_spree_purchase_orders_on_payment_method_id"
528
541
  t.index ["user_id"], name: "index_spree_purchase_orders_on_user_id"
529
542
  end
530
543
 
531
544
  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
545
+ t.string "name"
546
+ t.boolean "active", default: true
547
+ t.boolean "mutable", default: true
548
+ t.datetime "created_at", null: false
549
+ t.datetime "updated_at", null: false
550
+ t.index ["name"], name: "index_spree_refund_reasons_on_name", unique: true
537
551
  end
538
552
 
539
553
  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"
554
+ t.integer "payment_id"
555
+ t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
556
+ t.string "transaction_id"
557
+ t.datetime "created_at", null: false
558
+ t.datetime "updated_at", null: false
559
+ t.integer "refund_reason_id"
560
+ t.integer "reimbursement_id"
561
+ t.index ["payment_id"], name: "index_spree_refunds_on_payment_id"
547
562
  t.index ["refund_reason_id"], name: "index_refunds_on_refund_reason_id"
563
+ t.index ["reimbursement_id"], name: "index_spree_refunds_on_reimbursement_id"
548
564
  end
549
565
 
550
566
  create_table "spree_reimbursement_credits", force: :cascade do |t|
551
- t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
567
+ t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
552
568
  t.integer "reimbursement_id"
553
569
  t.integer "creditable_id"
554
- t.string "creditable_type"
570
+ t.string "creditable_type"
571
+ t.index ["creditable_id", "creditable_type"], name: "index_reimbursement_credits_on_creditable_id_and_type"
572
+ t.index ["reimbursement_id"], name: "index_spree_reimbursement_credits_on_reimbursement_id"
555
573
  end
556
574
 
557
575
  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"
576
+ t.string "name"
577
+ t.boolean "active", default: true
578
+ t.boolean "mutable", default: true
579
+ t.datetime "created_at", null: false
580
+ t.datetime "updated_at", null: false
581
+ t.string "type"
582
+ t.index ["name"], name: "index_spree_reimbursement_types_on_name", unique: true
564
583
  t.index ["type"], name: "index_spree_reimbursement_types_on_type"
565
584
  end
566
585
 
567
586
  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
587
+ t.string "number"
588
+ t.string "reimbursement_status"
589
+ t.integer "customer_return_id"
590
+ t.integer "order_id"
591
+ t.decimal "total", precision: 10, scale: 2
592
+ t.datetime "created_at", null: false
593
+ t.datetime "updated_at", null: false
575
594
  t.index ["customer_return_id"], name: "index_spree_reimbursements_on_customer_return_id"
595
+ t.index ["number"], name: "index_spree_reimbursements_on_number", unique: true
576
596
  t.index ["order_id"], name: "index_spree_reimbursements_on_order_id"
577
597
  end
578
598
 
579
599
  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
600
+ t.string "name"
601
+ t.boolean "active", default: true
602
+ t.boolean "mutable", default: true
603
+ t.datetime "created_at", null: false
604
+ t.datetime "updated_at", null: false
605
+ t.index ["name"], name: "index_spree_return_authorization_reasons_on_name", unique: true
585
606
  end
586
607
 
587
608
  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"
609
+ t.string "number"
610
+ t.string "state"
611
+ t.integer "order_id"
612
+ t.text "memo"
592
613
  t.datetime "created_at"
593
614
  t.datetime "updated_at"
594
- t.integer "stock_location_id"
595
- t.integer "return_authorization_reason_id"
615
+ t.integer "stock_location_id"
616
+ t.integer "return_authorization_reason_id"
617
+ t.index ["number"], name: "index_spree_return_authorizations_on_number", unique: true
618
+ t.index ["order_id"], name: "index_spree_return_authorizations_on_order_id"
596
619
  t.index ["return_authorization_reason_id"], name: "index_return_authorizations_on_return_authorization_reason_id"
620
+ t.index ["stock_location_id"], name: "index_spree_return_authorizations_on_stock_location_id"
597
621
  end
598
622
 
599
623
  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
624
+ t.integer "return_authorization_id"
625
+ t.integer "inventory_unit_id"
626
+ t.integer "exchange_variant_id"
627
+ t.datetime "created_at", null: false
628
+ t.datetime "updated_at", null: false
629
+ t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
630
+ t.decimal "included_tax_total", precision: 12, scale: 4, default: "0.0", null: false
631
+ t.decimal "additional_tax_total", precision: 12, scale: 4, default: "0.0", null: false
632
+ t.string "reception_status"
633
+ t.string "acceptance_status"
634
+ t.integer "customer_return_id"
635
+ t.integer "reimbursement_id"
636
+ t.text "acceptance_status_errors"
637
+ t.integer "preferred_reimbursement_type_id"
638
+ t.integer "override_reimbursement_type_id"
639
+ t.boolean "resellable", default: true, null: false
617
640
  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"
641
+ t.index ["exchange_variant_id"], name: "index_spree_return_items_on_exchange_variant_id"
642
+ t.index ["inventory_unit_id"], name: "index_spree_return_items_on_inventory_unit_id"
643
+ t.index ["override_reimbursement_type_id"], name: "index_spree_return_items_on_override_reimbursement_type_id"
644
+ t.index ["preferred_reimbursement_type_id"], name: "index_spree_return_items_on_preferred_reimbursement_type_id"
645
+ t.index ["reimbursement_id"], name: "index_spree_return_items_on_reimbursement_id"
646
+ t.index ["return_authorization_id"], name: "index_spree_return_items_on_return_authorization_id"
619
647
  end
620
648
 
621
649
  create_table "spree_role_users", force: :cascade do |t|
@@ -627,132 +655,138 @@ ActiveRecord::Schema.define(version: 20180516182071) do
627
655
 
628
656
  create_table "spree_roles", force: :cascade do |t|
629
657
  t.string "name"
630
- t.index ["name"], name: "index_spree_roles_on_name"
658
+ t.index ["name"], name: "index_spree_roles_on_name", unique: true
631
659
  end
632
660
 
633
661
  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"
662
+ t.string "tracking"
663
+ t.string "number"
664
+ t.decimal "cost", precision: 10, scale: 2, default: "0.0"
637
665
  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
666
+ t.integer "order_id"
667
+ t.integer "address_id"
668
+ t.string "state"
669
+ t.datetime "created_at", null: false
670
+ t.datetime "updated_at", null: false
671
+ t.integer "stock_location_id"
672
+ t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
673
+ t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
674
+ t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
675
+ t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
676
+ t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false
677
+ t.decimal "taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
678
+ t.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
651
679
  t.index ["address_id"], name: "index_spree_shipments_on_address_id"
652
- t.index ["number"], name: "index_shipments_on_number"
680
+ t.index ["number"], name: "index_spree_shipments_on_number", unique: true
653
681
  t.index ["order_id"], name: "index_spree_shipments_on_order_id"
654
682
  t.index ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"
655
683
  end
656
684
 
657
685
  create_table "spree_shipping_categories", force: :cascade do |t|
658
- t.string "name"
686
+ t.string "name"
659
687
  t.datetime "created_at", null: false
660
688
  t.datetime "updated_at", null: false
661
689
  t.index ["name"], name: "index_spree_shipping_categories_on_name"
662
690
  end
663
691
 
664
692
  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
693
+ t.integer "shipping_method_id", null: false
694
+ t.integer "shipping_category_id", null: false
695
+ t.datetime "created_at", null: false
696
+ t.datetime "updated_at", null: false
669
697
  t.index ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
698
+ t.index ["shipping_category_id"], name: "index_spree_shipping_method_categories_on_shipping_category_id"
670
699
  t.index ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
671
700
  end
672
701
 
673
702
  create_table "spree_shipping_method_zones", force: :cascade do |t|
674
703
  t.integer "shipping_method_id"
675
704
  t.integer "zone_id"
705
+ t.index ["shipping_method_id"], name: "index_spree_shipping_method_zones_on_shipping_method_id"
706
+ t.index ["zone_id"], name: "index_spree_shipping_method_zones_on_zone_id"
676
707
  end
677
708
 
678
709
  create_table "spree_shipping_methods", force: :cascade do |t|
679
- t.string "name"
680
- t.string "display_on"
710
+ t.string "name"
711
+ t.string "display_on"
681
712
  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"
713
+ t.datetime "created_at", null: false
714
+ t.datetime "updated_at", null: false
715
+ t.string "tracking_url"
716
+ t.string "admin_name"
717
+ t.integer "tax_category_id"
718
+ t.string "code"
688
719
  t.index ["deleted_at"], name: "index_spree_shipping_methods_on_deleted_at"
689
720
  t.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"
690
721
  end
691
722
 
692
723
  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"
724
+ t.integer "shipment_id"
725
+ t.integer "shipping_method_id"
726
+ t.boolean "selected", default: false
727
+ t.decimal "cost", precision: 8, scale: 2, default: "0.0"
728
+ t.datetime "created_at", null: false
729
+ t.datetime "updated_at", null: false
730
+ t.integer "tax_rate_id"
700
731
  t.index ["selected"], name: "index_spree_shipping_rates_on_selected"
701
732
  t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
733
+ t.index ["shipment_id"], name: "index_spree_shipping_rates_on_shipment_id"
734
+ t.index ["shipping_method_id"], name: "index_spree_shipping_rates_on_shipping_method_id"
702
735
  t.index ["tax_rate_id"], name: "index_spree_shipping_rates_on_tax_rate_id"
703
736
  end
704
737
 
705
738
  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
739
+ t.string "name"
740
+ t.string "previous_state"
741
+ t.integer "stateful_id"
742
+ t.integer "user_id"
743
+ t.string "stateful_type"
744
+ t.string "next_state"
745
+ t.datetime "created_at", null: false
746
+ t.datetime "updated_at", null: false
714
747
  t.index ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"
715
748
  end
716
749
 
717
750
  create_table "spree_states", force: :cascade do |t|
718
- t.string "name"
719
- t.string "abbr"
720
- t.integer "country_id"
751
+ t.string "name"
752
+ t.string "abbr"
753
+ t.integer "country_id"
721
754
  t.datetime "updated_at"
722
755
  t.index ["country_id"], name: "index_spree_states_on_country_id"
723
756
  end
724
757
 
725
758
  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
759
+ t.integer "stock_location_id"
760
+ t.integer "variant_id"
761
+ t.integer "count_on_hand", default: 0, null: false
762
+ t.datetime "created_at", null: false
763
+ t.datetime "updated_at", null: false
764
+ t.boolean "backorderable", default: false
732
765
  t.datetime "deleted_at"
733
766
  t.index ["backorderable"], name: "index_spree_stock_items_on_backorderable"
734
767
  t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
735
768
  t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
769
+ t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
736
770
  t.index ["variant_id"], name: "index_spree_stock_items_on_variant_id"
737
771
  end
738
772
 
739
773
  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"
774
+ t.string "name"
775
+ t.datetime "created_at", null: false
776
+ t.datetime "updated_at", null: false
777
+ t.boolean "default", default: false, null: false
778
+ t.string "address1"
779
+ t.string "address2"
780
+ t.string "city"
781
+ t.integer "state_id"
782
+ t.string "state_name"
783
+ t.integer "country_id"
784
+ t.string "zipcode"
785
+ t.string "phone"
786
+ t.boolean "active", default: true
787
+ t.boolean "backorderable_default", default: false
788
+ t.boolean "propagate_all_variants", default: true
789
+ t.string "admin_name"
756
790
  t.index ["active"], name: "index_spree_stock_locations_on_active"
757
791
  t.index ["backorderable_default"], name: "index_spree_stock_locations_on_backorderable_default"
758
792
  t.index ["country_id"], name: "index_spree_stock_locations_on_country_id"
@@ -761,73 +795,74 @@ ActiveRecord::Schema.define(version: 20180516182071) do
761
795
  end
762
796
 
763
797
  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"
798
+ t.integer "stock_item_id"
799
+ t.integer "quantity", default: 0
800
+ t.string "action"
801
+ t.datetime "created_at", null: false
802
+ t.datetime "updated_at", null: false
803
+ t.string "originator_type"
804
+ t.integer "originator_id"
805
+ t.index ["originator_id", "originator_type"], name: "index_stock_movements_on_originator_id_and_originator_type"
771
806
  t.index ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
772
807
  end
773
808
 
774
809
  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"
810
+ t.string "type"
811
+ t.string "reference"
812
+ t.integer "source_location_id"
813
+ t.integer "destination_location_id"
814
+ t.datetime "created_at", null: false
815
+ t.datetime "updated_at", null: false
816
+ t.string "number"
782
817
  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"
818
+ t.index ["number"], name: "index_spree_stock_transfers_on_number", unique: true
784
819
  t.index ["source_location_id"], name: "index_spree_stock_transfers_on_source_location_id"
785
820
  end
786
821
 
787
822
  create_table "spree_store_credit_categories", force: :cascade do |t|
788
- t.string "name"
823
+ t.string "name"
789
824
  t.datetime "created_at", null: false
790
825
  t.datetime "updated_at", null: false
791
826
  end
792
827
 
793
828
  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"
829
+ t.integer "store_credit_id", null: false
830
+ t.string "action", null: false
831
+ t.decimal "amount", precision: 8, scale: 2
832
+ t.string "authorization_code", null: false
833
+ t.decimal "user_total_amount", precision: 8, scale: 2, default: "0.0", null: false
834
+ t.integer "originator_id"
835
+ t.string "originator_type"
801
836
  t.datetime "deleted_at"
802
- t.datetime "created_at", null: false
803
- t.datetime "updated_at", null: false
837
+ t.datetime "created_at", null: false
838
+ t.datetime "updated_at", null: false
804
839
  t.index ["originator_id", "originator_type"], name: "spree_store_credit_events_originator"
805
840
  t.index ["store_credit_id"], name: "index_spree_store_credit_events_on_store_credit_id"
806
841
  end
807
842
 
808
843
  create_table "spree_store_credit_types", force: :cascade do |t|
809
- t.string "name"
810
- t.integer "priority"
844
+ t.string "name"
845
+ t.integer "priority"
811
846
  t.datetime "created_at", null: false
812
847
  t.datetime "updated_at", null: false
813
848
  t.index ["priority"], name: "index_spree_store_credit_types_on_priority"
814
849
  end
815
850
 
816
851
  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"
852
+ t.integer "user_id"
853
+ t.integer "category_id"
854
+ t.integer "created_by_id"
855
+ t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
856
+ t.decimal "amount_used", precision: 8, scale: 2, default: "0.0", null: false
857
+ t.text "memo"
823
858
  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
859
+ t.string "currency"
860
+ t.decimal "amount_authorized", precision: 8, scale: 2, default: "0.0", null: false
861
+ t.integer "originator_id"
862
+ t.string "originator_type"
863
+ t.integer "type_id"
864
+ t.datetime "created_at", null: false
865
+ t.datetime "updated_at", null: false
831
866
  t.index ["deleted_at"], name: "index_spree_store_credits_on_deleted_at"
832
867
  t.index ["originator_id", "originator_type"], name: "spree_store_credits_originator"
833
868
  t.index ["type_id"], name: "index_spree_store_credits_on_type_id"
@@ -835,29 +870,29 @@ ActiveRecord::Schema.define(version: 20180516182071) do
835
870
  end
836
871
 
837
872
  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"
873
+ t.string "name"
874
+ t.string "url"
875
+ t.text "meta_description"
876
+ t.text "meta_keywords"
877
+ t.string "seo_title"
878
+ t.string "mail_from_address"
879
+ t.string "default_currency"
880
+ t.string "code"
881
+ t.boolean "default", default: false, null: false
882
+ t.datetime "created_at", null: false
883
+ t.datetime "updated_at", null: false
884
+ t.index ["code"], name: "index_spree_stores_on_code", unique: true
850
885
  t.index ["default"], name: "index_spree_stores_on_default"
851
886
  t.index ["url"], name: "index_spree_stores_on_url"
852
887
  end
853
888
 
854
889
  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
890
+ t.integer "tag_id"
891
+ t.string "taggable_type"
892
+ t.integer "taggable_id"
893
+ t.string "tagger_type"
894
+ t.integer "tagger_id"
895
+ t.string "context", limit: 128
861
896
  t.datetime "created_at"
862
897
  t.index ["context"], name: "index_spree_taggings_on_context"
863
898
  t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "spree_taggings_idx", unique: true
@@ -870,32 +905,32 @@ ActiveRecord::Schema.define(version: 20180516182071) do
870
905
  end
871
906
 
872
907
  create_table "spree_tags", force: :cascade do |t|
873
- t.string "name"
908
+ t.string "name"
874
909
  t.integer "taggings_count", default: 0
875
910
  t.index ["name"], name: "index_spree_tags_on_name", unique: true
876
911
  end
877
912
 
878
913
  create_table "spree_tax_categories", force: :cascade do |t|
879
- t.string "name"
880
- t.string "description"
881
- t.boolean "is_default", default: false
914
+ t.string "name"
915
+ t.string "description"
916
+ t.boolean "is_default", default: false
882
917
  t.datetime "deleted_at"
883
- t.datetime "created_at", null: false
884
- t.datetime "updated_at", null: false
885
- t.string "tax_code"
918
+ t.datetime "created_at", null: false
919
+ t.datetime "updated_at", null: false
920
+ t.string "tax_code"
886
921
  t.index ["deleted_at"], name: "index_spree_tax_categories_on_deleted_at"
887
922
  t.index ["is_default"], name: "index_spree_tax_categories_on_is_default"
888
923
  end
889
924
 
890
925
  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
926
+ t.decimal "amount", precision: 8, scale: 5
927
+ t.integer "zone_id"
928
+ t.integer "tax_category_id"
929
+ t.boolean "included_in_price", default: false
930
+ t.datetime "created_at", null: false
931
+ t.datetime "updated_at", null: false
932
+ t.string "name"
933
+ t.boolean "show_rate_in_label", default: true
899
934
  t.datetime "deleted_at"
900
935
  t.index ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"
901
936
  t.index ["included_in_price"], name: "index_spree_tax_rates_on_included_in_price"
@@ -905,32 +940,32 @@ ActiveRecord::Schema.define(version: 20180516182071) do
905
940
  end
906
941
 
907
942
  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
943
+ t.string "name", null: false
944
+ t.datetime "created_at", null: false
945
+ t.datetime "updated_at", null: false
946
+ t.integer "position", default: 0
912
947
  t.index ["position"], name: "index_spree_taxonomies_on_position"
913
948
  end
914
949
 
915
950
  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"
951
+ t.integer "parent_id"
952
+ t.integer "position", default: 0
953
+ t.string "name", null: false
954
+ t.string "permalink"
955
+ t.integer "taxonomy_id"
956
+ t.integer "lft"
957
+ t.integer "rgt"
958
+ t.string "icon_file_name"
959
+ t.string "icon_content_type"
960
+ t.integer "icon_file_size"
926
961
  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"
962
+ t.text "description"
963
+ t.datetime "created_at", null: false
964
+ t.datetime "updated_at", null: false
965
+ t.string "meta_title"
966
+ t.string "meta_description"
967
+ t.string "meta_keywords"
968
+ t.integer "depth"
934
969
  t.index ["lft"], name: "index_spree_taxons_on_lft"
935
970
  t.index ["name"], name: "index_spree_taxons_on_name"
936
971
  t.index ["parent_id"], name: "index_taxons_on_parent_id"
@@ -941,57 +976,58 @@ ActiveRecord::Schema.define(version: 20180516182071) do
941
976
  end
942
977
 
943
978
  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
979
+ t.string "analytics_id"
980
+ t.boolean "active", default: true
981
+ t.datetime "created_at", null: false
982
+ t.datetime "updated_at", null: false
983
+ t.integer "engine", default: 0, null: false
948
984
  t.index ["active"], name: "index_spree_trackers_on_active"
949
985
  end
950
986
 
951
987
  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
988
+ t.string "encrypted_password", limit: 128
989
+ t.string "password_salt", limit: 128
990
+ t.string "email"
991
+ t.string "remember_token"
992
+ t.string "persistence_token"
993
+ t.string "reset_password_token"
994
+ t.string "perishable_token"
995
+ t.integer "sign_in_count", default: 0, null: false
996
+ t.integer "failed_attempts", default: 0, null: false
961
997
  t.datetime "last_request_at"
962
998
  t.datetime "current_sign_in_at"
963
999
  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"
1000
+ t.string "current_sign_in_ip"
1001
+ t.string "last_sign_in_ip"
1002
+ t.string "login"
1003
+ t.integer "ship_address_id"
1004
+ t.integer "bill_address_id"
1005
+ t.string "authentication_token"
1006
+ t.string "unlock_token"
971
1007
  t.datetime "locked_at"
972
1008
  t.datetime "remember_created_at"
973
1009
  t.datetime "reset_password_sent_at"
974
- t.datetime "created_at", null: false
975
- t.datetime "updated_at", null: false
1010
+ t.datetime "created_at", null: false
1011
+ t.datetime "updated_at", null: false
976
1012
  end
977
1013
 
978
1014
  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
1015
+ t.string "sku", default: "", null: false
1016
+ t.decimal "weight", precision: 8, scale: 2, default: "0.0"
1017
+ t.decimal "height", precision: 8, scale: 2
1018
+ t.decimal "width", precision: 8, scale: 2
1019
+ t.decimal "depth", precision: 8, scale: 2
984
1020
  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
1021
+ t.boolean "is_master", default: false
1022
+ t.integer "product_id"
1023
+ t.decimal "cost_price", precision: 10, scale: 2
1024
+ t.integer "position"
1025
+ t.string "cost_currency"
1026
+ t.boolean "track_inventory", default: true
1027
+ t.integer "tax_category_id"
1028
+ t.datetime "updated_at", null: false
993
1029
  t.datetime "discontinue_on"
994
- t.datetime "created_at", null: false
1030
+ t.datetime "created_at", null: false
995
1031
  t.index ["deleted_at"], name: "index_spree_variants_on_deleted_at"
996
1032
  t.index ["discontinue_on"], name: "index_spree_variants_on_discontinue_on"
997
1033
  t.index ["is_master"], name: "index_spree_variants_on_is_master"
@@ -1003,23 +1039,23 @@ ActiveRecord::Schema.define(version: 20180516182071) do
1003
1039
  end
1004
1040
 
1005
1041
  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
1042
+ t.string "zoneable_type"
1043
+ t.integer "zoneable_id"
1044
+ t.integer "zone_id"
1045
+ t.datetime "created_at", null: false
1046
+ t.datetime "updated_at", null: false
1011
1047
  t.index ["zone_id"], name: "index_spree_zone_members_on_zone_id"
1012
1048
  t.index ["zoneable_id", "zoneable_type"], name: "index_spree_zone_members_on_zoneable_id_and_zoneable_type"
1013
1049
  end
1014
1050
 
1015
1051
  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"
1052
+ t.string "name"
1053
+ t.string "description"
1054
+ t.boolean "default_tax", default: false
1055
+ t.integer "zone_members_count", default: 0
1056
+ t.datetime "created_at", null: false
1057
+ t.datetime "updated_at", null: false
1058
+ t.string "kind"
1023
1059
  t.index ["default_tax"], name: "index_spree_zones_on_default_tax"
1024
1060
  t.index ["kind"], name: "index_spree_zones_on_kind"
1025
1061
  end