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 +4 -4
- data/config/initializers/money.rb +5 -0
- data/config/locales/en.yml +3 -0
- data/db/migrate/20160101010000_solidus_one_four.rb +1096 -1082
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/i18n.rb +4 -0
- data/lib/spree/money.rb +13 -11
- data/lib/spree/testing_support/authorization_helpers.rb +13 -7
- data/lib/spree_core.rb +1 -0
- data/spec/helpers/products_helper_spec.rb +7 -7
- data/spec/lib/i18n_spec.rb +5 -0
- data/spec/lib/spree/core/controller_helpers/order_spec.rb +2 -1
- data/spec/lib/spree/core/testing_support/factories/user_factory_spec.rb +22 -4
- data/spec/lib/spree/money_spec.rb +12 -13
- data/spec/models/spree/ability_spec.rb +3 -3
- data/spec/models/spree/order_spec.rb +2 -2
- data/spec/models/spree/promotion/rules/user_spec.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8ed18c20a6146057f7fe98213dd36bce98f886f430a4ed97a5685315a6f60c
|
4
|
+
data.tar.gz: 498ad0ae3b463313771da4992807c5fcfde06f5c56b0ccc0f4e047cc18a3f7c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7607089f18ebe5e74c78af5ebac40cec4046b338751ff7bb92dfaff3eff6efd8a790c49a46943e61826a0b729c107147aeefb6b1dc890169797a5b622fd708bf
|
7
|
+
data.tar.gz: 3f8bf5a4195e8c678048067e02585ebed4321cce07ffc700d523750437ab5999e6cec5b65f208efcb1c7f302587fb1d0f61625df8b8d6f5cd4374d15a72e948d
|
data/config/locales/en.yml
CHANGED
@@ -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
|
14
|
-
t.string
|
15
|
-
t.string
|
16
|
-
t.string
|
17
|
-
t.string
|
18
|
-
t.string
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
22
|
-
t.integer
|
23
|
-
t.
|
24
|
-
t.datetime
|
25
|
-
t.
|
26
|
-
t.
|
27
|
-
t.
|
28
|
-
t.string
|
29
|
-
t.string
|
30
|
-
t.
|
31
|
-
t.
|
32
|
-
t.
|
33
|
-
t.
|
34
|
-
t.
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
t.string
|
39
|
-
t.
|
40
|
-
t.string
|
41
|
-
t.
|
42
|
-
t.
|
43
|
-
t.datetime
|
44
|
-
t.
|
45
|
-
t.
|
46
|
-
|
47
|
-
t.index
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
t.string
|
53
|
-
t.
|
54
|
-
t.string
|
55
|
-
t.string
|
56
|
-
t.
|
57
|
-
t.
|
58
|
-
t.
|
59
|
-
t.
|
60
|
-
t.
|
61
|
-
t.
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
t.
|
66
|
-
t.
|
67
|
-
t.
|
68
|
-
t.
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
t.string
|
73
|
-
t.string
|
74
|
-
t.
|
75
|
-
t.
|
76
|
-
t.
|
77
|
-
t.
|
78
|
-
t.
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
t.
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
t.
|
87
|
-
t.string
|
88
|
-
t.boolean
|
89
|
-
t.datetime
|
90
|
-
t.datetime
|
91
|
-
t.
|
92
|
-
t.
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
t.
|
97
|
-
t.
|
98
|
-
t.
|
99
|
-
t.
|
100
|
-
t.
|
101
|
-
t.
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
t.
|
106
|
-
t.
|
107
|
-
t.integer
|
108
|
-
t.integer
|
109
|
-
t.
|
110
|
-
t.
|
111
|
-
t.
|
112
|
-
t.
|
113
|
-
t.
|
114
|
-
t.
|
115
|
-
t.
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
t.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
t.
|
124
|
-
t.
|
125
|
-
t.
|
126
|
-
t.
|
127
|
-
t.
|
128
|
-
t.
|
129
|
-
t.
|
130
|
-
t.
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
t.
|
138
|
-
t.
|
139
|
-
t.
|
140
|
-
t.datetime
|
141
|
-
t.datetime
|
142
|
-
t.
|
143
|
-
t.
|
144
|
-
t.index [
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
t.
|
152
|
-
t.
|
153
|
-
t.string
|
154
|
-
t.
|
155
|
-
t.
|
156
|
-
t.
|
157
|
-
t.
|
158
|
-
t.
|
159
|
-
t.index [
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
t.string
|
166
|
-
t.string
|
167
|
-
t.string
|
168
|
-
t.string
|
169
|
-
t.
|
170
|
-
t.
|
171
|
-
t.
|
172
|
-
t.
|
173
|
-
t.
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
t.
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
t.string
|
182
|
-
t.
|
183
|
-
t.datetime
|
184
|
-
t.datetime
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
t.
|
189
|
-
t.integer
|
190
|
-
t.
|
191
|
-
t.
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
t.
|
196
|
-
t.integer
|
197
|
-
t.
|
198
|
-
t.
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
t.integer
|
206
|
-
t.
|
207
|
-
t.
|
208
|
-
t.
|
209
|
-
t.
|
210
|
-
t.
|
211
|
-
t.index [
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
t.
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
t.
|
220
|
-
t.
|
221
|
-
t.
|
222
|
-
t.
|
223
|
-
t.
|
224
|
-
t.
|
225
|
-
t.
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
t.
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
t.
|
234
|
-
t.
|
235
|
-
t.
|
236
|
-
t.
|
237
|
-
t.
|
238
|
-
t.
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
t.
|
243
|
-
t.
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
t.
|
250
|
-
t.
|
251
|
-
t.
|
252
|
-
t.
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
t.
|
259
|
-
t.
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
t.
|
264
|
-
t.
|
265
|
-
t.
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
t.
|
273
|
-
t.
|
274
|
-
t.
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
t.
|
279
|
-
t.
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
t.
|
285
|
-
t.
|
286
|
-
t.
|
287
|
-
t.
|
288
|
-
t.
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
t.integer
|
293
|
-
t.
|
294
|
-
t.
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
t.
|
299
|
-
t.
|
300
|
-
t.
|
301
|
-
t.string
|
302
|
-
t.
|
303
|
-
t.
|
304
|
-
t.
|
305
|
-
t.
|
306
|
-
t.
|
307
|
-
t.decimal
|
308
|
-
t.
|
309
|
-
t.
|
310
|
-
t.
|
311
|
-
t.
|
312
|
-
t.
|
313
|
-
t.datetime
|
314
|
-
t.
|
315
|
-
t.
|
316
|
-
t.
|
317
|
-
t.
|
318
|
-
t.
|
319
|
-
t.
|
320
|
-
t.
|
321
|
-
t.
|
322
|
-
t.
|
323
|
-
t.
|
324
|
-
t.
|
325
|
-
t.
|
326
|
-
t.
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
t.
|
331
|
-
t.
|
332
|
-
t.
|
333
|
-
t.
|
334
|
-
t.
|
335
|
-
t.index [
|
336
|
-
t.index [
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
t.
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
t.
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
t.
|
349
|
-
t.
|
350
|
-
t.
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
t.
|
355
|
-
t.
|
356
|
-
t.
|
357
|
-
t.
|
358
|
-
t.
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
t.
|
365
|
-
t.
|
366
|
-
t.
|
367
|
-
t.
|
368
|
-
t.
|
369
|
-
t.string
|
370
|
-
t.
|
371
|
-
t.
|
372
|
-
t.
|
373
|
-
t.
|
374
|
-
t.
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
t.
|
379
|
-
t.
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
t.
|
384
|
-
t.string
|
385
|
-
t.
|
386
|
-
t.datetime
|
387
|
-
t.
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
t.
|
392
|
-
t.
|
393
|
-
t.
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
t.
|
398
|
-
t.string
|
399
|
-
t.
|
400
|
-
t.
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
t.integer
|
406
|
-
t.
|
407
|
-
t.
|
408
|
-
t.datetime
|
409
|
-
t.
|
410
|
-
t.
|
411
|
-
t.
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
t.
|
419
|
-
t.
|
420
|
-
t.
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
t.
|
425
|
-
t.
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
t.integer
|
430
|
-
t.
|
431
|
-
t.
|
432
|
-
t.
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
t.
|
439
|
-
t.
|
440
|
-
t.
|
441
|
-
t.
|
442
|
-
t.
|
443
|
-
t.integer
|
444
|
-
t.
|
445
|
-
t.
|
446
|
-
t.
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
t.
|
451
|
-
t.
|
452
|
-
t.
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
t.
|
457
|
-
t.integer
|
458
|
-
t.integer
|
459
|
-
t.datetime
|
460
|
-
t.datetime
|
461
|
-
t.
|
462
|
-
t.
|
463
|
-
t.index [
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
t.
|
471
|
-
t.
|
472
|
-
t.
|
473
|
-
t.
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
t.
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
t.
|
482
|
-
t.
|
483
|
-
t.
|
484
|
-
t.
|
485
|
-
t.
|
486
|
-
t.index [
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
t.
|
492
|
-
t.
|
493
|
-
t.string
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
t.
|
498
|
-
t.
|
499
|
-
t.
|
500
|
-
t.
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
t.
|
507
|
-
t.
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
t.
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
t.
|
516
|
-
t.
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
t.
|
521
|
-
t.
|
522
|
-
t.
|
523
|
-
t.
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
t.
|
530
|
-
t.
|
531
|
-
t.
|
532
|
-
t.
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
t.
|
537
|
-
t.
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
t.integer
|
542
|
-
t.
|
543
|
-
t.
|
544
|
-
t.
|
545
|
-
t.
|
546
|
-
t.
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
t.
|
551
|
-
t.
|
552
|
-
t.
|
553
|
-
t.
|
554
|
-
t.
|
555
|
-
t.
|
556
|
-
t.
|
557
|
-
t.
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
t.
|
562
|
-
t.
|
563
|
-
t.
|
564
|
-
t.
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
t.
|
569
|
-
t.
|
570
|
-
t.
|
571
|
-
t.
|
572
|
-
end
|
573
|
-
|
574
|
-
create_table
|
575
|
-
t.
|
576
|
-
t.
|
577
|
-
t.datetime
|
578
|
-
t.datetime
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
t.
|
585
|
-
t.datetime
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
t.
|
591
|
-
t.
|
592
|
-
t.
|
593
|
-
t.
|
594
|
-
t.
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
t.
|
600
|
-
t.
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
t.
|
605
|
-
t.
|
606
|
-
t.
|
607
|
-
t.
|
608
|
-
t.
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
t.integer
|
614
|
-
t.
|
615
|
-
t.string
|
616
|
-
t.datetime
|
617
|
-
t.datetime
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
t.
|
622
|
-
t.
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
t.
|
627
|
-
t.
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
t.
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
t.
|
636
|
-
t.
|
637
|
-
t.
|
638
|
-
t.
|
639
|
-
t.
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
t.
|
646
|
-
t.
|
647
|
-
t.
|
648
|
-
t.
|
649
|
-
t.
|
650
|
-
t.
|
651
|
-
t.
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
t.
|
658
|
-
t.
|
659
|
-
t.
|
660
|
-
t.
|
661
|
-
t.
|
662
|
-
t.
|
663
|
-
t.
|
664
|
-
t.
|
665
|
-
t.
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
t.integer
|
670
|
-
t.integer
|
671
|
-
t.
|
672
|
-
t.
|
673
|
-
t.
|
674
|
-
t.
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
t.string
|
679
|
-
t.
|
680
|
-
t.
|
681
|
-
t.
|
682
|
-
t.
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
t.
|
687
|
-
t.
|
688
|
-
t.
|
689
|
-
end
|
690
|
-
|
691
|
-
create_table
|
692
|
-
t.
|
693
|
-
t.
|
694
|
-
t.
|
695
|
-
t.datetime
|
696
|
-
t.
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
t.
|
702
|
-
t.
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
t.integer
|
707
|
-
t.
|
708
|
-
t.datetime
|
709
|
-
t.datetime
|
710
|
-
t.
|
711
|
-
t.
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
t.
|
716
|
-
t.
|
717
|
-
t.
|
718
|
-
t.
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
t.
|
723
|
-
t.datetime
|
724
|
-
t.
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
t.
|
729
|
-
t.
|
730
|
-
t.
|
731
|
-
t.
|
732
|
-
t.index [
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
t.
|
738
|
-
t.
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
t.
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
t.
|
747
|
-
t.
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
t.
|
754
|
-
t.
|
755
|
-
t.
|
756
|
-
t.
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
t.integer
|
761
|
-
t.
|
762
|
-
t.
|
763
|
-
t.
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
t.
|
770
|
-
t.
|
771
|
-
t.
|
772
|
-
t.
|
773
|
-
t.
|
774
|
-
t.
|
775
|
-
t.
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
t.
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
t.
|
784
|
-
t.
|
785
|
-
t.integer
|
786
|
-
t.
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
t.integer
|
794
|
-
t.
|
795
|
-
t.
|
796
|
-
t.
|
797
|
-
t.datetime
|
798
|
-
t.
|
799
|
-
t.
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
t.string
|
805
|
-
t.
|
806
|
-
t.
|
807
|
-
t.
|
808
|
-
t.
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
t.
|
813
|
-
t.
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
t.
|
818
|
-
t.
|
819
|
-
t.
|
820
|
-
t.
|
821
|
-
t.
|
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 [
|
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
|
829
|
-
t.string
|
830
|
-
t.datetime
|
831
|
-
t.datetime
|
832
|
-
t.boolean
|
833
|
-
t.string
|
834
|
-
t.string
|
835
|
-
t.string
|
836
|
-
t.integer
|
837
|
-
t.string
|
838
|
-
t.integer
|
839
|
-
t.string
|
840
|
-
t.string
|
841
|
-
t.boolean
|
842
|
-
t.boolean
|
843
|
-
t.boolean
|
844
|
-
t.string
|
845
|
-
t.integer
|
846
|
-
t.boolean
|
847
|
-
t.boolean
|
848
|
-
t.string
|
849
|
-
t.boolean
|
850
|
-
t.index [
|
851
|
-
t.index [
|
852
|
-
end
|
853
|
-
|
854
|
-
create_table
|
855
|
-
t.integer
|
856
|
-
t.integer
|
857
|
-
t.string
|
858
|
-
t.datetime
|
859
|
-
t.datetime
|
860
|
-
t.string
|
861
|
-
t.integer
|
862
|
-
t.index [
|
863
|
-
end
|
864
|
-
|
865
|
-
create_table
|
866
|
-
t.string
|
867
|
-
t.datetime
|
868
|
-
t.datetime
|
869
|
-
end
|
870
|
-
|
871
|
-
create_table
|
872
|
-
t.integer
|
873
|
-
t.string
|
874
|
-
t.decimal
|
875
|
-
t.decimal
|
876
|
-
t.string
|
877
|
-
t.datetime
|
878
|
-
t.string
|
879
|
-
t.integer
|
880
|
-
t.datetime
|
881
|
-
t.datetime
|
882
|
-
t.integer
|
883
|
-
t.index [
|
884
|
-
t.index [
|
885
|
-
end
|
886
|
-
|
887
|
-
create_table
|
888
|
-
t.string
|
889
|
-
t.integer
|
890
|
-
t.datetime
|
891
|
-
t.datetime
|
892
|
-
t.index [
|
893
|
-
end
|
894
|
-
|
895
|
-
create_table
|
896
|
-
t.string
|
897
|
-
t.datetime
|
898
|
-
t.datetime
|
899
|
-
end
|
900
|
-
|
901
|
-
create_table
|
902
|
-
t.integer
|
903
|
-
t.integer
|
904
|
-
t.integer
|
905
|
-
t.decimal
|
906
|
-
t.decimal
|
907
|
-
t.decimal
|
908
|
-
t.string
|
909
|
-
t.text
|
910
|
-
t.datetime
|
911
|
-
t.datetime
|
912
|
-
t.datetime
|
913
|
-
t.datetime
|
914
|
-
t.integer
|
915
|
-
t.datetime
|
916
|
-
t.index [
|
917
|
-
t.index [
|
918
|
-
t.index [
|
919
|
-
end
|
920
|
-
|
921
|
-
create_table
|
922
|
-
t.integer
|
923
|
-
t.integer
|
924
|
-
t.datetime
|
925
|
-
t.datetime
|
926
|
-
t.index [
|
927
|
-
t.index [
|
928
|
-
end
|
929
|
-
|
930
|
-
create_table
|
931
|
-
t.string
|
932
|
-
t.string
|
933
|
-
t.text
|
934
|
-
t.text
|
935
|
-
t.string
|
936
|
-
t.string
|
937
|
-
t.string
|
938
|
-
t.string
|
939
|
-
t.boolean
|
940
|
-
t.datetime
|
941
|
-
t.datetime
|
942
|
-
t.string
|
943
|
-
t.index [
|
944
|
-
t.index [
|
945
|
-
end
|
946
|
-
|
947
|
-
create_table
|
948
|
-
t.string
|
949
|
-
t.string
|
950
|
-
t.boolean
|
951
|
-
t.datetime
|
952
|
-
t.datetime
|
953
|
-
t.datetime
|
954
|
-
t.string
|
955
|
-
end
|
956
|
-
|
957
|
-
create_table
|
958
|
-
t.decimal
|
959
|
-
t.integer
|
960
|
-
t.integer
|
961
|
-
t.boolean
|
962
|
-
t.datetime
|
963
|
-
t.datetime
|
964
|
-
t.string
|
965
|
-
t.boolean
|
966
|
-
t.datetime
|
967
|
-
t.index [
|
968
|
-
t.index [
|
969
|
-
t.index [
|
970
|
-
end
|
971
|
-
|
972
|
-
create_table
|
973
|
-
t.string
|
974
|
-
t.datetime
|
975
|
-
t.datetime
|
976
|
-
t.integer
|
977
|
-
t.index [
|
978
|
-
end
|
979
|
-
|
980
|
-
create_table
|
981
|
-
t.integer
|
982
|
-
t.integer
|
983
|
-
t.string
|
984
|
-
t.string
|
985
|
-
t.integer
|
986
|
-
t.integer
|
987
|
-
t.integer
|
988
|
-
t.string
|
989
|
-
t.string
|
990
|
-
t.integer
|
991
|
-
t.datetime
|
992
|
-
t.text
|
993
|
-
t.datetime
|
994
|
-
t.datetime
|
995
|
-
t.string
|
996
|
-
t.string
|
997
|
-
t.string
|
998
|
-
t.integer
|
999
|
-
t.index [
|
1000
|
-
t.index [
|
1001
|
-
t.index [
|
1002
|
-
t.index [
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
create_table
|
1006
|
-
t.integer
|
1007
|
-
t.string
|
1008
|
-
t.string
|
1009
|
-
t.datetime
|
1010
|
-
t.datetime
|
1011
|
-
t.index [
|
1012
|
-
end
|
1013
|
-
|
1014
|
-
create_table
|
1015
|
-
t.integer
|
1016
|
-
t.integer
|
1017
|
-
t.boolean
|
1018
|
-
t.boolean
|
1019
|
-
t.datetime
|
1020
|
-
t.datetime
|
1021
|
-
t.index [
|
1022
|
-
t.index [
|
1023
|
-
t.index [
|
1024
|
-
end
|
1025
|
-
|
1026
|
-
create_table
|
1027
|
-
t.integer
|
1028
|
-
t.integer
|
1029
|
-
t.datetime
|
1030
|
-
t.datetime
|
1031
|
-
t.index [
|
1032
|
-
end
|
1033
|
-
|
1034
|
-
create_table
|
1035
|
-
t.integer
|
1036
|
-
t.integer
|
1037
|
-
t.datetime
|
1038
|
-
t.datetime
|
1039
|
-
t.index [
|
1040
|
-
end
|
1041
|
-
|
1042
|
-
create_table
|
1043
|
-
t.text
|
1044
|
-
t.integer
|
1045
|
-
t.integer
|
1046
|
-
t.integer
|
1047
|
-
t.datetime
|
1048
|
-
t.datetime
|
1049
|
-
t.index [
|
1050
|
-
t.index [
|
1051
|
-
end
|
1052
|
-
|
1053
|
-
create_table
|
1054
|
-
t.integer
|
1055
|
-
t.datetime
|
1056
|
-
t.datetime
|
1057
|
-
t.index [
|
1058
|
-
end
|
1059
|
-
|
1060
|
-
create_table
|
1061
|
-
t.string
|
1062
|
-
t.decimal
|
1063
|
-
t.decimal
|
1064
|
-
t.decimal
|
1065
|
-
t.decimal
|
1066
|
-
t.datetime
|
1067
|
-
t.boolean
|
1068
|
-
t.integer
|
1069
|
-
t.decimal
|
1070
|
-
t.integer
|
1071
|
-
t.string
|
1072
|
-
t.boolean
|
1073
|
-
t.integer
|
1074
|
-
t.datetime
|
1075
|
-
t.datetime
|
1076
|
-
t.index [
|
1077
|
-
t.index [
|
1078
|
-
t.index [
|
1079
|
-
t.index [
|
1080
|
-
t.index [
|
1081
|
-
end
|
1082
|
-
|
1083
|
-
create_table
|
1084
|
-
t.string
|
1085
|
-
t.integer
|
1086
|
-
t.integer
|
1087
|
-
t.datetime
|
1088
|
-
t.datetime
|
1089
|
-
t.index [
|
1090
|
-
t.index [
|
1091
|
-
end
|
1092
|
-
|
1093
|
-
create_table
|
1094
|
-
t.string
|
1095
|
-
t.string
|
1096
|
-
t.boolean
|
1097
|
-
t.integer
|
1098
|
-
t.datetime
|
1099
|
-
t.datetime
|
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
|