spree_core 2.4.10 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/app/assets/images/logo/spree_50.png +0 -0
  4. data/app/controllers/spree/base_controller.rb +1 -2
  5. data/app/helpers/spree/base_helper.rb +41 -131
  6. data/app/helpers/spree/products_helper.rb +1 -1
  7. data/app/models/concerns/spree/adjustment_source.rb +51 -15
  8. data/app/models/concerns/spree/calculated_adjustments.rb +1 -0
  9. data/app/models/concerns/spree/display_money.rb +32 -0
  10. data/app/models/concerns/spree/named_type.rb +1 -1
  11. data/app/models/concerns/spree/number_generator.rb +39 -0
  12. data/app/models/concerns/spree/user_reporting.rb +3 -8
  13. data/app/models/spree/address.rb +0 -2
  14. data/app/models/spree/adjustable/adjustments_updater.rb +70 -0
  15. data/app/models/spree/adjustable/promotion_accumulator.rb +75 -0
  16. data/app/models/spree/adjustment.rb +17 -26
  17. data/app/models/spree/app_configuration.rb +4 -33
  18. data/app/models/spree/base.rb +0 -3
  19. data/app/models/spree/calculator.rb +0 -5
  20. data/app/models/spree/classification.rb +1 -1
  21. data/app/models/spree/country.rb +10 -4
  22. data/app/models/spree/credit_card.rb +14 -15
  23. data/app/models/spree/customer_return.rb +18 -25
  24. data/app/models/spree/gateway/bogus.rb +0 -4
  25. data/app/models/spree/line_item.rb +2 -5
  26. data/app/models/spree/option_type.rb +2 -4
  27. data/app/models/spree/option_value.rb +0 -2
  28. data/app/models/spree/order.rb +74 -134
  29. data/app/models/spree/order/checkout.rb +1 -1
  30. data/app/models/spree/order_contents.rb +9 -8
  31. data/app/models/spree/order_updater.rb +8 -1
  32. data/app/models/spree/payment.rb +13 -23
  33. data/app/models/spree/payment/gateway_options.rb +86 -0
  34. data/app/models/spree/payment/processing.rb +8 -39
  35. data/app/models/spree/payment_method.rb +3 -6
  36. data/app/models/spree/price.rb +2 -6
  37. data/app/models/spree/product.rb +27 -16
  38. data/app/models/spree/product_property.rb +1 -5
  39. data/app/models/spree/promotion.rb +7 -15
  40. data/app/models/spree/promotion/actions/create_adjustment.rb +4 -45
  41. data/app/models/spree/promotion/actions/create_item_adjustments.rb +8 -63
  42. data/app/models/spree/promotion/actions/create_line_items.rb +3 -12
  43. data/app/models/spree/promotion/actions/free_shipping.rb +4 -24
  44. data/app/models/spree/promotion/rules/option_value.rb +49 -0
  45. data/app/models/spree/promotion_action.rb +6 -0
  46. data/app/models/spree/promotion_handler/cart.rb +14 -18
  47. data/app/models/spree/promotion_handler/coupon.rb +1 -1
  48. data/app/models/spree/promotion_rule.rb +0 -1
  49. data/app/models/spree/property.rb +0 -2
  50. data/app/models/spree/refund.rb +0 -15
  51. data/app/models/spree/reimbursement.rb +4 -4
  52. data/app/models/spree/reimbursement_type/credit.rb +1 -1
  53. data/app/models/spree/reimbursement_type/original_payment.rb +1 -1
  54. data/app/models/spree/return_authorization.rb +4 -11
  55. data/app/models/spree/return_item.rb +16 -11
  56. data/app/models/spree/return_item/eligibility_validator/default.rb +2 -0
  57. data/app/models/spree/return_item/eligibility_validator/inventory_shipped.rb +16 -0
  58. data/app/models/spree/return_item/eligibility_validator/no_reimbursements.rb +16 -0
  59. data/app/models/spree/shipment.rb +20 -31
  60. data/app/models/spree/shipment_handler.rb +1 -1
  61. data/app/models/spree/shipping_method.rb +12 -13
  62. data/app/models/spree/state.rb +7 -0
  63. data/app/models/spree/state_change.rb +1 -6
  64. data/app/models/spree/stock/availability_validator.rb +9 -10
  65. data/app/models/spree/stock/coordinator.rb +1 -1
  66. data/app/models/spree/stock/estimator.rb +6 -6
  67. data/app/models/spree/stock/quantifier.rb +1 -1
  68. data/app/models/spree/stock_item.rb +1 -7
  69. data/app/models/spree/stock_location.rb +3 -1
  70. data/app/models/spree/stock_movement.rb +1 -8
  71. data/app/models/spree/stock_transfer.rb +11 -5
  72. data/app/models/spree/store.rb +2 -2
  73. data/app/models/spree/tax_rate.rb +30 -55
  74. data/app/models/spree/taxon.rb +8 -8
  75. data/app/models/spree/taxonomy.rb +8 -13
  76. data/app/models/spree/tracker.rb +1 -1
  77. data/app/models/spree/variant.rb +6 -15
  78. data/app/models/spree/zone.rb +43 -9
  79. data/config/initializers/user_class_extensions.rb +0 -12
  80. data/config/locales/en.yml +76 -85
  81. data/config/routes.rb +1 -1
  82. data/db/default/spree/countries.rb +23 -13
  83. data/db/default/spree/states.rb +24 -12
  84. data/db/default/spree/stores.rb +1 -1
  85. data/db/migrate/20120831092320_spree_one_two.rb +36 -36
  86. data/db/migrate/20120831092359_spree_promo_one_two.rb +1 -1
  87. data/db/migrate/20130211190146_create_spree_stock_items.rb +1 -1
  88. data/db/migrate/20130211191120_create_spree_stock_locations.rb +1 -1
  89. data/db/migrate/20130301162924_create_shipping_method_categories.rb +1 -1
  90. data/db/migrate/20130304162240_create_spree_shipping_rates.rb +1 -1
  91. data/db/migrate/20130305143310_create_stock_movements.rb +1 -1
  92. data/db/migrate/20130418125341_create_spree_stock_transfers.rb +1 -1
  93. data/db/migrate/20140205120320_create_spree_payment_capture_events.rb +1 -1
  94. data/db/migrate/20140309024355_create_spree_stores.rb +1 -1
  95. data/db/migrate/20140309033438_create_store_from_preferences.rb +0 -7
  96. data/db/migrate/20140625214618_create_spree_refunds.rb +1 -1
  97. data/db/migrate/20140702140656_create_spree_return_authorization_inventory_unit.rb +1 -1
  98. data/db/migrate/20140713140455_create_spree_return_authorization_reasons.rb +1 -1
  99. data/db/migrate/20140713140527_create_spree_refund_reasons.rb +1 -1
  100. data/db/migrate/20140715182625_create_spree_promotion_categories.rb +1 -1
  101. data/db/migrate/20140718133010_create_spree_customer_returns.rb +1 -1
  102. data/db/migrate/20140725131539_create_spree_reimbursements.rb +1 -1
  103. data/db/migrate/20140731150017_create_spree_reimbursement_types.rb +1 -1
  104. data/db/migrate/20140911173301_add_kind_to_zone.rb +11 -0
  105. data/db/migrate/20141215232040_remove_token_permissions_table.rb +6 -0
  106. data/db/migrate/20141215235502_remove_extra_products_slug_index.rb +5 -0
  107. data/db/migrate/20141217215630_update_product_slug_index.rb +6 -0
  108. data/db/migrate/20141218025915_rename_identifier_to_number_for_payment.rb +5 -0
  109. data/db/migrate/20150121022521_remove_environment_from_payment_method.rb +6 -0
  110. data/db/migrate/20150122145607_add_resellable_to_return_items.rb +5 -0
  111. data/db/migrate/20150122202432_add_code_to_spree_promotion_categories.rb +5 -0
  112. data/db/migrate/20150128032538_remove_environment_from_tracker.rb +6 -0
  113. data/db/migrate/20150128060325_remove_spree_configurations.rb +16 -0
  114. data/lib/generators/spree/dummy/templates/rails/test.rb +1 -1
  115. data/lib/generators/spree/install/templates/config/initializers/spree.rb +4 -0
  116. data/lib/spree/core.rb +2 -12
  117. data/lib/spree/core/controller_helpers/respond_with.rb +8 -18
  118. data/lib/spree/core/engine.rb +1 -7
  119. data/lib/spree/core/routes.rb +1 -1
  120. data/lib/spree/core/version.rb +1 -1
  121. data/lib/spree/money.rb +10 -10
  122. data/lib/spree/permitted_attributes.rb +4 -8
  123. data/lib/spree/testing_support/authorization_helpers.rb +3 -5
  124. data/lib/spree/testing_support/capybara_ext.rb +3 -3
  125. data/lib/spree/testing_support/common_rake.rb +2 -2
  126. data/lib/spree/testing_support/factories/order_factory.rb +3 -13
  127. data/lib/spree/testing_support/factories/payment_method_factory.rb +0 -3
  128. data/lib/spree/testing_support/factories/prototype_factory.rb +5 -0
  129. data/lib/spree/testing_support/factories/return_item_factory.rb +5 -1
  130. data/lib/spree/testing_support/factories/stock_location_factory.rb +3 -3
  131. data/lib/spree/testing_support/factories/tracker_factory.rb +0 -1
  132. data/lib/spree/testing_support/factories/user_factory.rb +1 -1
  133. data/lib/spree/testing_support/factories/zone_factory.rb +8 -0
  134. data/lib/tasks/core.rake +1 -1
  135. data/lib/tasks/email.rake +6 -3
  136. metadata +48 -35
  137. data/app/helpers/spree/checkout_helper.rb +0 -31
  138. data/app/helpers/spree/orders_helper.rb +0 -17
  139. data/app/helpers/spree/store_helper.rb +0 -16
  140. data/app/helpers/spree/taxons_helper.rb +0 -19
  141. data/app/models/concerns/spree/ransackable_attributes.rb +0 -19
  142. data/app/models/friendly_id/slug_decorator.rb +0 -3
  143. data/app/models/spree/billing_integration.rb +0 -21
  144. data/app/models/spree/configuration.rb +0 -5
  145. data/app/models/spree/item_adjustments.rb +0 -82
  146. data/app/models/spree/order_merger.rb +0 -65
  147. data/app/models/spree/order_populator.rb +0 -43
  148. data/app/models/spree/product_scope/scopes.rb +0 -47
  149. data/app/models/spree/variant/scopes.rb +0 -42
  150. data/db/migrate/20150515211137_fix_adjustment_order_id.rb +0 -70
  151. data/db/migrate/20150522181728_add_deleted_at_to_friendly_id_slugs.rb +0 -6
  152. data/db/migrate/20150707204155_enable_acts_as_paranoid_on_calculators.rb +0 -6
  153. data/lib/spree/core/controller_helpers/ssl.rb +0 -60
  154. data/lib/spree/core/permalinks.rb +0 -71
  155. data/lib/spree/testing_support/factories/configuration_factory.rb +0 -6
