mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Update migration to set terms_of_service_accepted_at to time of deployment
This commit is contained in:
committed by
Konrad
parent
8371eada23
commit
d2b210c818
@@ -1,5 +1,13 @@
|
||||
class AddTermsOfServiceAcceptedAtToSpreeUsers < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
def up
|
||||
add_column :spree_users, :terms_of_service_accepted_at, :datetime
|
||||
|
||||
if Spree::Config.enterprises_require_tos == true
|
||||
Spree::User.update_all(terms_of_service_accepted_at: Time.zone.now)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :spree_users, :terms_of_service_accepted_at
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user