solidus_core_devise_token_auth 2.8.0.alpha.1 → 2.8.0.alpha.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d344a81362a523cbbb2ad32d0a355fc9c36431786c5a504a54ed13b803cecbf
4
- data.tar.gz: 8eae9ddc0e163836db32d0832134123e7e50aa8f5f2aefc58225000da0b5fd7f
3
+ metadata.gz: cf8ed18c20a6146057f7fe98213dd36bce98f886f430a4ed97a5685315a6f60c
4
+ data.tar.gz: 498ad0ae3b463313771da4992807c5fcfde06f5c56b0ccc0f4e047cc18a3f7c5
5
5
  SHA512:
6
- metadata.gz: a0d40ada7fa5a027ca64eefd9244a04ccdf93b5cbb67ec66025e18160ce2ea680e4624d8ef490b5e65697489439654173e522aa3da727da9b4a2f2ed344068c9
7
- data.tar.gz: 1f3b365bfbc2e7d7db929d618e65c3c0593098ccbfff119fb2c2ef66f20005f8eca8169c244e854099e9031a3b8a1422a5e8a1814c4ec31994a9a2b7bac70205
6
+ metadata.gz: 7607089f18ebe5e74c78af5ebac40cec4046b338751ff7bb92dfaff3eff6efd8a790c49a46943e61826a0b729c107147aeefb6b1dc890169797a5b622fd708bf
7
+ data.tar.gz: 3f8bf5a4195e8c678048067e02585ebed4321cce07ffc700d523750437ab5999e6cec5b65f208efcb1c7f302587fb1d0f61625df8b8d6f5cd4374d15a72e948d
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'money'
4
+
5
+ Money.locale_backend = :i18n
@@ -824,6 +824,7 @@ en:
824
824
  adjustment_successfully_closed: Adjustment has been successfully closed!
825
825
  adjustment_successfully_opened: Adjustment has been successfully opened!
826
826
  adjustment_total: Adjustment Total
827
+ adjustment_type: Adjustment type
827
828
  adjustments: Adjustments
828
829
  admin:
829
830
  stores:
@@ -1083,6 +1084,7 @@ en:
1083
1084
  carton_orders: 'Other orders with Carton'
1084
1085
  categories: Categories
1085
1086
  category: Category
1087
+ character_limit: Limit of 255 characters
1086
1088
  charged: Charged
1087
1089
  check: Check
1088
1090
  check_stock_on_transfer: Check stock on transfer
@@ -1195,6 +1197,7 @@ en:
1195
1197
  destroy: Destroy
1196
1198
  details: Details
1197
1199
  discount_amount: Discount Amount
1200
+ discount_rules: Discount rules
1198
1201
  dismiss_banner: No. Thanks! I'm not interested, do not display this message again
1199
1202
  display: Display
1200
1203
  download_promotion_code_list: Download Code List
@@ -10,1093 +10,1107 @@ class SolidusOneFour < ActiveRecord::Migration[5.0]
10
10
  # this table should not technically exist in the database (as its provided by auth_devise),
11
11
  # but spree_api depends on it existing. This defininition comes from solidus_auth_devise's first migration,
12
12
  # and creates a table equivolent to it
