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

Issue 207 #269

Merged
merged 19 commits into from
Nov 20, 2024
Merged

Issue 207 #269

merged 19 commits into from
Nov 20, 2024

Conversation

marijarin
Copy link
Collaborator

@marijarin marijarin commented Nov 5, 2024

Closes #207

@marijarin
Copy link
Collaborator Author

marijarin commented Nov 5, 2024

I had to suppress some spot bugs warnings, is it OK? If not, could you, please, give me a hint, how to meet the requirements?
Especially for EI_EXPOSE_REP2

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (f2dd83e) to head (b8dff99).
Report is 20 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #269      +/-   ##
============================================
+ Coverage     98.22%   98.48%   +0.25%     
- Complexity       55       70      +15     
============================================
  Files            19       24       +5     
  Lines           169      198      +29     
  Branches          3        5       +2     
============================================
+ Hits            166      195      +29     
  Misses            2        2              
  Partials          1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@mfvanek
Copy link
Owner

mfvanek commented Nov 6, 2024

I had to suppress some spot bugs warnings, is it OK? If not, could you, please, give me a hint, how to meet the requirements? Especially for EI_EXPOSE_REP2

Use https://github.com/mfvanek/pg-index-health-demo/blob/master/config/spotbugs/exclude.xml
Fully suppress EI_EXPOSE_REP2 here

<Bug pattern="EI_EXPOSE_REP,RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE,BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>

@marijarin
Copy link
Collaborator Author

marijarin commented Nov 15, 2024

I have another question.
When running tests I noticed generated migrations be duplicated (1st and 2nd):

copied from logs

Generated migrations: [create index concurrently if not exists order_item_order_id_idx
    on demo.order_item (order_id);, create index concurrently if not exists order_item_order_id_idx
    on demo.order_item (order_id);, create index concurrently if not exists order_item_warehouse_id_idx
    on demo.order_item (warehouse_id);, create index concurrently if not exists orders_buyer_id_idx
    on demo.orders (buyer_id);, create index concurrently if not exists payment_order_id_without_nulls_idx
    on demo.payment (order_id) where order_id is not null;]

Is it OK?

@mfvanek
Copy link
Owner

mfvanek commented Nov 17, 2024

I have another question. When running tests I noticed generated migrations be duplicated (1st and 2nd):

copied from logs

Generated migrations: [create index concurrently if not exists order_item_order_id_idx
    on demo.order_item (order_id);, create index concurrently if not exists order_item_order_id_idx
    on demo.order_item (order_id);, create index concurrently if not exists order_item_warehouse_id_idx
    on demo.order_item (warehouse_id);, create index concurrently if not exists orders_buyer_id_idx
    on demo.orders (buyer_id);, create index concurrently if not exists payment_order_id_without_nulls_idx
    on demo.payment (order_id) where order_id is not null;]

Is it OK?

@marijarin
Yes, it's OK because we have duplicated foreign keys

update. I've created an issue mfvanek/pg-index-health#497

@mfvanek mfvanek merged commit 39adfcc into master Nov 20, 2024
5 checks passed
@mfvanek mfvanek deleted the issue-207 branch November 20, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example of using DbMigrationGenerator
2 participants