spree icon indicating copy to clipboard operation
spree copied to clipboard

FIX: data inside rake db:migrate sometimes not accurate

Open r3cha opened this issue 5 years ago • 3 comments

.where with .first_or_create inside .map sometime fails when create instance for multi-tenant use and main DB loaded and has increased network delay or etc.
In this fix I create array of hashes and then create all records using one sql request.

r3cha avatar May 13 '19 23:05 r3cha

Manage this branch in Squash

Test this branch here: https://r3chafix-init-setup-on-slow-ti-0k4xi.squash.io

squash-labs[bot] avatar May 13 '19 23:05 squash-labs[bot]

@r3cha can you also fix issues pointed out by CodeClimate ?

damianlegawiec avatar May 14 '19 12:05 damianlegawiec

@r3cha can you also fix issues pointed out by CodeClimate ?

Yes, sure

r3cha avatar May 14 '19 15:05 r3cha