13
- create_table "spree_users", force: true do |t|
14
- t.string "crypted_password", limit: 128
15
- t.string "salt", limit: 128
16
- t.string "email"
17
- t.string "remember_token"
18
- t.string "remember_token_expires_at"
19
- t.string "persistence_token"
20
- t.string "single_access_token"
21
- t.string "perishable_token"
22
- t.integer "login_count", default: 0, null: false
23
- t.integer "failed_login_count", default: 0, null: false
24
- t.datetime "last_request_at"
25
- t.datetime "current_login_at"
26
- t.datetime "last_login_at"
27
- t.string "current_login_ip"
28
- t.string "last_login_ip"
29
- t.string "login"
30
- t.integer "ship_address_id"
31
- t.integer "bill_address_id"
32
- t.datetime "created_at", null: false, precision: 6
33
- t.datetime "updated_at", null: false, precision: 6
34
- t.string "openid_identifier"
35
- end
36
-
37
- create_table "friendly_id_slugs", force: :cascade do |t|
38
- t.string "slug", null: false
39
- t.integer "sluggable_id", null: false
40
- t.string "sluggable_type", limit: 50
41
- t.string "scope"
42
- t.datetime "created_at", precision: 6
43
- t.datetime "updated_at", precision: 6
44
- t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
45
- t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
46
- t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
47
- t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
48
- end
49
-
50
- create_table "spree_addresses", force: :cascade do |t|
51
- t.string "firstname"
52
- t.string "lastname"
53
- t.string "address1"
54
- t.string "address2"
55
- t.string "city"
56
- t.string "zipcode"
57
- t.string "phone"
58
- t.string "state_name"
59
- t.string "alternative_phone"
60
- t.string "company"
61
- t.integer "state_id"
62
- t.integer "country_id"
63
- t.datetime "created_at", precision: 6
64
- t.datetime "updated_at", precision: 6
65
- t.index ["country_id"], name: "index_spree_addresses_on_country_id"
66
- t.index ["firstname"], name: "index_addresses_on_firstname"
67
- t.index ["lastname"], name: "index_addresses_on_lastname"
68
- t.index ["state_id"], name: "index_spree_addresses_on_state_id"
69
- end
70
-
71
- create_table "spree_adjustment_reasons", force: :cascade do |t|
72
- t.string "name"
73
- t.string "code"
74
- t.boolean "active", default: true
75
- t.datetime "created_at", precision: 6
76
- t.datetime "updated_at", precision: 6
77
- t.index ["active"], name: "index_spree_adjustment_reasons_on_active"
78
- t.index ["code"], name: "index_spree_adjustment_reasons_on_code"
79
- end
80
-
81
- create_table "spree_adjustments", force: :cascade do |t|
82
- t.string "source_type"
83
- t.integer "source_id"
84
- t.string "adjustable_type"
85
- t.integer "adjustable_id", null: false
86
- t.decimal "amount", precision: 10, scale: 2
87
- t.string "label"
88
- t.boolean "eligible", default: true
89
- t.datetime "created_at", precision: 6
90
- t.datetime "updated_at", precision: 6
91
- t.integer "order_id", null: false
92
- t.boolean "included", default: false
93
- t.integer "promotion_code_id"
94
- t.integer "adjustment_reason_id"
95
- t.boolean "finalized", default: false, null: false
96
- t.index ["adjustable_id", "adjustable_type"], name: "index_spree_adjustments_on_adjustable_id_and_adjustable_type"
97
- t.index ["adjustable_id"], name: "index_adjustments_on_order_id"
98
- t.index ["eligible"], name: "index_spree_adjustments_on_eligible"
99
- t.index ["order_id"], name: "index_spree_adjustments_on_order_id"
100
- t.index ["promotion_code_id"], name: "index_spree_adjustments_on_promotion_code_id"
101
- t.index ["source_id", "source_type"], name: "index_spree_adjustments_on_source_id_and_source_type"
102
- end
103
-
104
- create_table "spree_assets", force: :cascade do |t|
105
- t.string "viewable_type"
106
- t.integer "viewable_id"
107
- t.integer "attachment_width"
108
- t.integer "attachment_height"
109
- t.integer "attachment_file_size"
110
- t.integer "position"
111
- t.string "attachment_content_type"
112
- t.string "attachment_file_name"
113
- t.string "type", limit: 75
114
- t.datetime "attachment_updated_at"
115
- t.text "alt"
116
- t.datetime "created_at", precision: 6
117
- t.datetime "updated_at", precision: 6
118
- t.index ["viewable_id"], name: "index_assets_on_viewable_id"
119
- t.index ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"
120
- end
121
-
122
- create_table "spree_calculators", force: :cascade do |t|
123
- t.string "type"
124
- t.string "calculable_type"
125
- t.integer "calculable_id"
126
- t.datetime "created_at", precision: 6
127
- t.datetime "updated_at", precision: 6
128
- t.text "preferences"
129
- t.index ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"
130
- t.index ["id", "type"], name: "index_spree_calculators_on_id_and_type"
131
- end
132
-
133
- create_table "spree_cartons", force: :cascade do |t|
134
- t.string "number"
135
- t.string "external_number"
136
- t.integer "stock_location_id"
137
- t.integer "address_id"
138
- t.integer "shipping_method_id"
139
- t.string "tracking"
140
- t.datetime "shipped_at"
141
- t.datetime "created_at", precision: 6
142
- t.datetime "updated_at", precision: 6
143
- t.integer "imported_from_shipment_id"
144
- t.index ["external_number"], name: "index_spree_cartons_on_external_number"
145
- t.index ["imported_from_shipment_id"], name: "index_spree_cartons_on_imported_from_shipment_id", unique: true
146
- t.index ["number"], name: "index_spree_cartons_on_number", unique: true
147
- t.index ["stock_location_id"], name: "index_spree_cartons_on_stock_location_id"
148
- end
149
-
150
- create_table "spree_countries", force: :cascade do |t|
151
- t.string "iso_name"
152
- t.string "iso"
153
- t.string "iso3"
154
- t.string "name"
155
- t.integer "numcode"
156
- t.boolean "states_required", default: false
157
- t.datetime "updated_at", precision: 6
158
- t.datetime "created_at", precision: 6
159
- t.index ["iso"], name: "index_spree_countries_on_iso"
160
- end
161
-
162
- create_table "spree_credit_cards", force: :cascade do |t|
163
- t.string "month"
164
- t.string "year"
165
- t.string "cc_type"
166
- t.string "last_digits"
167
- t.string "gateway_customer_profile_id"
168
- t.string "gateway_payment_profile_id"
169
- t.datetime "created_at", precision: 6
170
- t.datetime "updated_at", precision: 6
171
- t.string "name"
172
- t.integer "user_id"
173
- t.integer "payment_method_id"
174
- t.boolean "default", default: false, null: false
175
- t.integer "address_id"
176
- t.index ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"
177
- t.index ["user_id"], name: "index_spree_credit_cards_on_user_id"
178
- end
179
-
180
- create_table "spree_customer_returns", force: :cascade do |t|
181
- t.string "number"
182
- t.integer "stock_location_id"
183
- t.datetime "created_at", precision: 6
184
- t.datetime "updated_at", precision: 6
185
- end
186
-
187
- create_table "spree_inventory_units", force: :cascade do |t|
188
- t.string "state"
189
- t.integer "variant_id"
190
- t.integer "order_id"
191
- t.integer "shipment_id"
192
- t.datetime "created_at", precision: 6
193
- t.datetime "updated_at", precision: 6
194
- t.boolean "pending", default: true
195
- t.integer "line_item_id"
196
- t.integer "carton_id"
197
- t.index ["carton_id"], name: "index_spree_inventory_units_on_carton_id"
198
- t.index ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"
199
- t.index ["order_id"], name: "index_inventory_units_on_order_id"
200
- t.index ["shipment_id"], name: "index_inventory_units_on_shipment_id"
201
- t.index ["variant_id"], name: "index_inventory_units_on_variant_id"
202
- end
203
-
204
- create_table "spree_line_item_actions", force: :cascade do |t|
205
- t.integer "line_item_id", null: false
206
- t.integer "action_id", null: false
207
- t.integer "quantity", default: 0
208
- t.datetime "created_at", precision: 6
209
- t.datetime "updated_at", precision: 6
210
- t.index ["action_id"], name: "index_spree_line_item_actions_on_action_id"
211
- t.index ["line_item_id"], name: "index_spree_line_item_actions_on_line_item_id"
212
- end
213
-
214
- create_table "spree_line_items", force: :cascade do |t|
215
- t.integer "variant_id"
216
- t.integer "order_id"
217
- t.integer "quantity", null: false
218
- t.decimal "price", precision: 10, scale: 2, null: false
219
- t.datetime "created_at", precision: 6
220
- t.datetime "updated_at", precision: 6
221
- t.string "currency"
222
- t.decimal "cost_price", precision: 10, scale: 2
223
- t.integer "tax_category_id"
224
- t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
225
- t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
226
- t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
227
- t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
228
- t.index ["order_id"], name: "index_spree_line_items_on_order_id"
229
- t.index ["variant_id"], name: "index_spree_line_items_on_variant_id"
230
- end
231
-
232
- create_table "spree_log_entries", force: :cascade do |t|
233
- t.string "source_type"
234
- t.integer "source_id"
235
- t.text "details"
236
- t.datetime "created_at", precision: 6
237
- t.datetime "updated_at", precision: 6
238
- t.index ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"
239
- end
240
-
241
- create_table "spree_option_type_prototypes", force: :cascade do |t|
242
- t.integer "prototype_id"
243
- t.integer "option_type_id"
244
- t.datetime "created_at", precision: 6
245
- t.datetime "updated_at", precision: 6
246
- end
247
-
248
- create_table "spree_option_types", force: :cascade do |t|
249
- t.string "name", limit: 100
250
- t.string "presentation", limit: 100
251
- t.integer "position", default: 0, null: false
252
- t.datetime "created_at", precision: 6
253
- t.datetime "updated_at", precision: 6
254
- t.index ["position"], name: "index_spree_option_types_on_position"
255
- end
256
-
257
- create_table "spree_option_values", force: :cascade do |t|
258
- t.integer "position"
259
- t.string "name"
260
- t.string "presentation"
261
- t.integer "option_type_id"
262
- t.datetime "created_at", precision: 6
263
- t.datetime "updated_at", precision: 6
264
- t.index ["option_type_id"], name: "index_spree_option_values_on_option_type_id"
265
- t.index ["position"], name: "index_spree_option_values_on_position"
266
- end
267
-
268
- create_table "spree_option_values_variants", force: :cascade do |t|
269
- t.integer "variant_id"
270
- t.integer "option_value_id"
271
- t.datetime "created_at", precision: 6
272
- t.datetime "updated_at", precision: 6
273
- t.index ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id"
274
- t.index ["variant_id"], name: "index_spree_option_values_variants_on_variant_id"
275
- end
276
-
277
- create_table "spree_order_mutexes", force: :cascade do |t|
278
- t.integer "order_id", null: false
279
- t.datetime "created_at", precision: 6
280
- t.index ["order_id"], name: "index_spree_order_mutexes_on_order_id", unique: true
281
- end
282
-
283
- create_table "spree_orders", force: :cascade do |t|
284
- t.string "number", limit: 32
285
- t.decimal "item_total", precision: 10, scale: 2, default: "0.0", null: false
286
- t.decimal "total", precision: 10, scale: 2, default: "0.0", null: false
287
- t.string "state"
288
- t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
289
- t.integer "user_id"
290
- t.datetime "completed_at"
291
- t.integer "bill_address_id"
292
- t.integer "ship_address_id"
293
- t.decimal "payment_total", precision: 10, scale: 2, default: "0.0"
294
- t.string "shipment_state"
295
- t.string "payment_state"
296
- t.string "email"
297
- t.text "special_instructions"
298
- t.datetime "created_at", precision: 6
299
- t.datetime "updated_at", precision: 6
300
- t.string "currency"
301
- t.string "last_ip_address"
302
- t.integer "created_by_id"
303
- t.decimal "shipment_total", precision: 10, scale: 2, default: "0.0", null: false
304
- t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
305
- t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
306
- t.string "channel", default: "spree"
307
- t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
308
- t.integer "item_count", default: 0
309
- t.integer "approver_id"
310
- t.datetime "approved_at"
311
- t.boolean "confirmation_delivered", default: false
312
- t.string "guest_token"
313
- t.datetime "canceled_at"
314
- t.integer "canceler_id"
315
- t.integer "store_id"
316
- t.string "approver_name"
317
- t.boolean "frontend_viewable", default: true, null: false
318
- t.index ["approver_id"], name: "index_spree_orders_on_approver_id"
319
- t.index ["bill_address_id"], name: "index_spree_orders_on_bill_address_id"
320
- t.index ["completed_at"], name: "index_spree_orders_on_completed_at"
321
- t.index ["created_by_id"], name: "index_spree_orders_on_created_by_id"
322
- t.index ["guest_token"], name: "index_spree_orders_on_guest_token"
323
- t.index ["number"], name: "index_spree_orders_on_number"
324
- t.index ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"
325
- t.index ["user_id", "created_by_id"], name: "index_spree_orders_on_user_id_and_created_by_id"
326
- t.index ["user_id"], name: "index_spree_orders_on_user_id"
327
- end
328
-
329
- create_table "spree_orders_promotions", force: :cascade do |t|
330
- t.integer "order_id"
331
- t.integer "promotion_id"
332
- t.integer "promotion_code_id"
333
- t.datetime "created_at", precision: 6
334
- t.datetime "updated_at", precision: 6
335
- t.index ["order_id", "promotion_id"], name: "index_spree_orders_promotions_on_order_id_and_promotion_id"
336
- t.index ["promotion_code_id"], name: "index_spree_orders_promotions_on_promotion_code_id"
337
- end
338
-
339
- create_table "spree_payment_capture_events", force: :cascade do |t|
340
- t.decimal "amount", precision: 10, scale: 2, default: "0.0"
341
- t.integer "payment_id"
342
- t.datetime "created_at", precision: 6
343
- t.datetime "updated_at", precision: 6
344
- t.index ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"
345
- end
346
-
347
- create_table "spree_payment_methods", force: :cascade do |t|
348
- t.string "type"
349
- t.string "name"
350
- t.text "description"
351
- t.boolean "active", default: true
352
- t.datetime "deleted_at"
353
- t.datetime "created_at", precision: 6
354
- t.datetime "updated_at", precision: 6
355
- t.string "display_on"
356
- t.boolean "auto_capture"
357
- t.text "preferences"
358
- t.string "preference_source"
359
- t.integer "position", default: 0
360
- t.index ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"
361
- end
362
-
363
- create_table "spree_payments", force: :cascade do |t|
364
- t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
365
- t.integer "order_id"
366
- t.string "source_type"
367
- t.integer "source_id"
368
- t.integer "payment_method_id"
369
- t.string "state"
370
- t.string "response_code"
371
- t.string "avs_response"
372
- t.datetime "created_at", precision: 6
373
- t.datetime "updated_at", precision: 6
374
- t.string "number"
375
- t.string "cvv_response_code"
376
- t.string "cvv_response_message"
377
- t.index ["order_id"], name: "index_spree_payments_on_order_id"
378
- t.index ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"
379
- t.index ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"
380
- end
381
-
382
- create_table "spree_preferences", force: :cascade do |t|
383
- t.text "value"
384
- t.string "key"
385
- t.datetime "created_at", precision: 6
386
- t.datetime "updated_at", precision: 6
387
- t.index ["key"], name: "index_spree_preferences_on_key", unique: true
388
- end
389
-
390
- create_table "spree_prices", force: :cascade do |t|
391
- t.integer "variant_id", null: false
392
- t.decimal "amount", precision: 10, scale: 2
393
- t.string "currency"
394
- t.datetime "deleted_at"
395
- t.boolean "is_default", default: true, null: false
396
- t.datetime "created_at", precision: 6
397
- t.datetime "updated_at", precision: 6
398
- t.string "country_iso", limit: 2
399
- t.index ["country_iso"], name: "index_spree_prices_on_country_iso"
400
- t.index ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
401
- end
402
-
403
- create_table "spree_product_option_types", force: :cascade do |t|
404
- t.integer "position"
405
- t.integer "product_id"
406
- t.integer "option_type_id"
407
- t.datetime "created_at", precision: 6
408
- t.datetime "updated_at", precision: 6
409
- t.index ["option_type_id"], name: "index_spree_product_option_types_on_option_type_id"
410
- t.index ["position"], name: "index_spree_product_option_types_on_position"
411
- t.index ["product_id"], name: "index_spree_product_option_types_on_product_id"
412
- end
413
-
414
- create_table "spree_product_promotion_rules", force: :cascade do |t|
415
- t.integer "product_id"
416
- t.integer "promotion_rule_id"
417
- t.datetime "created_at", precision: 6
418
- t.datetime "updated_at", precision: 6
419
- t.index ["product_id"], name: "index_products_promotion_rules_on_product_id"
420
- t.index ["promotion_rule_id"], name: "index_products_promotion_rules_on_promotion_rule_id"
421
- end
422
-
423
- create_table "spree_product_properties", force: :cascade do |t|
424
- t.string "value"
425
- t.integer "product_id"
426
- t.integer "property_id"
427
- t.datetime "created_at", precision: 6
428
- t.datetime "updated_at", precision: 6
429
- t.integer "position", default: 0
430
- t.index ["position"], name: "index_spree_product_properties_on_position"
431
- t.index ["product_id"], name: "index_product_properties_on_product_id"
432
- t.index ["property_id"], name: "index_spree_product_properties_on_property_id"
433
- end
434
-
435
- create_table "spree_products", force: :cascade do |t|
436
- t.string "name", default: "", null: false
437
- t.text "description"
438
- t.datetime "available_on"
439
- t.datetime "deleted_at"
440
- t.string "slug"
441
- t.text "meta_description"
442
- t.string "meta_keywords"
443
- t.integer "tax_category_id"
444
- t.integer "shipping_category_id"
445
- t.datetime "created_at", precision: 6
446
- t.datetime "updated_at", precision: 6
447
- t.boolean "promotionable", default: true
448
- t.string "meta_title"
449
- t.index ["available_on"], name: "index_spree_products_on_available_on"
450
- t.index ["deleted_at"], name: "index_spree_products_on_deleted_at"
451
- t.index ["name"], name: "index_spree_products_on_name"
452
- t.index ["slug"], name: "index_spree_products_on_slug", unique: true
453
- end
454
-
455
- create_table "spree_products_taxons", force: :cascade do |t|
456
- t.integer "product_id"
457
- t.integer "taxon_id"
458
- t.integer "position"
459
- t.datetime "created_at", precision: 6
460
- t.datetime "updated_at", precision: 6
461
- t.index ["position"], name: "index_spree_products_taxons_on_position"
462
- t.index ["product_id"], name: "index_spree_products_taxons_on_product_id"
463
- t.index ["taxon_id"], name: "index_spree_products_taxons_on_taxon_id"
464
- end
465
-
466
- create_table "spree_promotion_action_line_items", force: :cascade do |t|
467
- t.integer "promotion_action_id"
468
- t.integer "variant_id"
469
- t.integer "quantity", default: 1
470
- t.datetime "created_at", precision: 6
471
- t.datetime "updated_at", precision: 6
472
- t.index ["promotion_action_id"], name: "index_spree_promotion_action_line_items_on_promotion_action_id"
473
- t.index ["variant_id"], name: "index_spree_promotion_action_line_items_on_variant_id"
474
- end
475
-
476
- create_table "spree_promotion_actions", force: :cascade do |t|
477
- t.integer "promotion_id"
478
- t.integer "position"
479
- t.string "type"
480
- t.datetime "deleted_at"
481
- t.text "preferences"
482
- t.datetime "created_at", precision: 6
483
- t.datetime "updated_at", precision: 6
484
- t.index ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"
485
- t.index ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"
486
- t.index ["promotion_id"], name: "index_spree_promotion_actions_on_promotion_id"
487
- end
488
-
489
- create_table "spree_promotion_categories", force: :cascade do |t|
490
- t.string "name"
491
- t.datetime "created_at", precision: 6
492
- t.datetime "updated_at", precision: 6
493
- t.string "code"
494
- end
495
-
496
- create_table "spree_promotion_codes", force: :cascade do |t|
497
- t.integer "promotion_id", null: false
498
- t.string "value", null: false
499
- t.datetime "created_at", precision: 6
500
- t.datetime "updated_at", precision: 6
501
- t.index ["promotion_id"], name: "index_spree_promotion_codes_on_promotion_id"
502
- t.index ["value"], name: "index_spree_promotion_codes_on_value", unique: true
503
- end
504
-
505
- create_table "spree_promotion_rule_taxons", force: :cascade do |t|
506
- t.integer "taxon_id"
507
- t.integer "promotion_rule_id"
508
- t.datetime "created_at", precision: 6
509
- t.datetime "updated_at", precision: 6
510
- t.index ["promotion_rule_id"], name: "index_spree_promotion_rule_taxons_on_promotion_rule_id"
511
- t.index ["taxon_id"], name: "index_spree_promotion_rule_taxons_on_taxon_id"
512
- end
513
-
514
- create_table "spree_promotion_rules", force: :cascade do |t|
515
- t.integer "promotion_id"
516
- t.integer "product_group_id"
517
- t.string "type"
518
- t.datetime "created_at", precision: 6
519
- t.datetime "updated_at", precision: 6
520
- t.string "code"
521
- t.text "preferences"
522
- t.index ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
523
- t.index ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"
524
- end
525
-
526
- create_table "spree_promotion_rules_users", force: :cascade do |t|
527
- t.integer "user_id"
528
- t.integer "promotion_rule_id"
529
- t.datetime "created_at", precision: 6
530
- t.datetime "updated_at", precision: 6
531
- t.index ["promotion_rule_id"], name: "index_promotion_rules_users_on_promotion_rule_id"
532
- t.index ["user_id"], name: "index_promotion_rules_users_on_user_id"
533
- end
534
-
535
- create_table "spree_promotions", force: :cascade do |t|
536
- t.string "description"
537
- t.datetime "expires_at"
538
- t.datetime "starts_at"
539
- t.string "name"
540
- t.string "type"
541
- t.integer "usage_limit"
542
- t.string "match_policy", default: "all"
543
- t.string "code"
544
- t.boolean "advertise", default: false
545
- t.string "path"
546
- t.datetime "created_at", precision: 6
547
- t.datetime "updated_at", precision: 6
548
- t.integer "promotion_category_id"
549
- t.integer "per_code_usage_limit"
550
- t.boolean "apply_automatically", default: false
551
- t.index ["advertise"], name: "index_spree_promotions_on_advertise"
552
- t.index ["apply_automatically"], name: "index_spree_promotions_on_apply_automatically"
553
- t.index ["code"], name: "index_spree_promotions_on_code"
554
- t.index ["expires_at"], name: "index_spree_promotions_on_expires_at"
555
- t.index ["id", "type"], name: "index_spree_promotions_on_id_and_type"
556
- t.index ["promotion_category_id"], name: "index_spree_promotions_on_promotion_category_id"
557
- t.index ["starts_at"], name: "index_spree_promotions_on_starts_at"
558
- end
559
-
560
- create_table "spree_properties", force: :cascade do |t|
561
- t.string "name"
562
- t.string "presentation", null: false
563
- t.datetime "created_at", precision: 6
564
- t.datetime "updated_at", precision: 6
565
- end
566
-
567
- create_table "spree_property_prototypes", force: :cascade do |t|
568
- t.integer "prototype_id"
569
- t.integer "property_id"
570
- t.datetime "created_at", precision: 6
571
- t.datetime "updated_at", precision: 6
572
- end
573
-
574
- create_table "spree_prototype_taxons", force: :cascade do |t|
575
- t.integer "taxon_id"
576
- t.integer "prototype_id"
577
- t.datetime "created_at", precision: 6
578
- t.datetime "updated_at", precision: 6
579
- t.index ["prototype_id"], name: "index_spree_prototype_taxons_on_prototype_id"
580
- t.index ["taxon_id"], name: "index_spree_prototype_taxons_on_taxon_id"
581
- end
582
-
583
- create_table "spree_prototypes", force: :cascade do |t|
584
- t.string "name"
585
- t.datetime "created_at", precision: 6
586
- t.datetime "updated_at", precision: 6
587
- end
588
-
589
- create_table "spree_refund_reasons", force: :cascade do |t|
590
- t.string "name"
591
- t.boolean "active", default: true
592
- t.boolean "mutable", default: true
593
- t.datetime "created_at", precision: 6
594
- t.datetime "updated_at", precision: 6
595
- t.string "code"
596
- end
597
-
598
- create_table "spree_refunds", force: :cascade do |t|
599
- t.integer "payment_id"
600
- t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
601
- t.string "transaction_id"
602
- t.datetime "created_at", precision: 6
603
- t.datetime "updated_at", precision: 6
604
- t.integer "refund_reason_id"
605
- t.integer "reimbursement_id"
606
- t.index ["payment_id"], name: "index_spree_refunds_on_payment_id"
607
- t.index ["refund_reason_id"], name: "index_refunds_on_refund_reason_id"
608
- t.index ["reimbursement_id"], name: "index_spree_refunds_on_reimbursement_id"
609
- end
610
-
611
- create_table "spree_reimbursement_credits", force: :cascade do |t|
612
- t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
613
- t.integer "reimbursement_id"
614
- t.integer "creditable_id"
615
- t.string "creditable_type"
616
- t.datetime "created_at", precision: 6
617
- t.datetime "updated_at", precision: 6
618
- end
619
-
620
- create_table "spree_reimbursement_types", force: :cascade do |t|
621
- t.string "name"
622
- t.boolean "active", default: true
623
- t.boolean "mutable", default: true
624
- t.datetime "created_at", precision: 6
625
- t.datetime "updated_at", precision: 6
626
- t.string "type"
627
- t.index ["type"], name: "index_spree_reimbursement_types_on_type"
628
- end
629
-
630
- create_table "spree_reimbursements", force: :cascade do |t|
631
- t.string "number"
632
- t.string "reimbursement_status"
633
- t.integer "customer_return_id"
634
- t.integer "order_id"
635
- t.decimal "total", precision: 10, scale: 2
636
- t.datetime "created_at", precision: 6
637
- t.datetime "updated_at", precision: 6
638
- t.index ["customer_return_id"], name: "index_spree_reimbursements_on_customer_return_id"
639
- t.index ["order_id"], name: "index_spree_reimbursements_on_order_id"
640
- end
641
-
642
- create_table "spree_return_authorizations", force: :cascade do |t|
643
- t.string "number"
644
- t.string "state"
645
- t.integer "order_id"
646
- t.text "memo"
647
- t.datetime "created_at", precision: 6
648
- t.datetime "updated_at", precision: 6
649
- t.integer "stock_location_id"
650
- t.integer "return_reason_id"
651
- t.index ["return_reason_id"], name: "index_return_authorizations_on_return_authorization_reason_id"
652
- end
653
-
654
- create_table "spree_return_items", force: :cascade do |t|
655
- t.integer "return_authorization_id"
656
- t.integer "inventory_unit_id"
657
- t.integer "exchange_variant_id"
658
- t.datetime "created_at", precision: 6
659
- t.datetime "updated_at", precision: 6
660
- t.decimal "amount", precision: 12, scale: 4, default: "0.0", null: false
661
- t.decimal "included_tax_total", precision: 12, scale: 4, default: "0.0", null: false
662
- t.decimal "additional_tax_total", precision: 12, scale: 4, default: "0.0", null: false
663
- t.string "reception_status"
664
- t.string "acceptance_status"
665
- t.integer "customer_return_id"
666
- t.integer "reimbursement_id"
667
- t.integer "exchange_inventory_unit_id"
668
- t.text "acceptance_status_errors"
669
- t.integer "preferred_reimbursement_type_id"
670
- t.integer "override_reimbursement_type_id"
671
- t.boolean "resellable", default: true, null: false
672
- t.integer "return_reason_id"
673
- t.index ["customer_return_id"], name: "index_return_items_on_customer_return_id"
674
- t.index ["exchange_inventory_unit_id"], name: "index_spree_return_items_on_exchange_inventory_unit_id"
675
- end
676
-
677
- create_table "spree_return_reasons", force: :cascade do |t|
678
- t.string "name"
679
- t.boolean "active", default: true
680
- t.boolean "mutable", default: true
681
- t.datetime "created_at", precision: 6
682
- t.datetime "updated_at", precision: 6
683
- end
684
-
685
- create_table "spree_roles", force: :cascade do |t|
686
- t.string "name"
687
- t.datetime "created_at", precision: 6
688
- t.datetime "updated_at", precision: 6
689
- end
690
-
691
- create_table "spree_roles_users", force: :cascade do |t|
692
- t.integer "role_id"
693
- t.integer "user_id"
694
- t.datetime "created_at", precision: 6
695
- t.datetime "updated_at", precision: 6
696
- t.index ["role_id"], name: "index_spree_roles_users_on_role_id"
697
- t.index ["user_id"], name: "index_spree_roles_users_on_user_id"
698
- end
699
-
700
- create_table "spree_shipments", force: :cascade do |t|
701
- t.string "tracking"
702
- t.string "number"
703
- t.decimal "cost", precision: 10, scale: 2, default: "0.0"
704
- t.datetime "shipped_at"
705
- t.integer "order_id"
706
- t.integer "deprecated_address_id"
707
- t.string "state"
708
- t.datetime "created_at", precision: 6
709
- t.datetime "updated_at", precision: 6
710
- t.integer "stock_location_id"
711
- t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
712
- t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
713
- t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
714
- t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
715
- t.index ["deprecated_address_id"], name: "index_spree_shipments_on_deprecated_address_id"
716
- t.index ["number"], name: "index_shipments_on_number"
717
- t.index ["order_id"], name: "index_spree_shipments_on_order_id"
718
- t.index ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"
719
- end
720
-
721
- create_table "spree_shipping_categories", force: :cascade do |t|
722
- t.string "name"
723
- t.datetime "created_at", precision: 6
724
- t.datetime "updated_at", precision: 6
725
- end
726
-
727
- create_table "spree_shipping_method_categories", force: :cascade do |t|
728
- t.integer "shipping_method_id", null: false
729
- t.integer "shipping_category_id", null: false
730
- t.datetime "created_at", precision: 6
731
- t.datetime "updated_at", precision: 6
732
- t.index ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
733
- t.index ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
734
- end
735
-
736
- create_table "spree_shipping_method_stock_locations", force: :cascade do |t|
737
- t.integer "shipping_method_id"
738
- t.integer "stock_location_id"
739
- t.datetime "created_at", precision: 6
740
- t.datetime "updated_at", precision: 6
741
- t.index ["shipping_method_id"], name: "shipping_method_id_spree_sm_sl"
742
- t.index ["stock_location_id"], name: "sstock_location_id_spree_sm_sl"
743
- end
744
-
745
- create_table "spree_shipping_method_zones", force: :cascade do |t|
746
- t.integer "shipping_method_id"
747
- t.integer "zone_id"
748
- t.datetime "created_at", precision: 6
749
- t.datetime "updated_at", precision: 6
750
- end
751
-
752
- create_table "spree_shipping_methods", force: :cascade do |t|
753
- t.string "name"
754
- t.string "display_on"
755
- t.datetime "deleted_at"
756
- t.datetime "created_at", precision: 6
757
- t.datetime "updated_at", precision: 6
758
- t.string "tracking_url"
759
- t.string "admin_name"
760
- t.integer "tax_category_id"
761
- t.string "code"
762
- t.boolean "available_to_all", default: true
763
- t.string "carrier"
764
- t.string "service_level"
765
- t.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"
766
- end
767
-
768
- create_table "spree_shipping_rate_taxes", force: :cascade do |t|
769
- t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
770
- t.integer "tax_rate_id"
771
- t.integer "shipping_rate_id"
772
- t.datetime "created_at", null: false, precision: 6
773
- t.datetime "updated_at", null: false, precision: 6
774
- t.index ["shipping_rate_id"], name: "index_spree_shipping_rate_taxes_on_shipping_rate_id"
775
- t.index ["tax_rate_id"], name: "index_spree_shipping_rate_taxes_on_tax_rate_id"
776
- end
777
-
778
- create_table "spree_shipping_rates", force: :cascade do |t|
779
- t.integer "shipment_id"
780
- t.integer "shipping_method_id"
781
- t.boolean "selected", default: false
782
- t.decimal "cost", precision: 8, scale: 2, default: "0.0"
783
- t.datetime "created_at", precision: 6
784
- t.datetime "updated_at", precision: 6
785
- t.integer "tax_rate_id"
786
- t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
787
- end
788
-
789
- create_table "spree_state_changes", force: :cascade do |t|
790
- t.string "name"
791
- t.string "previous_state"
792
- t.integer "stateful_id"
793
- t.integer "user_id"
794
- t.string "stateful_type"
795
- t.string "next_state"
796
- t.datetime "created_at", precision: 6
797
- t.datetime "updated_at", precision: 6
798
- t.index ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"
799
- t.index ["user_id"], name: "index_spree_state_changes_on_user_id"
800
- end
801
-
802
- create_table "spree_states", force: :cascade do |t|
803
- t.string "name"
804
- t.string "abbr"
805
- t.integer "country_id"
806
- t.datetime "updated_at", precision: 6
807
- t.datetime "created_at", precision: 6
808
- t.index ["country_id"], name: "index_spree_states_on_country_id"
809
- end
810
-
811
- create_table "spree_stock_items", force: :cascade do |t|
812
- t.integer "stock_location_id"
813
- t.integer "variant_id"
814
- t.integer "count_on_hand", default: 0, null: false
815
- t.datetime "created_at", precision: 6
816
- t.datetime "updated_at", precision: 6
817
- t.boolean "backorderable", default: false
818
- t.datetime "deleted_at"
819
- t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
820
- t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
821
- t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
13
+ create_table 'spree_users', force: true do |t|
14
+ t.string 'email', null: false
15
+ t.string 'provider', null: false, default: 'email'
16
+ t.string 'uid', null: false, default: ''
17
+ t.string 'encrypted_password', null: false, default: ''
18
+ t.string 'reset_password_token'
19
+ t.datetime 'reset_password_sent_at'
20
+ t.boolean 'allow_password_change', default: false
21
+ t.datetime 'remember_created_at'
22
+ t.integer 'sign_in_count', null: false, default: 0
23
+ t.datetime 'current_sign_in_at'
24
+ t.datetime 'last_sign_in_at'
25
+ t.string 'current_sign_in_ip'
26
+ t.string 'last_sign_in_ip'
27
+ t.text 'tokens'
28
+ t.string 'remember_token'
29
+ t.string 'remember_token_expires_at'
30
+ t.string 'persistence_token'
31
+ t.string 'single_access_token'
32
+ t.string 'perishable_token'
33
+ t.integer 'login_count', default: 0, null: false
34
+ t.integer 'failed_login_count', default: 0, null: false
35
+ t.datetime 'last_request_at'
36
+ t.datetime 'current_login_at'
37
+ t.datetime 'last_login_at'
38
+ t.string 'current_login_ip'
39
+ t.string 'last_login_ip'
40
+ t.string 'login'
41
+ t.integer 'ship_address_id'
42
+ t.integer 'bill_address_id'
43
+ t.datetime 'created_at', null: false, precision: 6
44
+ t.datetime 'updated_at', null: false, precision: 6
45
+ t.string 'openid_identifier'
46
+
47
+ t.index %i(uid provider), unique: true
48
+ t.index :reset_password_token, unique: true
49
+ end
50
+
51
+ create_table 'friendly_id_slugs', force: :cascade do |t|
52
+ t.string 'slug', null: false
53
+ t.integer 'sluggable_id', null: false
54
+ t.string 'sluggable_type', limit: 50
55
+ t.string 'scope'
56
+ t.datetime 'created_at', precision: 6
57
+ t.datetime 'updated_at', precision: 6
58
+ t.index ['slug', 'sluggable_type', 'scope'], name: 'index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope', unique: true
59
+ t.index ['slug', 'sluggable_type'], name: 'index_friendly_id_slugs_on_slug_and_sluggable_type'
60
+ t.index ['sluggable_id'], name: 'index_friendly_id_slugs_on_sluggable_id'
61
+ t.index ['sluggable_type'], name: 'index_friendly_id_slugs_on_sluggable_type'
62
+ end
63
+
64
+ create_table 'spree_addresses', force: :cascade do |t|
65
+ t.string 'firstname'
66
+ t.string 'lastname'
67
+ t.string 'address1'
68
+ t.string 'address2'
69
+ t.string 'city'
70
+ t.string 'zipcode'
71
+ t.string 'phone'
72
+ t.string 'state_name'
73
+ t.string 'alternative_phone'
74
+ t.string 'company'
75
+ t.integer 'state_id'
76
+ t.integer 'country_id'
77
+ t.datetime 'created_at', precision: 6
78
+ t.datetime 'updated_at', precision: 6
79
+ t.index ['country_id'], name: 'index_spree_addresses_on_country_id'
80
+ t.index ['firstname'], name: 'index_addresses_on_firstname'
81
+ t.index ['lastname'], name: 'index_addresses_on_lastname'
82
+ t.index ['state_id'], name: 'index_spree_addresses_on_state_id'
83
+ end
84
+
85
+ create_table 'spree_adjustment_reasons', force: :cascade do |t|
86
+ t.string 'name'
87
+ t.string 'code'
88
+ t.boolean 'active', default: true
89
+ t.datetime 'created_at', precision: 6
90
+ t.datetime 'updated_at', precision: 6
91
+ t.index ['active'], name: 'index_spree_adjustment_reasons_on_active'
92
+ t.index ['code'], name: 'index_spree_adjustment_reasons_on_code'
93
+ end
94
+
95
+ create_table 'spree_adjustments', force: :cascade do |t|
96
+ t.string 'source_type'
97
+ t.integer 'source_id'
98
+ t.string 'adjustable_type'
99
+ t.integer 'adjustable_id', null: false
100
+ t.decimal 'amount', precision: 10, scale: 2
101
+ t.string 'label'
102
+ t.boolean 'eligible', default: true
103
+ t.datetime 'created_at', precision: 6
104
+ t.datetime 'updated_at', precision: 6
105
+ t.integer 'order_id', null: false
106
+ t.boolean 'included', default: false
107
+ t.integer 'promotion_code_id'
108
+ t.integer 'adjustment_reason_id'
109
+ t.boolean 'finalized', default: false, null: false
110
+ t.index ['adjustable_id', 'adjustable_type'], name: 'index_spree_adjustments_on_adjustable_id_and_adjustable_type'
111
+ t.index ['adjustable_id'], name: 'index_adjustments_on_order_id'
112
+ t.index ['eligible'], name: 'index_spree_adjustments_on_eligible'
113
+ t.index ['order_id'], name: 'index_spree_adjustments_on_order_id'
114
+ t.index ['promotion_code_id'], name: 'index_spree_adjustments_on_promotion_code_id'
115
+ t.index ['source_id', 'source_type'], name: 'index_spree_adjustments_on_source_id_and_source_type'
116
+ end
117
+
118
+ create_table 'spree_assets', force: :cascade do |t|
119
+ t.string 'viewable_type'
120
+ t.integer 'viewable_id'
121
+ t.integer 'attachment_width'
122
+ t.integer 'attachment_height'
123
+ t.integer 'attachment_file_size'
124
+ t.integer 'position'
125
+ t.string 'attachment_content_type'
126
+ t.string 'attachment_file_name'
127
+ t.string 'type', limit: 75
128
+ t.datetime 'attachment_updated_at'
129
+ t.text 'alt'
130
+ t.datetime 'created_at', precision: 6
131
+ t.datetime 'updated_at', precision: 6
132
+ t.index ['viewable_id'], name: 'index_assets_on_viewable_id'
133
+ t.index ['viewable_type', 'type'], name: 'index_assets_on_viewable_type_and_type'
134
+ end
135
+
136
+ create_table 'spree_calculators', force: :cascade do |t|
137
+ t.string 'type'
138
+ t.string 'calculable_type'
139
+ t.integer 'calculable_id'
140
+ t.datetime 'created_at', precision: 6
141
+ t.datetime 'updated_at', precision: 6
142
+ t.text 'preferences'
143
+ t.index ['calculable_id', 'calculable_type'], name: 'index_spree_calculators_on_calculable_id_and_calculable_type'
144
+ t.index ['id', 'type'], name: 'index_spree_calculators_on_id_and_type'
145
+ end
146
+
147
+ create_table 'spree_cartons', force: :cascade do |t|
148
+ t.string 'number'
149
+ t.string 'external_number'
150
+ t.integer 'stock_location_id'
151
+ t.integer 'address_id'
152
+ t.integer 'shipping_method_id'
153
+ t.string 'tracking'
154
+ t.datetime 'shipped_at'
155
+ t.datetime 'created_at', precision: 6
156
+ t.datetime 'updated_at', precision: 6
157
+ t.integer 'imported_from_shipment_id'
158
+ t.index ['external_number'], name: 'index_spree_cartons_on_external_number'
159
+ t.index ['imported_from_shipment_id'], name: 'index_spree_cartons_on_imported_from_shipment_id', unique: true
160
+ t.index ['number'], name: 'index_spree_cartons_on_number', unique: true
161
+ t.index ['stock_location_id'], name: 'index_spree_cartons_on_stock_location_id'
162
+ end
163
+
164
+ create_table 'spree_countries', force: :cascade do |t|
165
+ t.string 'iso_name'
166
+ t.string 'iso'
167
+ t.string 'iso3'
168
+ t.string 'name'
169
+ t.integer 'numcode'
170
+ t.boolean 'states_required', default: false
171
+ t.datetime 'updated_at', precision: 6
172
+ t.datetime 'created_at', precision: 6
173
+ t.index ['iso'], name: 'index_spree_countries_on_iso'
174
+ end
175
+
176
+ create_table 'spree_credit_cards', force: :cascade do |t|
177
+ t.string 'month'
178
+ t.string 'year'
179
+ t.string 'cc_type'
180
+ t.string 'last_digits'
181
+ t.string 'gateway_customer_profile_id'
182
+ t.string 'gateway_payment_profile_id'
183
+ t.datetime 'created_at', precision: 6
184
+ t.datetime 'updated_at', precision: 6
185
+ t.string 'name'
186
+ t.integer 'user_id'
187
+ t.integer 'payment_method_id'
188
+ t.boolean 'default', default: false, null: false
189
+ t.integer 'address_id'
190
+ t.index ['payment_method_id'], name: 'index_spree_credit_cards_on_payment_method_id'
191
+ t.index ['user_id'], name: 'index_spree_credit_cards_on_user_id'
192
+ end
193
+
194
+ create_table 'spree_customer_returns', force: :cascade do |t|
195
+ t.string 'number'
196
+ t.integer 'stock_location_id'
197
+ t.datetime 'created_at', precision: 6
198
+ t.datetime 'updated_at', precision: 6
199
+ end
200
+
201
+ create_table 'spree_inventory_units', force: :cascade do |t|
202
+ t.string 'state'
203
+ t.integer 'variant_id'
204
+ t.integer 'order_id'
205
+ t.integer 'shipment_id'
206
+ t.datetime 'created_at', precision: 6
207
+ t.datetime 'updated_at', precision: 6
208
+ t.boolean 'pending', default: true
209
+ t.integer 'line_item_id'
210
+ t.integer 'carton_id'
211
+ t.index ['carton_id'], name: 'index_spree_inventory_units_on_carton_id'
212
+ t.index ['line_item_id'], name: 'index_spree_inventory_units_on_line_item_id'
213
+ t.index ['order_id'], name: 'index_inventory_units_on_order_id'
214
+ t.index ['shipment_id'], name: 'index_inventory_units_on_shipment_id'
215
+ t.index ['variant_id'], name: 'index_inventory_units_on_variant_id'
216
+ end
217
+
218
+ create_table 'spree_line_item_actions', force: :cascade do |t|
219
+ t.integer 'line_item_id', null: false
220
+ t.integer 'action_id', null: false
221
+ t.integer 'quantity', default: 0
222
+ t.datetime 'created_at', precision: 6
223
+ t.datetime 'updated_at', precision: 6
224
+ t.index ['action_id'], name: 'index_spree_line_item_actions_on_action_id'
225
+ t.index ['line_item_id'], name: 'index_spree_line_item_actions_on_line_item_id'
226
+ end
227
+
228
+ create_table 'spree_line_items', force: :cascade do |t|
229
+ t.integer 'variant_id'
230
+ t.integer 'order_id'
231
+ t.integer 'quantity', null: false
232
+ t.decimal 'price', precision: 10, scale: 2, null: false
233
+ t.datetime 'created_at', precision: 6
234
+ t.datetime 'updated_at', precision: 6
235
+ t.string 'currency'
236
+ t.decimal 'cost_price', precision: 10, scale: 2
237
+ t.integer 'tax_category_id'
238
+ t.decimal 'adjustment_total', precision: 10, scale: 2, default: '0.0'
239
+ t.decimal 'additional_tax_total', precision: 10, scale: 2, default: '0.0'
240
+ t.decimal 'promo_total', precision: 10, scale: 2, default: '0.0'
241
+ t.decimal 'included_tax_total', precision: 10, scale: 2, default: '0.0', null: false
242
+ t.index ['order_id'], name: 'index_spree_line_items_on_order_id'
243
+ t.index ['variant_id'], name: 'index_spree_line_items_on_variant_id'
244
+ end
245
+
246
+ create_table 'spree_log_entries', force: :cascade do |t|
247
+ t.string 'source_type'
248
+ t.integer 'source_id'
249
+ t.text 'details'
250
+ t.datetime 'created_at', precision: 6
251
+ t.datetime 'updated_at', precision: 6
252
+ t.index ['source_id', 'source_type'], name: 'index_spree_log_entries_on_source_id_and_source_type'
253
+ end
254
+
255
+ create_table 'spree_option_type_prototypes', force: :cascade do |t|
256
+ t.integer 'prototype_id'
257
+ t.integer 'option_type_id'
258
+ t.datetime 'created_at', precision: 6
259
+ t.datetime 'updated_at', precision: 6
260
+ end
261
+
262
+ create_table 'spree_option_types', force: :cascade do |t|
263
+ t.string 'name', limit: 100
264
+ t.string 'presentation', limit: 100
265
+ t.integer 'position', default: 0, null: false
266
+ t.datetime 'created_at', precision: 6
267
+ t.datetime 'updated_at', precision: 6
268
+ t.index ['position'], name: 'index_spree_option_types_on_position'
269
+ end
270
+
271
+ create_table 'spree_option_values', force: :cascade do |t|
272
+ t.integer 'position'
273
+ t.string 'name'
274
+ t.string 'presentation'
275
+ t.integer 'option_type_id'
276
+ t.datetime 'created_at', precision: 6
277
+ t.datetime 'updated_at', precision: 6
278
+ t.index ['option_type_id'], name: 'index_spree_option_values_on_option_type_id'
279
+ t.index ['position'], name: 'index_spree_option_values_on_position'
280
+ end
281
+
282
+ create_table 'spree_option_values_variants', force: :cascade do |t|
283
+ t.integer 'variant_id'
284
+ t.integer 'option_value_id'
285
+ t.datetime 'created_at', precision: 6
286
+ t.datetime 'updated_at', precision: 6
287
+ t.index ['variant_id', 'option_value_id'], name: 'index_option_values_variants_on_variant_id_and_option_value_id'
288
+ t.index ['variant_id'], name: 'index_spree_option_values_variants_on_variant_id'
289
+ end
290
+
291
+ create_table 'spree_order_mutexes', force: :cascade do |t|
292
+ t.integer 'order_id', null: false
293
+ t.datetime 'created_at', precision: 6
294
+ t.index ['order_id'], name: 'index_spree_order_mutexes_on_order_id', unique: true
295
+ end
296
+
297
+ create_table 'spree_orders', force: :cascade do |t|
298
+ t.string 'number', limit: 32
299
+ t.decimal 'item_total', precision: 10, scale: 2, default: '0.0', null: false
300
+ t.decimal 'total', precision: 10, scale: 2, default: '0.0', null: false
301
+ t.string 'state'
302
+ t.decimal 'adjustment_total', precision: 10, scale: 2, default: '0.0', null: false
303
+ t.integer 'user_id'
304
+ t.datetime 'completed_at'
305
+ t.integer 'bill_address_id'
306
+ t.integer 'ship_address_id'
307
+ t.decimal 'payment_total', precision: 10, scale: 2, default: '0.0'
308
+ t.string 'shipment_state'
309
+ t.string 'payment_state'
310
+ t.string 'email'
311
+ t.text 'special_instructions'
312
+ t.datetime 'created_at', precision: 6
313
+ t.datetime 'updated_at', precision: 6
314
+ t.string 'currency'
315
+ t.string 'last_ip_address'
316
+ t.integer 'created_by_id'
317
+ t.decimal 'shipment_total', precision: 10, scale: 2, default: '0.0', null: false
318
+ t.decimal 'additional_tax_total', precision: 10, scale: 2, default: '0.0'
319
+ t.decimal 'promo_total', precision: 10, scale: 2, default: '0.0'
320
+ t.string 'channel', default: 'spree'
321
+ t.decimal 'included_tax_total', precision: 10, scale: 2, default: '0.0', null: false
322
+ t.integer 'item_count', default: 0
323
+ t.integer 'approver_id'
324
+ t.datetime 'approved_at'
325
+ t.boolean 'confirmation_delivered', default: false
326
+ t.string 'guest_token'
327
+ t.datetime 'canceled_at'
328
+ t.integer 'canceler_id'
329
+ t.integer 'store_id'
330
+ t.string 'approver_name'
331
+ t.boolean 'frontend_viewable', default: true, null: false
332
+ t.index ['approver_id'], name: 'index_spree_orders_on_approver_id'
333
+ t.index ['bill_address_id'], name: 'index_spree_orders_on_bill_address_id'
334
+ t.index ['completed_at'], name: 'index_spree_orders_on_completed_at'
335
+ t.index ['created_by_id'], name: 'index_spree_orders_on_created_by_id'
336
+ t.index ['guest_token'], name: 'index_spree_orders_on_guest_token'
337
+ t.index ['number'], name: 'index_spree_orders_on_number'
338
+ t.index ['ship_address_id'], name: 'index_spree_orders_on_ship_address_id'
339
+ t.index ['user_id', 'created_by_id'], name: 'index_spree_orders_on_user_id_and_created_by_id'
340
+ t.index ['user_id'], name: 'index_spree_orders_on_user_id'
341
+ end
342
+
343
+ create_table 'spree_orders_promotions', force: :cascade do |t|
344
+ t.integer 'order_id'
345
+ t.integer 'promotion_id'
346
+ t.integer 'promotion_code_id'
347
+ t.datetime 'created_at', precision: 6
348
+ t.datetime 'updated_at', precision: 6
349
+ t.index ['order_id', 'promotion_id'], name: 'index_spree_orders_promotions_on_order_id_and_promotion_id'
350
+ t.index ['promotion_code_id'], name: 'index_spree_orders_promotions_on_promotion_code_id'
351
+ end
352
+
353
+ create_table 'spree_payment_capture_events', force: :cascade do |t|
354
+ t.decimal 'amount', precision: 10, scale: 2, default: '0.0'
355
+ t.integer 'payment_id'
356
+ t.datetime 'created_at', precision: 6
357
+ t.datetime 'updated_at', precision: 6
358
+ t.index ['payment_id'], name: 'index_spree_payment_capture_events_on_payment_id'
359
+ end
360
+
361
+ create_table 'spree_payment_methods', force: :cascade do |t|
362
+ t.string 'type'
363
+ t.string 'name'
364
+ t.text 'description'
365
+ t.boolean 'active', default: true
366
+ t.datetime 'deleted_at'
367
+ t.datetime 'created_at', precision: 6
368
+ t.datetime 'updated_at', precision: 6
369
+ t.string 'display_on'
370
+ t.boolean 'auto_capture'
371
+ t.text 'preferences'
372
+ t.string 'preference_source'
373
+ t.integer 'position', default: 0
374
+ t.index ['id', 'type'], name: 'index_spree_payment_methods_on_id_and_type'
375
+ end
376
+
377
+ create_table 'spree_payments', force: :cascade do |t|
378
+ t.decimal 'amount', precision: 10, scale: 2, default: '0.0', null: false
379
+ t.integer 'order_id'
380
+ t.string 'source_type'
381
+ t.integer 'source_id'
382
+ t.integer 'payment_method_id'
383
+ t.string 'state'
384
+ t.string 'response_code'
385
+ t.string 'avs_response'
386
+ t.datetime 'created_at', precision: 6
387
+ t.datetime 'updated_at', precision: 6
388
+ t.string 'number'
389
+ t.string 'cvv_response_code'
390
+ t.string 'cvv_response_message'
391
+ t.index ['order_id'], name: 'index_spree_payments_on_order_id'
392
+ t.index ['payment_method_id'], name: 'index_spree_payments_on_payment_method_id'
393
+ t.index ['source_id', 'source_type'], name: 'index_spree_payments_on_source_id_and_source_type'
394
+ end
395
+
396
+ create_table 'spree_preferences', force: :cascade do |t|
397
+ t.text 'value'
398
+ t.string 'key'
399
+ t.datetime 'created_at', precision: 6
400
+ t.datetime 'updated_at', precision: 6
401
+ t.index ['key'], name: 'index_spree_preferences_on_key', unique: true
402
+ end
403
+
404
+ create_table 'spree_prices', force: :cascade do |t|
405
+ t.integer 'variant_id', null: false
406
+ t.decimal 'amount', precision: 10, scale: 2
407
+ t.string 'currency'
408
+ t.datetime 'deleted_at'
409
+ t.boolean 'is_default', default: true, null: false
410
+ t.datetime 'created_at', precision: 6
411
+ t.datetime 'updated_at', precision: 6
412
+ t.string 'country_iso', limit: 2
413
+ t.index ['country_iso'], name: 'index_spree_prices_on_country_iso'
414
+ t.index ['variant_id', 'currency'], name: 'index_spree_prices_on_variant_id_and_currency'
415
+ end
416
+
417
+ create_table 'spree_product_option_types', force: :cascade do |t|
418
+ t.integer 'position'
419
+ t.integer 'product_id'
420
+ t.integer 'option_type_id'
421
+ t.datetime 'created_at', precision: 6
422
+ t.datetime 'updated_at', precision: 6
423
+ t.index ['option_type_id'], name: 'index_spree_product_option_types_on_option_type_id'
424
+ t.index ['position'], name: 'index_spree_product_option_types_on_position'
425
+ t.index ['product_id'], name: 'index_spree_product_option_types_on_product_id'
426
+ end
427
+
428
+ create_table 'spree_product_promotion_rules', force: :cascade do |t|
429
+ t.integer 'product_id'
430
+ t.integer 'promotion_rule_id'
431
+ t.datetime 'created_at', precision: 6
432
+ t.datetime 'updated_at', precision: 6
433
+ t.index ['product_id'], name: 'index_products_promotion_rules_on_product_id'
434
+ t.index ['promotion_rule_id'], name: 'index_products_promotion_rules_on_promotion_rule_id'
435
+ end
436
+
437
+ create_table 'spree_product_properties', force: :cascade do |t|
438
+ t.string 'value'
439
+ t.integer 'product_id'
440
+ t.integer 'property_id'
441
+ t.datetime 'created_at', precision: 6
442
+ t.datetime 'updated_at', precision: 6
443
+ t.integer 'position', default: 0
444
+ t.index ['position'], name: 'index_spree_product_properties_on_position'
445
+ t.index ['product_id'], name: 'index_product_properties_on_product_id'
446
+ t.index ['property_id'], name: 'index_spree_product_properties_on_property_id'
447
+ end
448
+
449
+ create_table 'spree_products', force: :cascade do |t|
450
+ t.string 'name', default: '', null: false
451
+ t.text 'description'
452
+ t.datetime 'available_on'
453
+ t.datetime 'deleted_at'
454
+ t.string 'slug'
455
+ t.text 'meta_description'
456
+ t.string 'meta_keywords'
457
+ t.integer 'tax_category_id'
458
+ t.integer 'shipping_category_id'
459
+ t.datetime 'created_at', precision: 6
460
+ t.datetime 'updated_at', precision: 6
461
+ t.boolean 'promotionable', default: true
462
+ t.string 'meta_title'
463
+ t.index ['available_on'], name: 'index_spree_products_on_available_on'
464
+ t.index ['deleted_at'], name: 'index_spree_products_on_deleted_at'
465
+ t.index ['name'], name: 'index_spree_products_on_name'
466
+ t.index ['slug'], name: 'index_spree_products_on_slug', unique: true
467
+ end
468
+
469
+ create_table 'spree_products_taxons', force: :cascade do |t|
470
+ t.integer 'product_id'
471
+ t.integer 'taxon_id'
472
+ t.integer 'position'
473
+ t.datetime 'created_at', precision: 6
474
+ t.datetime 'updated_at', precision: 6
475
+ t.index ['position'], name: 'index_spree_products_taxons_on_position'
476
+ t.index ['product_id'], name: 'index_spree_products_taxons_on_product_id'
477
+ t.index ['taxon_id'], name: 'index_spree_products_taxons_on_taxon_id'
478
+ end
479
+
480
+ create_table 'spree_promotion_action_line_items', force: :cascade do |t|
481
+ t.integer 'promotion_action_id'
482
+ t.integer 'variant_id'
483
+ t.integer 'quantity', default: 1
484
+ t.datetime 'created_at', precision: 6
485
+ t.datetime 'updated_at', precision: 6
486
+ t.index ['promotion_action_id'], name: 'index_spree_promotion_action_line_items_on_promotion_action_id'
487
+ t.index ['variant_id'], name: 'index_spree_promotion_action_line_items_on_variant_id'
488
+ end
489
+
490
+ create_table 'spree_promotion_actions', force: :cascade do |t|
491
+ t.integer 'promotion_id'
492
+ t.integer 'position'
493
+ t.string 'type'
494
+ t.datetime 'deleted_at'
495
+ t.text 'preferences'
496
+ t.datetime 'created_at', precision: 6
497
+ t.datetime 'updated_at', precision: 6
498
+ t.index ['deleted_at'], name: 'index_spree_promotion_actions_on_deleted_at'
499
+ t.index ['id', 'type'], name: 'index_spree_promotion_actions_on_id_and_type'
500
+ t.index ['promotion_id'], name: 'index_spree_promotion_actions_on_promotion_id'
501
+ end
502
+
503
+ create_table 'spree_promotion_categories', force: :cascade do |t|
504
+ t.string 'name'
505
+ t.datetime 'created_at', precision: 6
506
+ t.datetime 'updated_at', precision: 6
507
+ t.string 'code'
508
+ end
509
+
510
+ create_table 'spree_promotion_codes', force: :cascade do |t|
511
+ t.integer 'promotion_id', null: false
512
+ t.string 'value', null: false
513
+ t.datetime 'created_at', precision: 6
514
+ t.datetime 'updated_at', precision: 6
515
+ t.index ['promotion_id'], name: 'index_spree_promotion_codes_on_promotion_id'
516
+ t.index ['value'], name: 'index_spree_promotion_codes_on_value', unique: true
517
+ end
518
+
519
+ create_table 'spree_promotion_rule_taxons', force: :cascade do |t|
520
+ t.integer 'taxon_id'
521
+ t.integer 'promotion_rule_id'
522
+ t.datetime 'created_at', precision: 6
523
+ t.datetime 'updated_at', precision: 6
524
+ t.index ['promotion_rule_id'], name: 'index_spree_promotion_rule_taxons_on_promotion_rule_id'
525
+ t.index ['taxon_id'], name: 'index_spree_promotion_rule_taxons_on_taxon_id'
526
+ end
527
+
528
+ create_table 'spree_promotion_rules', force: :cascade do |t|
529
+ t.integer 'promotion_id'
530
+ t.integer 'product_group_id'
531
+ t.string 'type'
532
+ t.datetime 'created_at', precision: 6
533
+ t.datetime 'updated_at', precision: 6
534
+ t.string 'code'
535
+ t.text 'preferences'
536
+ t.index ['product_group_id'], name: 'index_promotion_rules_on_product_group_id'
537
+ t.index ['promotion_id'], name: 'index_spree_promotion_rules_on_promotion_id'
538
+ end
539
+
540
+ create_table 'spree_promotion_rules_users', force: :cascade do |t|
541
+ t.integer 'user_id'
542
+ t.integer 'promotion_rule_id'
543
+ t.datetime 'created_at', precision: 6
544
+ t.datetime 'updated_at', precision: 6
545
+ t.index ['promotion_rule_id'], name: 'index_promotion_rules_users_on_promotion_rule_id'
546
+ t.index ['user_id'], name: 'index_promotion_rules_users_on_user_id'
547
+ end
548
+
549
+ create_table 'spree_promotions', force: :cascade do |t|
550
+ t.string 'description'
551
+ t.datetime 'expires_at'
552
+ t.datetime 'starts_at'
553
+ t.string 'name'
554
+ t.string 'type'
555
+ t.integer 'usage_limit'
556
+ t.string 'match_policy', default: 'all'
557
+ t.string 'code'
558
+ t.boolean 'advertise', default: false
559
+ t.string 'path'
560
+ t.datetime 'created_at', precision: 6
561
+ t.datetime 'updated_at', precision: 6
562
+ t.integer 'promotion_category_id'
563
+ t.integer 'per_code_usage_limit'
564
+ t.boolean 'apply_automatically', default: false
565
+ t.index ['advertise'], name: 'index_spree_promotions_on_advertise'
566
+ t.index ['apply_automatically'], name: 'index_spree_promotions_on_apply_automatically'
567
+ t.index ['code'], name: 'index_spree_promotions_on_code'
568
+ t.index ['expires_at'], name: 'index_spree_promotions_on_expires_at'
569
+ t.index ['id', 'type'], name: 'index_spree_promotions_on_id_and_type'
570
+ t.index ['promotion_category_id'], name: 'index_spree_promotions_on_promotion_category_id'
571
+ t.index ['starts_at'], name: 'index_spree_promotions_on_starts_at'
572
+ end
573
+
574
+ create_table 'spree_properties', force: :cascade do |t|
575
+ t.string 'name'
576
+ t.string 'presentation', null: false
577
+ t.datetime 'created_at', precision: 6
578
+ t.datetime 'updated_at', precision: 6
579
+ end
580
+
581
+ create_table 'spree_property_prototypes', force: :cascade do |t|
582
+ t.integer 'prototype_id'
583
+ t.integer 'property_id'
584
+ t.datetime 'created_at', precision: 6
585
+ t.datetime 'updated_at', precision: 6
586
+ end
587
+
588
+ create_table 'spree_prototype_taxons', force: :cascade do |t|
589
+ t.integer 'taxon_id'
590
+ t.integer 'prototype_id'
591
+ t.datetime 'created_at', precision: 6
592
+ t.datetime 'updated_at', precision: 6
593
+ t.index ['prototype_id'], name: 'index_spree_prototype_taxons_on_prototype_id'
594
+ t.index ['taxon_id'], name: 'index_spree_prototype_taxons_on_taxon_id'
595
+ end
596
+
597
+ create_table 'spree_prototypes', force: :cascade do |t|
598
+ t.string 'name'
599
+ t.datetime 'created_at', precision: 6
600
+ t.datetime 'updated_at', precision: 6
601
+ end
602
+
603
+ create_table 'spree_refund_reasons', force: :cascade do |t|
604
+ t.string 'name'
605
+ t.boolean 'active', default: true
606
+ t.boolean 'mutable', default: true
607
+ t.datetime 'created_at', precision: 6
608
+ t.datetime 'updated_at', precision: 6
609
+ t.string 'code'
610
+ end
611
+
612
+ create_table 'spree_refunds', force: :cascade do |t|
613
+ t.integer 'payment_id'
614
+ t.decimal 'amount', precision: 10, scale: 2, default: '0.0', null: false
615
+ t.string 'transaction_id'
616
+ t.datetime 'created_at', precision: 6
617
+ t.datetime 'updated_at', precision: 6
618
+ t.integer 'refund_reason_id'
619
+ t.integer 'reimbursement_id'
620
+ t.index ['payment_id'], name: 'index_spree_refunds_on_payment_id'
621
+ t.index ['refund_reason_id'], name: 'index_refunds_on_refund_reason_id'
622
+ t.index ['reimbursement_id'], name: 'index_spree_refunds_on_reimbursement_id'
623
+ end
624
+
625
+ create_table 'spree_reimbursement_credits', force: :cascade do |t|
626
+ t.decimal 'amount', precision: 10, scale: 2, default: '0.0', null: false
627
+ t.integer 'reimbursement_id'
628
+ t.integer 'creditable_id'
629
+ t.string 'creditable_type'
630
+ t.datetime 'created_at', precision: 6
631
+ t.datetime 'updated_at', precision: 6
632
+ end
633
+
634
+ create_table 'spree_reimbursement_types', force: :cascade do |t|
635
+ t.string 'name'
636
+ t.boolean 'active', default: true
637
+ t.boolean 'mutable', default: true
638
+ t.datetime 'created_at', precision: 6
639
+ t.datetime 'updated_at', precision: 6
640
+ t.string 'type'
641
+ t.index ['type'], name: 'index_spree_reimbursement_types_on_type'
642
+ end
643
+
644
+ create_table 'spree_reimbursements', force: :cascade do |t|
645
+ t.string 'number'
646
+ t.string 'reimbursement_status'
647
+ t.integer 'customer_return_id'
648
+ t.integer 'order_id'
649
+ t.decimal 'total', precision: 10, scale: 2
650
+ t.datetime 'created_at', precision: 6
651
+ t.datetime 'updated_at', precision: 6
652
+ t.index ['customer_return_id'], name: 'index_spree_reimbursements_on_customer_return_id'
653
+ t.index ['order_id'], name: 'index_spree_reimbursements_on_order_id'
654
+ end
655
+
656
+ create_table 'spree_return_authorizations', force: :cascade do |t|
657
+ t.string 'number'
658
+ t.string 'state'
659
+ t.integer 'order_id'
660
+ t.text 'memo'
661
+ t.datetime 'created_at', precision: 6
662
+ t.datetime 'updated_at', precision: 6
663
+ t.integer 'stock_location_id'
664
+ t.integer 'return_reason_id'
665
+ t.index ['return_reason_id'], name: 'index_return_authorizations_on_return_authorization_reason_id'
666
+ end
667
+
668
+ create_table 'spree_return_items', force: :cascade do |t|
669
+ t.integer 'return_authorization_id'
670
+ t.integer 'inventory_unit_id'
671
+ t.integer 'exchange_variant_id'
672
+ t.datetime 'created_at', precision: 6
673
+ t.datetime 'updated_at', precision: 6
674
+ t.decimal 'amount', precision: 12, scale: 4, default: '0.0', null: false
675
+ t.decimal 'included_tax_total', precision: 12, scale: 4, default: '0.0', null: false
676
+ t.decimal 'additional_tax_total', precision: 12, scale: 4, default: '0.0', null: false
677
+ t.string 'reception_status'
678
+ t.string 'acceptance_status'
679
+ t.integer 'customer_return_id'
680
+ t.integer 'reimbursement_id'
681
+ t.integer 'exchange_inventory_unit_id'
682
+ t.text 'acceptance_status_errors'
683
+ t.integer 'preferred_reimbursement_type_id'
684
+ t.integer 'override_reimbursement_type_id'
685
+ t.boolean 'resellable', default: true, null: false
686
+ t.integer 'return_reason_id'
687
+ t.index ['customer_return_id'], name: 'index_return_items_on_customer_return_id'
688
+ t.index ['exchange_inventory_unit_id'], name: 'index_spree_return_items_on_exchange_inventory_unit_id'
689
+ end
690
+
691
+ create_table 'spree_return_reasons', force: :cascade do |t|
692
+ t.string 'name'
693
+ t.boolean 'active', default: true
694
+ t.boolean 'mutable', default: true
695
+ t.datetime 'created_at', precision: 6
696
+ t.datetime 'updated_at', precision: 6
697
+ end
698
+
699
+ create_table 'spree_roles', force: :cascade do |t|
700
+ t.string 'name'
701
+ t.datetime 'created_at', precision: 6
702
+ t.datetime 'updated_at', precision: 6
703
+ end
704
+
705
+ create_table 'spree_roles_users', force: :cascade do |t|
706
+ t.integer 'role_id'
707
+ t.integer 'user_id'
708
+ t.datetime 'created_at', precision: 6
709
+ t.datetime 'updated_at', precision: 6
710
+ t.index ['role_id'], name: 'index_spree_roles_users_on_role_id'
711
+ t.index ['user_id'], name: 'index_spree_roles_users_on_user_id'
712
+ end
713
+
714
+ create_table 'spree_shipments', force: :cascade do |t|
715
+ t.string 'tracking'
716
+ t.string 'number'
717
+ t.decimal 'cost', precision: 10, scale: 2, default: '0.0'
718
+ t.datetime 'shipped_at'
719
+ t.integer 'order_id'
720
+ t.integer 'deprecated_address_id'
721
+ t.string 'state'
722
+ t.datetime 'created_at', precision: 6
723
+ t.datetime 'updated_at', precision: 6
724
+ t.integer 'stock_location_id'
725
+ t.decimal 'adjustment_total', precision: 10, scale: 2, default: '0.0'
726
+ t.decimal 'additional_tax_total', precision: 10, scale: 2, default: '0.0'
727
+ t.decimal 'promo_total', precision: 10, scale: 2, default: '0.0'
728
+ t.decimal 'included_tax_total', precision: 10, scale: 2, default: '0.0', null: false
729
+ t.index ['deprecated_address_id'], name: 'index_spree_shipments_on_deprecated_address_id'
730
+ t.index ['number'], name: 'index_shipments_on_number'
731
+ t.index ['order_id'], name: 'index_spree_shipments_on_order_id'
732
+ t.index ['stock_location_id'], name: 'index_spree_shipments_on_stock_location_id'
733
+ end
734
+
735
+ create_table 'spree_shipping_categories', force: :cascade do |t|
736
+ t.string 'name'
737
+ t.datetime 'created_at', precision: 6
738
+ t.datetime 'updated_at', precision: 6
739
+ end
740
+
741
+ create_table 'spree_shipping_method_categories', force: :cascade do |t|
742
+ t.integer 'shipping_method_id', null: false
743
+ t.integer 'shipping_category_id', null: false
744
+ t.datetime 'created_at', precision: 6
745
+ t.datetime 'updated_at', precision: 6
746
+ t.index ['shipping_category_id', 'shipping_method_id'], name: 'unique_spree_shipping_method_categories', unique: true
747
+ t.index ['shipping_method_id'], name: 'index_spree_shipping_method_categories_on_shipping_method_id'
748
+ end
749
+
750
+ create_table 'spree_shipping_method_stock_locations', force: :cascade do |t|
751
+ t.integer 'shipping_method_id'
752
+ t.integer 'stock_location_id'
753
+ t.datetime 'created_at', precision: 6
754
+ t.datetime 'updated_at', precision: 6
755
+ t.index ['shipping_method_id'], name: 'shipping_method_id_spree_sm_sl'
756
+ t.index ['stock_location_id'], name: 'sstock_location_id_spree_sm_sl'
757
+ end
758
+
759
+ create_table 'spree_shipping_method_zones', force: :cascade do |t|
760
+ t.integer 'shipping_method_id'
761
+ t.integer 'zone_id'
762
+ t.datetime 'created_at', precision: 6
763
+ t.datetime 'updated_at', precision: 6
764
+ end
765
+
766
+ create_table 'spree_shipping_methods', force: :cascade do |t|
767
+ t.string 'name'
768
+ t.string 'display_on'
769
+ t.datetime 'deleted_at'
770
+ t.datetime 'created_at', precision: 6
771
+ t.datetime 'updated_at', precision: 6
772
+ t.string 'tracking_url'
773
+ t.string 'admin_name'
774
+ t.integer 'tax_category_id'
775
+ t.string 'code'
776
+ t.boolean 'available_to_all', default: true
777
+ t.string 'carrier'
778
+ t.string 'service_level'
779
+ t.index ['tax_category_id'], name: 'index_spree_shipping_methods_on_tax_category_id'
780
+ end
781
+
782
+ create_table 'spree_shipping_rate_taxes', force: :cascade do |t|
783
+ t.decimal 'amount', precision: 8, scale: 2, default: '0.0', null: false
784
+ t.integer 'tax_rate_id'
785
+ t.integer 'shipping_rate_id'
786
+ t.datetime 'created_at', null: false, precision: 6
787
+ t.datetime 'updated_at', null: false, precision: 6
788
+ t.index ['shipping_rate_id'], name: 'index_spree_shipping_rate_taxes_on_shipping_rate_id'
789
+ t.index ['tax_rate_id'], name: 'index_spree_shipping_rate_taxes_on_tax_rate_id'
790
+ end
791
+
792
+ create_table 'spree_shipping_rates', force: :cascade do |t|
793
+ t.integer 'shipment_id'
794
+ t.integer 'shipping_method_id'
795
+ t.boolean 'selected', default: false
796
+ t.decimal 'cost', precision: 8, scale: 2, default: '0.0'
797
+ t.datetime 'created_at', precision: 6
798
+ t.datetime 'updated_at', precision: 6
799
+ t.integer 'tax_rate_id'
800
+ t.index ['shipment_id', 'shipping_method_id'], name: 'spree_shipping_rates_join_index', unique: true
801
+ end
802
+
803
+ create_table 'spree_state_changes', force: :cascade do |t|
804
+ t.string 'name'
805
+ t.string 'previous_state'
806
+ t.integer 'stateful_id'
807
+ t.integer 'user_id'
808
+ t.string 'stateful_type'
809
+ t.string 'next_state'
810
+ t.datetime 'created_at', precision: 6
811
+ t.datetime 'updated_at', precision: 6
812
+ t.index ['stateful_id', 'stateful_type'], name: 'index_spree_state_changes_on_stateful_id_and_stateful_type'
813
+ t.index ['user_id'], name: 'index_spree_state_changes_on_user_id'
814
+ end
815
+
816
+ create_table 'spree_states', force: :cascade do |t|
817
+ t.string 'name'
818
+ t.string 'abbr'
819
+ t.integer 'country_id'
820
+ t.datetime 'updated_at', precision: 6
821
+ t.datetime 'created_at', precision: 6
822
+ t.index ['country_id'], name: 'index_spree_states_on_country_id'
823
+ end
824
+
825
+ create_table 'spree_stock_items', force: :cascade do |t|
826
+ t.integer 'stock_location_id'
827
+ t.integer 'variant_id'
828
+ t.integer 'count_on_hand', default: 0, null: false
829
+ t.datetime 'created_at', precision: 6
830
+ t.datetime 'updated_at', precision: 6
831
+ t.boolean 'backorderable', default: false
832
+ t.datetime 'deleted_at'
833
+ t.index ['deleted_at'], name: 'index_spree_stock_items_on_deleted_at'
834
+ t.index ['stock_location_id', 'variant_id'], name: 'stock_item_by_loc_and_var_id'
835
+ t.index ['stock_location_id'], name: 'index_spree_stock_items_on_stock_location_id'
822
836
 