@@ -1,19 +1,29 @@
1
1
  require 'carmen'
2
2
 
3
- countries = []
4
- Carmen::Country.all.each do |country|
5
- countries << {
6
- name: country.name,
7
- iso3: country.alpha_3_code,
8
- iso: country.alpha_2_code,
9
- iso_name: country.name.upcase,
10
- numcode: country.numeric_code,
11
- states_required: country.subregions?
12
- }
13
- end
3
+ connection = ActiveRecord::Base.connection
4
+ country_inserts = []
5
+
6
+ country_values = -> do
7
+ Carmen::Country.all.each do |country|
8
+ name = connection.quote country.name
9
+ iso3 = connection.quote country.alpha_3_code
10
+ iso = connection.quote country.alpha_2_code
11
+ iso_name = connection.quote country.name.upcase
12
+ numcode = connection.quote country.numeric_code
13
+ states_required = connection.quote country.subregions?
14
+
15
+ country_inserts << [name, iso3, iso, iso_name, numcode, states_required].join(", ")
16
+ end
14
17
 
15
- ActiveRecord::Base.transaction do
16
- Spree::Country.create!(countries)
18
+ country_inserts.join("), (")
17
19
  end
18
20
 
21
+ columns = ["name", "iso3", "iso", "iso_name", "numcode", "states_required"]
22
+ columns = connection.adapter_name =~ /MySQL/i ? columns.join(", ") : "\"#{columns.join('", "')}\""
23
+
24
+ connection.execute <<-SQL
25
+ INSERT INTO spree_countries (#{columns})
26
+ VALUES (#{country_values.call});
27
+ SQL
28
+
19
29
  Spree::Config[:default_country_id] = Spree::Country.find_by(name: "United States").id
@@ -1,16 +1,28 @@
1
- ActiveRecord::Base.transaction do
2
- Spree::Country.all.each do |country|
1
+ connection = ActiveRecord::Base.connection
2
+ state_inserts = []
3
+
4
+ state_values = -> do
5
+ Spree::Country.where(states_required: true).each do |country|
3
6
  carmen_country = Carmen::Country.named(country.name)
4
- @states ||= []
5
- if carmen_country.subregions?
6
- carmen_country.subregions.each do |subregion|
7
- @states << {
8
- name: subregion.name,
9
- abbr: subregion.code,
10
- country: country
11
- }
12
- end
7
+ carmen_country.subregions.each do |subregion|
8
+ name = connection.quote subregion.name
9
+ abbr = connection.quote subregion.code
10
+ country_id = connection.quote country.id
11
+
12
+ state_inserts << [name, abbr, country_id].join(", ")
13
13
  end
14
14
  end
15
- Spree::State.create!(@states)
15
+
16
+ state_inserts.map { |x| "(#{x})" }
17
+ end
18
+
19
+ columns = ["name", "abbr", "country_id"].map do |column|
20
+ connection.quote_column_name column
21
+ end.join(', ')
22
+
23
+ state_values.call.each_slice(500) do |state_values_batch|
24
+ connection.execute <<-SQL
25
+ INSERT INTO spree_states (#{columns})
26
+ VALUES #{state_values_batch.join(", ")};
27
+ SQL
16
28
  end
@@ -3,7 +3,7 @@ unless Spree::Store.where(code: 'spree').exists?
3
3
  Spree::Store.new do |s|
4
4
  s.code = 'spree'
5
5
  s.name = 'Spree Demo Site'
6
- s.url = 'demo.spreecommerce.com'
6
+ s.url = 'example.com'
7
7
  s.mail_from_address = 'spree@example.com'
8
8
  end.save!
9
9
  end
@@ -18,7 +18,7 @@ class SpreeOneTwo < ActiveRecord::Migration
18
18
  t.string :code
19
19
  t.boolean :advertise, :default => false
20
20
  t.string :path
21
- t.timestamps
21
+ t.timestamps null: false
22
22
  end
23
23
 
24
24
  create_table :spree_addresses do |t|
@@ -34,7 +34,7 @@ class SpreeOneTwo < ActiveRecord::Migration
34
34
  t.string :company
35
35
  t.references :state
36
36
  t.references :country
37
- t.timestamps
37
+ t.timestamps null: false
38
38
  end
39
39
 
40
40
  add_index :spree_addresses, [:firstname], :name => 'index_addresses_on_firstname'
@@ -49,7 +49,7 @@ class SpreeOneTwo < ActiveRecord::Migration
49
49
  t.boolean :mandatory
50
50
  t.boolean :locked
51
51
  t.boolean :eligible, :default => true
52
- t.timestamps
52
+ t.timestamps null: false
53
53
  end
54
54
 
55
55
  add_index :spree_adjustments, [:adjustable_id], :name => 'index_adjustments_on_order_id'
@@ -73,13 +73,13 @@ class SpreeOneTwo < ActiveRecord::Migration
73
73
  create_table :spree_calculators do |t|
74
74
  t.string :type
75
75
  t.references :calculable, :polymorphic => true
76
- t.timestamps
76
+ t.timestamps null: false
77
77
  end
78
78
 
79
79
  create_table :spree_configurations do |t|
80
80
  t.string :name
81
81
  t.string :type, :limit => 50
82
- t.timestamps
82
+ t.timestamps null: false
83
83
  end
84
84
 
85
85
  add_index :spree_configurations, [:name, :type], :name => 'index_spree_configurations_on_name_and_type'
@@ -105,7 +105,7 @@ class SpreeOneTwo < ActiveRecord::Migration
105
105
  t.references :address
106
106
  t.string :gateway_customer_profile_id
107
107
  t.string :gateway_payment_profile_id
108
- t.timestamps
108
+ t.timestamps null: false
109
109
  end
110
110
 
111
111
  create_table :spree_gateways do |t|
@@ -116,7 +116,7 @@ class SpreeOneTwo < ActiveRecord::Migration
116
116
  t.string :environment, :default => 'development'
117
117
  t.string :server, :default => 'test'
118
118
  t.boolean :test_mode, :default => true
119
- t.timestamps
119
+ t.timestamps null: false
120
120
  end
121
121
 
122
122
  create_table :spree_inventory_units do |t|
@@ -126,7 +126,7 @@ class SpreeOneTwo < ActiveRecord::Migration
126
126
  t.references :order
127
127
  t.references :shipment
128
128
  t.references :return_authorization
129
- t.timestamps
129
+ t.timestamps null: false
130
130
  end
131
131
 
132
132
  add_index :spree_inventory_units, [:order_id], :name => 'index_inventory_units_on_order_id'
@@ -138,7 +138,7 @@ class SpreeOneTwo < ActiveRecord::Migration
138
138
  t.references :order
139
139
  t.integer :quantity, :null => false
140
140
  t.decimal :price, :precision => 8, :scale => 2, :null => false
141
- t.timestamps
141
+ t.timestamps null: false
142
142
  end
143
143
 
144
144
  add_index :spree_line_items, [:order_id], :name => 'index_spree_line_items_on_order_id'
@@ -147,20 +147,20 @@ class SpreeOneTwo < ActiveRecord::Migration
147
147
  create_table :spree_log_entries do |t|
148
148
  t.references :source, :polymorphic => true
149
149
  t.text :details
150
- t.timestamps
150
+ t.timestamps null: false
151
151
  end
152
152
 
153
153
  create_table :spree_mail_methods do |t|
154
154
  t.string :environment
155
155
  t.boolean :active, :default => true
156
- t.timestamps
156
+ t.timestamps null: false
157
157
  end
158
158
 
159
159
  create_table :spree_option_types do |t|
160
160
  t.string :name, :limit => 100
161
161
  t.string :presentation, :limit => 100
162
162
  t.integer :position, :default => 0, :null => false
163
- t.timestamps
163
+ t.timestamps null: false
164
164
  end
165
165
 
166
166
  create_table :spree_option_types_prototypes, :id => false do |t|
@@ -173,7 +173,7 @@ class SpreeOneTwo < ActiveRecord::Migration
173
173
  t.string :name
174
174
  t.string :presentation
175
175
  t.references :option_type
176
- t.timestamps
176
+ t.timestamps null: false
177
177
  end
178
178
 
179
179
  create_table :spree_option_values_variants, :id => false do |t|
@@ -200,7 +200,7 @@ class SpreeOneTwo < ActiveRecord::Migration
200
200
  t.string :payment_state
201
201
  t.string :email
202
202
  t.text :special_instructions
203
- t.timestamps
203
+ t.timestamps null: false
204
204
  end
205
205
 
206
206
  add_index :spree_orders, [:number], :name => 'index_spree_orders_on_number'
@@ -213,7 +213,7 @@ class SpreeOneTwo < ActiveRecord::Migration
213
213
  t.string :environment, :default => 'development'
214
214
  t.datetime :deleted_at
215
215
  t.string :display_on
216
- t.timestamps
216
+ t.timestamps null: false
217
217
  end
218
218
 
219
219
  create_table :spree_payments do |t|
@@ -224,7 +224,7 @@ class SpreeOneTwo < ActiveRecord::Migration
224
224
  t.string :state
225
225
  t.string :response_code
226
226
  t.string :avs_response
227
- t.timestamps
227
+ t.timestamps null: false
228
228
  end
229
229
 
230
230
  create_table :spree_preferences do |t|
@@ -233,7 +233,7 @@ class SpreeOneTwo < ActiveRecord::Migration
233
233
  t.text :value
234
234
  t.string :key
235
235
  t.string :value_type
236
- t.timestamps
236
+ t.timestamps null: false
237
237
  end
238
238
 
239
239
  add_index :spree_preferences, [:key], :name => 'index_spree_preferences_on_key', :unique => true
@@ -242,14 +242,14 @@ class SpreeOneTwo < ActiveRecord::Migration
242
242
  t.integer :position
243
243
  t.references :product
244
244
  t.references :option_type
245
- t.timestamps
245
+ t.timestamps null: false
246
246
  end
247
247
 
248
248
  create_table :spree_product_properties do |t|
249
249
  t.string :value
250
250
  t.references :product
251
251
  t.references :property
252
- t.timestamps
252
+ t.timestamps null: false
253
253
  end
254
254
 
255
255
  add_index :spree_product_properties, [:product_id], :name => 'index_product_properties_on_product_id'
@@ -265,7 +265,7 @@ class SpreeOneTwo < ActiveRecord::Migration
265
265
  t.references :tax_category
266
266
  t.references :shipping_category
267
267
  t.integer :count_on_hand, :default => 0, :null => false
268
- t.timestamps
268
+ t.timestamps null: false
269
269
  end
270
270
 
271
271
  add_index :spree_products, [:available_on], :name => 'index_spree_products_on_available_on'
@@ -284,7 +284,7 @@ class SpreeOneTwo < ActiveRecord::Migration
284
284
  create_table :spree_properties do |t|
285
285
  t.string :name
286
286
  t.string :presentation, :null => false
287
- t.timestamps
287
+ t.timestamps null: false
288
288
  end
289
289
 
290
290
  create_table :spree_properties_prototypes, :id => false do |t|
@@ -294,7 +294,7 @@ class SpreeOneTwo < ActiveRecord::Migration
294
294
 
295
295
  create_table :spree_prototypes do |t|
296
296
  t.string :name
297
- t.timestamps
297
+ t.timestamps null: false
298
298
  end
299
299
 
300
300
  create_table :spree_return_authorizations do |t|
@@ -303,7 +303,7 @@ class SpreeOneTwo < ActiveRecord::Migration
303
303
  t.decimal :amount, :precision => 8, :scale => 2, :default => 0.0, :null => false
304
304
  t.references :order
305
305
  t.text :reason
306
- t.timestamps
306
+ t.timestamps null: false
307
307
  end
308
308
 
309
309
  create_table :spree_roles do |t|
@@ -327,14 +327,14 @@ class SpreeOneTwo < ActiveRecord::Migration
327
327
  t.references :shipping_method
328
328
  t.references :address
329
329
  t.string :state
330
- t.timestamps
330
+ t.timestamps null: false
331
331
  end
332
332
 
333
333
  add_index :spree_shipments, [:number], :name => 'index_shipments_on_number'
334
334
 
335
335
  create_table :spree_shipping_categories do |t|
336
336
  t.string :name
337
- t.timestamps
337
+ t.timestamps null: false
338
338
  end
339
339
 
340
340
  create_table :spree_shipping_methods do |t|
@@ -346,7 +346,7 @@ class SpreeOneTwo < ActiveRecord::Migration
346
346
  t.boolean :match_all
347
347
  t.boolean :match_one
348
348
  t.datetime :deleted_at
349
- t.timestamps
349
+ t.timestamps null: false
350
350
  end
351
351
 
352
352
  create_table :spree_state_changes do |t|
@@ -356,7 +356,7 @@ class SpreeOneTwo < ActiveRecord::Migration
356
356
  t.references :user
357
357
  t.string :stateful_type
358
358
  t.string :next_state
359
- t.timestamps
359
+ t.timestamps null: false
360
360
  end
361
361
 
362
362
  create_table :spree_states do |t|
@@ -370,7 +370,7 @@ class SpreeOneTwo < ActiveRecord::Migration
370
370
  t.string :description
371
371
  t.boolean :is_default, :default => false
372
372
  t.datetime :deleted_at
373
- t.timestamps
373
+ t.timestamps null: false
374
374
  end
375
375
 
376
376
  create_table :spree_tax_rates do |t|
@@ -378,12 +378,12 @@ class SpreeOneTwo < ActiveRecord::Migration
378
378
  t.references :zone
379
379
  t.references :tax_category
380
380
  t.boolean :included_in_price, :default => false
381
- t.timestamps
381
+ t.timestamps null: false
382
382
  end
383
383
 
384
384
  create_table :spree_taxonomies do |t|
385
385
  t.string :name, :null => false
386
- t.timestamps
386
+ t.timestamps null: false
387
387
  end
388
388
 
389
389
  create_table :spree_taxons do |t|
@@ -399,7 +399,7 @@ class SpreeOneTwo < ActiveRecord::Migration
399
399
  t.integer :icon_file_size
400
400
  t.datetime :icon_updated_at
401
401
  t.text :description
402
- t.timestamps
402
+ t.timestamps null: false
403
403
  end
404
404
 
405
405
  add_index :spree_taxons, [:parent_id], :name => 'index_taxons_on_parent_id'
@@ -409,7 +409,7 @@ class SpreeOneTwo < ActiveRecord::Migration
409
409
  create_table :spree_tokenized_permissions, :force => true do |t|
410
410
  t.references :permissable, :polymorphic => true
411
411
  t.string :token
412
- t.timestamps
412
+ t.timestamps null: false
413
413
  end
414
414
 
415
415
  add_index :spree_tokenized_permissions, [:permissable_id, :permissable_type], :name => 'index_tokenized_name_and_type'
@@ -418,7 +418,7 @@ class SpreeOneTwo < ActiveRecord::Migration
418
418
  t.string :environment
419
419
  t.string :analytics_id
420
420
  t.boolean :active, :default => true
421
- t.timestamps
421
+ t.timestamps null: false
422
422
  end
423
423
 
424
424
  create_table :spree_users do |t|
@@ -444,7 +444,7 @@ class SpreeOneTwo < ActiveRecord::Migration
444
444
  t.datetime :locked_at
445
445
  t.datetime :remember_created_at
446
446
  t.datetime :reset_password_sent_at
447
- t.timestamps
447
+ t.timestamps null: false
448
448
  end
449
449
 
450
450
  create_table :spree_variants do |t|
@@ -467,7 +467,7 @@ class SpreeOneTwo < ActiveRecord::Migration
467
467
  create_table :spree_zone_members do |t|
468
468
  t.references :zoneable, :polymorphic => true
469
469
  t.references :zone
470
- t.timestamps
470
+ t.timestamps null: false
471
471
  end
472
472
 
473
473
  create_table :spree_zones do |t|
@@ -475,7 +475,7 @@ class SpreeOneTwo < ActiveRecord::Migration
475
475
  t.string :description
476
476
  t.boolean :default_tax, :default => false
477
477
  t.integer :zone_members_count, :default => 0
478
- t.timestamps
478
+ t.timestamps null: false
479
479
  end
480
480
  end
481
481
  end
@@ -28,7 +28,7 @@ class SpreePromoOneTwo < ActiveRecord::Migration
28
28
  t.references :user
29
29
  t.references :product_group
30
30
  t.string :type
31
- t.timestamps
31
+ t.timestamps null: false
32
32
  end
33
33
 
34
34
  add_index :spree_promotion_rules, [:product_group_id], :name => 'index_promotion_rules_on_product_group_id'
@@ -6,7 +6,7 @@ class CreateSpreeStockItems < ActiveRecord::Migration
6
6
  t.integer :count_on_hand, null: false, default: 0
7
7
  t.integer :lock_version
8
8
 
9
- t.timestamps
9
+ t.timestamps null: false
10
10
  end
11
11
  add_index :spree_stock_items, :stock_location_id
12
12
  add_index :spree_stock_items, [:stock_location_id, :variant_id], :name => 'stock_item_by_loc_and_var_id'
@@ -4,7 +4,7 @@ class CreateSpreeStockLocations < ActiveRecord::Migration
4
4
  t.string :name
5
5
  t.belongs_to :address
6
6
 
7
- t.timestamps
7
+ t.timestamps null: false
8
8
  end
9
9
  add_index :spree_stock_locations, :address_id
10
10
  end
@@ -4,7 +4,7 @@ class CreateShippingMethodCategories < ActiveRecord::Migration
4
4
  t.integer :shipping_method_id, :null => false
5
5
  t.integer :shipping_category_id, :null => false
6
6
 
7
- t.timestamps
7
+ t.timestamps null: false
8
8
  end
9
9
 
10
10
  add_index :spree_shipping_method_categories, :shipping_method_id
@@ -5,7 +5,7 @@ class CreateSpreeShippingRates < ActiveRecord::Migration
5
5
  t.belongs_to :shipping_method
6
6
  t.boolean :selected, :default => false
7
7
  t.decimal :cost, :precision => 8, :scale => 2
8
- t.timestamps
8
+ t.timestamps null: false
9
9
  end
10
10
  add_index(:spree_shipping_rates, [:shipment_id, :shipping_method_id],
11
11
  :name => 'spree_shipping_rates_join_index',
@@ -5,7 +5,7 @@ class CreateStockMovements < ActiveRecord::Migration
5
5
  t.integer :quantity
6
6
  t.string :action
7
7
 
8
- t.timestamps
8
+ t.timestamps null: false
9
9
  end
10
10
  add_index :spree_stock_movements, :stock_item_id
11
11
  end