Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close #2258 add index to phone_number spree_users #2259

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

LengTech11
Copy link
Collaborator

@LengTech11 LengTech11 commented Jan 13, 2025

Top Query hit

SELECT ? AS one FROM "spree_users" 
WHERE "spree_users"."phone_number" = $1 AND "spree_users"."deleted_at" IS NULL 
AND "spree_users"."id" != $2 LIMIT $3

The Possible Parts that Queries this Query

  • Link By Phone Number in Order ( it Call before create the order )
def link_by_phone_number
    return if phone_number.present?

    self.phone_number = user.phone_number if user
end

The Possible To Solve

  • Change Link By Phone Number in Order to use Iintel_phone_number instead ( it Call before create the order )
def link_by_intel_phone_number
    return if intel_phone_number.present?

    self.intel_phone_number = user.intel_phone_number if user
end

@LengTech11 LengTech11 force-pushed the 2258-add-index-to-phone-number-spree-users branch from d17980e to 73623ed Compare January 13, 2025 05:28
@LengTech11 LengTech11 requested a review from channainfo January 13, 2025 06:47
@LengTech11 LengTech11 self-assigned this Jan 13, 2025
@LengTech11 LengTech11 added the enhancement New feature or request label Jan 13, 2025
@LengTech11 LengTech11 linked an issue Jan 13, 2025 that may be closed by this pull request
@LengTech11 LengTech11 added the XS A few hours to make it ready label Jan 13, 2025
@channainfo
Copy link
Owner

@LengTech11 we should user intel phone number instead of phone number.

@LengTech11 LengTech11 force-pushed the 2258-add-index-to-phone-number-spree-users branch 3 times, most recently from 6111bcf to 69777b6 Compare January 14, 2025 04:52
@LengTech11 LengTech11 requested a review from channainfo January 14, 2025 08:20
spec/models/spree/order_spec.rb Outdated Show resolved Hide resolved
@LengTech11 LengTech11 force-pushed the 2258-add-index-to-phone-number-spree-users branch 2 times, most recently from e5ad42f to c5b12e1 Compare January 22, 2025 04:20
@LengTech11 LengTech11 force-pushed the 2258-add-index-to-phone-number-spree-users branch from c5b12e1 to f3a9092 Compare January 22, 2025 07:45
@LengTech11 LengTech11 requested a review from channainfo January 22, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request XS A few hours to make it ready
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

Enhance users
2 participants