823
837
  if connection.supports_partial_index?
824
- t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "deleted_at is null"
838
+ t.index ['variant_id', 'stock_location_id'], name: 'index_spree_stock_items_on_variant_id_and_stock_location_id', unique: true, where: 'deleted_at is null'
825
839
  end
826
840
  end
827
841
 
828
- create_table "spree_stock_locations", force: :cascade do |t|
829
- t.string "name"
830
- t.datetime "created_at", precision: 6
831
- t.datetime "updated_at", precision: 6
832
- t.boolean "default", default: false, null: false
833
- t.string "address1"
834
- t.string "address2"
835
- t.string "city"
836
- t.integer "state_id"
837
- t.string "state_name"
838
- t.integer "country_id"
839
- t.string "zipcode"
840
- t.string "phone"
841
- t.boolean "active", default: true
842
- t.boolean "backorderable_default", default: false
843
- t.boolean "propagate_all_variants", default: true
844
- t.string "admin_name"
845
- t.integer "position", default: 0
846
- t.boolean "restock_inventory", default: true, null: false
847
- t.boolean "fulfillable", default: true, null: false
848
- t.string "code"
849
- t.boolean "check_stock_on_transfer", default: true
850
- t.index ["country_id"], name: "index_spree_stock_locations_on_country_id"
851
- t.index ["state_id"], name: "index_spree_stock_locations_on_state_id"
852
- end
853
-
854
- create_table "spree_stock_movements", force: :cascade do |t|
855
- t.integer "stock_item_id"
856
- t.integer "quantity", default: 0
857
- t.string "action"
858
- t.datetime "created_at", null: false, precision: 6
859
- t.datetime "updated_at", null: false, precision: 6
860
- t.string "originator_type"
861
- t.integer "originator_id"
862
- t.index ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
863
- end
864
-
865
- create_table "spree_store_credit_categories", force: :cascade do |t|
866
- t.string "name"
867
- t.datetime "created_at", precision: 6
868
- t.datetime "updated_at", precision: 6
869
- end
870
-
871
- create_table "spree_store_credit_events", force: :cascade do |t|
872
- t.integer "store_credit_id", null: false
873
- t.string "action", null: false
874
- t.decimal "amount", precision: 8, scale: 2
875
- t.decimal "user_total_amount", precision: 8, scale: 2, default: "0.0", null: false
876
- t.string "authorization_code", null: false
877
- t.datetime "deleted_at"
878
- t.string "originator_type"
879
- t.integer "originator_id"
880
- t.datetime "created_at", precision: 6
881
- t.datetime "updated_at", precision: 6
882
- t.integer "update_reason_id"
883
- t.index ["deleted_at"], name: "index_spree_store_credit_events_on_deleted_at"
884
- t.index ["store_credit_id"], name: "index_spree_store_credit_events_on_store_credit_id"
885
- end
886
-
887
- create_table "spree_store_credit_types", force: :cascade do |t|
888
- t.string "name"
889
- t.integer "priority"
890
- t.datetime "created_at", precision: 6
891
- t.datetime "updated_at", precision: 6
892
- t.index ["priority"], name: "index_spree_store_credit_types_on_priority"
893
- end
894
-
895
- create_table "spree_store_credit_update_reasons", force: :cascade do |t|
896
- t.string "name"
897
- t.datetime "created_at", precision: 6
898
- t.datetime "updated_at", precision: 6
899
- end
900
-
901
- create_table "spree_store_credits", force: :cascade do |t|
902
- t.integer "user_id"
903
- t.integer "category_id"
904
- t.integer "created_by_id"
905
- t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
906
- t.decimal "amount_used", precision: 8, scale: 2, default: "0.0", null: false
907
- t.decimal "amount_authorized", precision: 8, scale: 2, default: "0.0", null: false
908
- t.string "currency"
909
- t.text "memo"
910
- t.datetime "spree_store_credits"
911
- t.datetime "deleted_at"
912
- t.datetime "created_at", precision: 6
913
- t.datetime "updated_at", precision: 6
914
- t.integer "type_id"
915
- t.datetime "invalidated_at"
916
- t.index ["deleted_at"], name: "index_spree_store_credits_on_deleted_at"
917
- t.index ["type_id"], name: "index_spree_store_credits_on_type_id"
918
- t.index ["user_id"], name: "index_spree_store_credits_on_user_id"
919
- end
920
-
921
- create_table "spree_store_payment_methods", force: :cascade do |t|
922
- t.integer "store_id", null: false
923
- t.integer "payment_method_id", null: false
924
- t.datetime "created_at", null: false, precision: 6
925
- t.datetime "updated_at", null: false, precision: 6
926
- t.index ["payment_method_id"], name: "index_spree_store_payment_methods_on_payment_method_id"
927
- t.index ["store_id"], name: "index_spree_store_payment_methods_on_store_id"
928
- end
929
-
930
- create_table "spree_stores", force: :cascade do |t|
931
- t.string "name"
932
- t.string "url"
933
- t.text "meta_description"
934
- t.text "meta_keywords"
935
- t.string "seo_title"
936
- t.string "mail_from_address"
937
- t.string "default_currency"
938
- t.string "code"
939
- t.boolean "default", default: false, null: false
940
- t.datetime "created_at", precision: 6
941
- t.datetime "updated_at", precision: 6
942
- t.string "cart_tax_country_iso"
943
- t.index ["code"], name: "index_spree_stores_on_code"
944
- t.index ["default"], name: "index_spree_stores_on_default"
945
- end
946
-
947
- create_table "spree_tax_categories", force: :cascade do |t|
948
- t.string "name"
949
- t.string "description"
950
- t.boolean "is_default", default: false
951
- t.datetime "deleted_at"
952
- t.datetime "created_at", precision: 6
953
- t.datetime "updated_at", precision: 6
954
- t.string "tax_code"
955
- end
956
-
957
- create_table "spree_tax_rates", force: :cascade do |t|
958
- t.decimal "amount", precision: 8, scale: 5
959
- t.integer "zone_id"
960
- t.integer "tax_category_id"
961
- t.boolean "included_in_price", default: false
962
- t.datetime "created_at", precision: 6
963
- t.datetime "updated_at", precision: 6
964
- t.string "name"
965
- t.boolean "show_rate_in_label", default: true
966
- t.datetime "deleted_at"
967
- t.index ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"
968
- t.index ["tax_category_id"], name: "index_spree_tax_rates_on_tax_category_id"
969
- t.index ["zone_id"], name: "index_spree_tax_rates_on_zone_id"
970
- end
971
-
972
- create_table "spree_taxonomies", force: :cascade do |t|
973
- t.string "name", null: false
974
- t.datetime "created_at", precision: 6
975
- t.datetime "updated_at", precision: 6
976
- t.integer "position", default: 0
977
- t.index ["position"], name: "index_spree_taxonomies_on_position"
978
- end
979
-
980
- create_table "spree_taxons", force: :cascade do |t|
981
- t.integer "parent_id"
982
- t.integer "position", default: 0
983
- t.string "name", null: false
984
- t.string "permalink"
985
- t.integer "taxonomy_id"
986
- t.integer "lft"
987
- t.integer "rgt"
988
- t.string "icon_file_name"
989
- t.string "icon_content_type"
990
- t.integer "icon_file_size"
991
- t.datetime "icon_updated_at"
992
- t.text "description"
993
- t.datetime "created_at", precision: 6
994
- t.datetime "updated_at", precision: 6
995
- t.string "meta_title"
996
- t.string "meta_description"
997
- t.string "meta_keywords"
998
- t.integer "depth"
999
- t.index ["parent_id"], name: "index_taxons_on_parent_id"
1000
- t.index ["permalink"], name: "index_taxons_on_permalink"
1001
- t.index ["position"], name: "index_spree_taxons_on_position"
1002
- t.index ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
1003
- end
1004
-
1005
- create_table "spree_unit_cancels", force: :cascade do |t|
1006
- t.integer "inventory_unit_id", null: false
1007
- t.string "reason"
1008
- t.string "created_by"
1009
- t.datetime "created_at", precision: 6
1010
- t.datetime "updated_at", precision: 6
1011
- t.index ["inventory_unit_id"], name: "index_spree_unit_cancels_on_inventory_unit_id"
1012
- end
1013
-
1014
- create_table "spree_user_addresses", force: :cascade do |t|
1015
- t.integer "user_id", null: false
1016
- t.integer "address_id", null: false
1017
- t.boolean "default", default: false
1018
- t.boolean "archived", default: false
1019
- t.datetime "created_at", null: false, precision: 6
1020
- t.datetime "updated_at", null: false, precision: 6
1021
- t.index ["address_id"], name: "index_spree_user_addresses_on_address_id"
1022
- t.index ["user_id", "address_id"], name: "index_spree_user_addresses_on_user_id_and_address_id", unique: true
1023
- t.index ["user_id"], name: "index_spree_user_addresses_on_user_id"
1024
- end
1025
-
1026
- create_table "spree_user_stock_locations", force: :cascade do |t|
1027
- t.integer "user_id"
1028
- t.integer "stock_location_id"
1029
- t.datetime "created_at", precision: 6
1030
- t.datetime "updated_at", precision: 6
1031
- t.index ["user_id"], name: "index_spree_user_stock_locations_on_user_id"
1032
- end
1033
-
1034
- create_table "spree_variant_property_rule_conditions", force: :cascade do |t|
1035
- t.integer "option_value_id"
1036
- t.integer "variant_property_rule_id"
1037
- t.datetime "created_at", null: false, precision: 6
1038
- t.datetime "updated_at", null: false, precision: 6
1039
- t.index ["variant_property_rule_id", "option_value_id"], name: "index_spree_variant_prop_rule_conditions_on_rule_and_optval"
1040
- end
1041
-
1042
- create_table "spree_variant_property_rule_values", force: :cascade do |t|
1043
- t.text "value"
1044
- t.integer "position", default: 0
1045
- t.integer "property_id"
1046
- t.integer "variant_property_rule_id"
1047
- t.datetime "created_at", precision: 6
1048
- t.datetime "updated_at", precision: 6
1049
- t.index ["property_id"], name: "index_spree_variant_property_rule_values_on_property_id"
1050
- t.index ["variant_property_rule_id"], name: "index_spree_variant_property_rule_values_on_rule"
1051
- end
1052
-
1053
- create_table "spree_variant_property_rules", force: :cascade do |t|
1054
- t.integer "product_id"
1055
- t.datetime "created_at", null: false, precision: 6
1056
- t.datetime "updated_at", null: false, precision: 6
1057
- t.index ["product_id"], name: "index_spree_variant_property_rules_on_product_id"
1058
- end
1059
-
1060
- create_table "spree_variants", force: :cascade do |t|
1061
- t.string "sku", default: "", null: false
1062
- t.decimal "weight", precision: 8, scale: 2, default: "0.0"
1063
- t.decimal "height", precision: 8, scale: 2
1064
- t.decimal "width", precision: 8, scale: 2
1065
- t.decimal "depth", precision: 8, scale: 2
1066
- t.datetime "deleted_at"
1067
- t.boolean "is_master", default: false
1068
- t.integer "product_id"
1069
- t.decimal "cost_price", precision: 10, scale: 2
1070
- t.integer "position"
1071
- t.string "cost_currency"
1072
- t.boolean "track_inventory", default: true
1073
- t.integer "tax_category_id"
1074
- t.datetime "updated_at", precision: 6
1075
- t.datetime "created_at", precision: 6
1076
- t.index ["position"], name: "index_spree_variants_on_position"
1077
- t.index ["product_id"], name: "index_spree_variants_on_product_id"
1078
- t.index ["sku"], name: "index_spree_variants_on_sku"
1079
- t.index ["tax_category_id"], name: "index_spree_variants_on_tax_category_id"
1080
- t.index ["track_inventory"], name: "index_spree_variants_on_track_inventory"
1081
- end
1082
-
1083
- create_table "spree_zone_members", force: :cascade do |t|
1084
- t.string "zoneable_type"
1085
- t.integer "zoneable_id"
1086
- t.integer "zone_id"
1087
- t.datetime "created_at", precision: 6
1088
- t.datetime "updated_at", precision: 6
1089
- t.index ["zone_id"], name: "index_spree_zone_members_on_zone_id"
1090
- t.index ["zoneable_id", "zoneable_type"], name: "index_spree_zone_members_on_zoneable_id_and_zoneable_type"
1091
- end
1092
-
1093
- create_table "spree_zones", force: :cascade do |t|
1094
- t.string "name"
1095
- t.string "description"
1096
- t.boolean "default_tax", default: false
1097
- t.integer "zone_members_count", default: 0
1098
- t.datetime "created_at", precision: 6
1099
- t.datetime "updated_at", precision: 6
842
+ create_table 'spree_stock_locations', force: :cascade do |t|
843
+ t.string 'name'
844
+ t.datetime 'created_at', precision: 6
845
+ t.datetime 'updated_at', precision: 6
846
+ t.boolean 'default', default: false, null: false
847
+ t.string 'address1'
848
+ t.string 'address2'
849
+ t.string 'city'
850
+ t.integer 'state_id'
851
+ t.string 'state_name'
852
+ t.integer 'country_id'
853
+ t.string 'zipcode'
854
+ t.string 'phone'
855
+ t.boolean 'active', default: true
856
+ t.boolean 'backorderable_default', default: false
857
+ t.boolean 'propagate_all_variants', default: true
858
+ t.string 'admin_name'
859
+ t.integer 'position', default: 0
860
+ t.boolean 'restock_inventory', default: true, null: false
861
+ t.boolean 'fulfillable', default: true, null: false
862
+ t.string 'code'
863
+ t.boolean 'check_stock_on_transfer', default: true
864
+ t.index ['country_id'], name: 'index_spree_stock_locations_on_country_id'
865
+ t.index ['state_id'], name: 'index_spree_stock_locations_on_state_id'
866
+ end
867
+
868
+ create_table 'spree_stock_movements', force: :cascade do |t|
869
+ t.integer 'stock_item_id'
870
+ t.integer 'quantity', default: 0
871
+ t.string 'action'
872
+ t.datetime 'created_at', null: false, precision: 6
873
+ t.datetime 'updated_at', null: false, precision: 6
874
+ t.string 'originator_type'
875
+ t.integer 'originator_id'
876
+ t.index ['stock_item_id'], name: 'index_spree_stock_movements_on_stock_item_id'
877
+ end
878
+
879
+ create_table 'spree_store_credit_categories', force: :cascade do |t|
880
+ t.string 'name'
881
+ t.datetime 'created_at', precision: 6
882
+ t.datetime 'updated_at', precision: 6
883
+ end
884
+
885
+ create_table 'spree_store_credit_events', force: :cascade do |t|
886
+ t.integer 'store_credit_id', null: false
887
+ t.string 'action', null: false
888
+ t.decimal 'amount', precision: 8, scale: 2
889
+ t.decimal 'user_total_amount', precision: 8, scale: 2, default: '0.0', null: false
890
+ t.string 'authorization_code', null: false
891
+ t.datetime 'deleted_at'
892
+ t.string 'originator_type'
893
+ t.integer 'originator_id'
894
+ t.datetime 'created_at', precision: 6
895
+ t.datetime 'updated_at', precision: 6
896
+ t.integer 'update_reason_id'
897
+ t.index ['deleted_at'], name: 'index_spree_store_credit_events_on_deleted_at'
898
+ t.index ['store_credit_id'], name: 'index_spree_store_credit_events_on_store_credit_id'
899
+ end
900
+
901
+ create_table 'spree_store_credit_types', force: :cascade do |t|
902
+ t.string 'name'
903
+ t.integer 'priority'
904
+ t.datetime 'created_at', precision: 6
905
+ t.datetime 'updated_at', precision: 6
906
+ t.index ['priority'], name: 'index_spree_store_credit_types_on_priority'
907
+ end
908
+
909
+ create_table 'spree_store_credit_update_reasons', force: :cascade do |t|
910
+ t.string 'name'
911
+ t.datetime 'created_at', precision: 6
912
+ t.datetime 'updated_at', precision: 6
913
+ end
914
+
915
+ create_table 'spree_store_credits', force: :cascade do |t|
916
+ t.integer 'user_id'
917
+ t.integer 'category_id'
918
+ t.integer 'created_by_id'
919
+ t.decimal 'amount', precision: 8, scale: 2, default: '0.0', null: false
920
+ t.decimal 'amount_used', precision: 8, scale: 2, default: '0.0', null: false
921
+ t.decimal 'amount_authorized', precision: 8, scale: 2, default: '0.0', null: false
922
+ t.string 'currency'
923
+ t.text 'memo'
924
+ t.datetime 'spree_store_credits'
925
+ t.datetime 'deleted_at'
926
+ t.datetime 'created_at', precision: 6
927
+ t.datetime 'updated_at', precision: 6
928
+ t.integer 'type_id'
929
+ t.datetime 'invalidated_at'
930
+ t.index ['deleted_at'], name: 'index_spree_store_credits_on_deleted_at'
931
+ t.index ['type_id'], name: 'index_spree_store_credits_on_type_id'
932
+ t.index ['user_id'], name: 'index_spree_store_credits_on_user_id'
933
+ end
934
+
935
+ create_table 'spree_store_payment_methods', force: :cascade do |t|
936
+ t.integer 'store_id', null: false
937
+ t.integer 'payment_method_id', null: false
938
+ t.datetime 'created_at', null: false, precision: 6
939
+ t.datetime 'updated_at', null: false, precision: 6
940
+ t.index ['payment_method_id'], name: 'index_spree_store_payment_methods_on_payment_method_id'
941
+ t.index ['store_id'], name: 'index_spree_store_payment_methods_on_store_id'
942
+ end
943
+
944
+ create_table 'spree_stores', force: :cascade do |t|
945
+ t.string 'name'
946
+ t.string 'url'
947
+ t.text 'meta_description'
948
+ t.text 'meta_keywords'
949
+ t.string 'seo_title'
950
+ t.string 'mail_from_address'
951
+ t.string 'default_currency'
952
+ t.string 'code'
953
+ t.boolean 'default', default: false, null: false
954
+ t.datetime 'created_at', precision: 6
955
+ t.datetime 'updated_at', precision: 6
956
+ t.string 'cart_tax_country_iso'
957
+ t.index ['code'], name: 'index_spree_stores_on_code'
958
+ t.index ['default'], name: 'index_spree_stores_on_default'
959
+ end
960
+
961
+ create_table 'spree_tax_categories', force: :cascade do |t|
962
+ t.string 'name'
963
+ t.string 'description'
964
+ t.boolean 'is_default', default: false
965
+ t.datetime 'deleted_at'
966
+ t.datetime 'created_at', precision: 6
967
+ t.datetime 'updated_at', precision: 6
968
+ t.string 'tax_code'
969
+ end
970
+
971
+ create_table 'spree_tax_rates', force: :cascade do |t|
972
+ t.decimal 'amount', precision: 8, scale: 5
973
+ t.integer 'zone_id'
974
+ t.integer 'tax_category_id'
975
+ t.boolean 'included_in_price', default: false
976
+ t.datetime 'created_at', precision: 6
977
+ t.datetime 'updated_at', precision: 6
978
+ t.string 'name'
979
+ t.boolean 'show_rate_in_label', default: true
980
+ t.datetime 'deleted_at'
981
+ t.index ['deleted_at'], name: 'index_spree_tax_rates_on_deleted_at'
982
+ t.index ['tax_category_id'], name: 'index_spree_tax_rates_on_tax_category_id'
983
+ t.index ['zone_id'], name: 'index_spree_tax_rates_on_zone_id'
984
+ end
985
+
986
+ create_table 'spree_taxonomies', force: :cascade do |t|
987
+ t.string 'name', null: false
988
+ t.datetime 'created_at', precision: 6
989
+ t.datetime 'updated_at', precision: 6
990
+ t.integer 'position', default: 0
991
+ t.index ['position'], name: 'index_spree_taxonomies_on_position'
992
+ end
993
+
994
+ create_table 'spree_taxons', force: :cascade do |t|
995
+ t.integer 'parent_id'
996
+ t.integer 'position', default: 0
997
+ t.string 'name', null: false
998
+ t.string 'permalink'
999
+ t.integer 'taxonomy_id'
1000
+ t.integer 'lft'
1001
+ t.integer 'rgt'
1002
+ t.string 'icon_file_name'
1003
+ t.string 'icon_content_type'
1004
+ t.integer 'icon_file_size'
1005
+ t.datetime 'icon_updated_at'
1006
+ t.text 'description'
1007
+ t.datetime 'created_at', precision: 6
1008
+ t.datetime 'updated_at', precision: 6
1009
+ t.string 'meta_title'
1010
+ t.string 'meta_description'
1011
+ t.string 'meta_keywords'
1012
+ t.integer 'depth'
1013
+ t.index ['parent_id'], name: 'index_taxons_on_parent_id'
1014
+ t.index ['permalink'], name: 'index_taxons_on_permalink'
1015
+ t.index ['position'], name: 'index_spree_taxons_on_position'
1016
+ t.index ['taxonomy_id'], name: 'index_taxons_on_taxonomy_id'
1017
+ end
1018
+
1019
+ create_table 'spree_unit_cancels', force: :cascade do |t|
1020
+ t.integer 'inventory_unit_id', null: false
1021
+ t.string 'reason'
1022
+ t.string 'created_by'
1023
+ t.datetime 'created_at', precision: 6
1024
+ t.datetime 'updated_at', precision: 6
1025
+ t.index ['inventory_unit_id'], name: 'index_spree_unit_cancels_on_inventory_unit_id'
1026
+ end
1027
+
1028
+ create_table 'spree_user_addresses', force: :cascade do |t|
1029
+ t.integer 'user_id', null: false
1030
+ t.integer 'address_id', null: false
1031
+ t.boolean 'default', default: false
1032
+ t.boolean 'archived', default: false
1033
+ t.datetime 'created_at', null: false, precision: 6
1034
+ t.datetime 'updated_at', null: false, precision: 6
1035
+ t.index ['address_id'], name: 'index_spree_user_addresses_on_address_id'
1036
+ t.index ['user_id', 'address_id'], name: 'index_spree_user_addresses_on_user_id_and_address_id', unique: true
1037
+ t.index ['user_id'], name: 'index_spree_user_addresses_on_user_id'
1038
+ end
1039
+
1040
+ create_table 'spree_user_stock_locations', force: :cascade do |t|
1041
+ t.integer 'user_id'
1042
+ t.integer 'stock_location_id'
1043
+ t.datetime 'created_at', precision: 6
1044
+ t.datetime 'updated_at', precision: 6
1045
+ t.index ['user_id'], name: 'index_spree_user_stock_locations_on_user_id'
1046
+ end
1047
+
1048
+ create_table 'spree_variant_property_rule_conditions', force: :cascade do |t|
1049
+ t.integer 'option_value_id'
1050
+ t.integer 'variant_property_rule_id'
1051
+ t.datetime 'created_at', null: false, precision: 6
1052
+ t.datetime 'updated_at', null: false, precision: 6
1053
+ t.index ['variant_property_rule_id', 'option_value_id'], name: 'index_spree_variant_prop_rule_conditions_on_rule_and_optval'
1054
+ end
1055
+
1056
+ create_table 'spree_variant_property_rule_values', force: :cascade do |t|
1057
+ t.text 'value'
1058
+ t.integer 'position', default: 0
1059
+ t.integer 'property_id'
1060
+ t.integer 'variant_property_rule_id'
1061
+ t.datetime 'created_at', precision: 6
1062
+ t.datetime 'updated_at', precision: 6
1063
+ t.index ['property_id'], name: 'index_spree_variant_property_rule_values_on_property_id'
1064
+ t.index ['variant_property_rule_id'], name: 'index_spree_variant_property_rule_values_on_rule'
1065
+ end
1066
+
1067
+ create_table 'spree_variant_property_rules', force: :cascade do |t|
1068
+ t.integer 'product_id'
1069
+ t.datetime 'created_at', null: false, precision: 6
1070
+ t.datetime 'updated_at', null: false, precision: 6
1071
+ t.index ['product_id'], name: 'index_spree_variant_property_rules_on_product_id'
1072
+ end
1073
+
1074
+ create_table 'spree_variants', force: :cascade do |t|
1075
+ t.string 'sku', default: '', null: false
1076
+ t.decimal 'weight', precision: 8, scale: 2, default: '0.0'
1077
+ t.decimal 'height', precision: 8, scale: 2
1078
+ t.decimal 'width', precision: 8, scale: 2
1079
+ t.decimal 'depth', precision: 8, scale: 2
1080
+ t.datetime 'deleted_at'
1081
+ t.boolean 'is_master', default: false
1082
+ t.integer 'product_id'
1083
+ t.decimal 'cost_price', precision: 10, scale: 2
1084
+ t.integer 'position'
1085
+ t.string 'cost_currency'
1086
+ t.boolean 'track_inventory', default: true
1087
+ t.integer 'tax_category_id'
1088
+ t.datetime 'updated_at', precision: 6
1089
+ t.datetime 'created_at', precision: 6
1090
+ t.index ['position'], name: 'index_spree_variants_on_position'
1091
+ t.index ['product_id'], name: 'index_spree_variants_on_product_id'
1092
+ t.index ['sku'], name: 'index_spree_variants_on_sku'
1093
+ t.index ['tax_category_id'], name: 'index_spree_variants_on_tax_category_id'
1094
+ t.index ['track_inventory'], name: 'index_spree_variants_on_track_inventory'
1095
+ end
1096
+
1097
+ create_table 'spree_zone_members', force: :cascade do |t|
1098
+ t.string 'zoneable_type'
1099
+ t.integer 'zoneable_id'
1100
+ t.integer 'zone_id'
1101
+ t.datetime 'created_at', precision: 6
1102
+ t.datetime 'updated_at', precision: 6
1103
+ t.index ['zone_id'], name: 'index_spree_zone_members_on_zone_id'
1104
+ t.index ['zoneable_id', 'zoneable_type'], name: 'index_spree_zone_members_on_zoneable_id_and_zoneable_type'
1105
+ end
1106
+
1107
+ create_table 'spree_zones', force: :cascade do |t|
1108
+ t.string 'name'
1109
+ t.string 'description'
1110
+ t.boolean 'default_tax', default: false
1111
+ t.integer 'zone_members_count', default: 0
1112
+ t.datetime 'created_at', precision: 6
1113
+ t.datetime 'updated_at', precision: 6
1100
1114
  end
1101
1115
  end
1102
1116
  end