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

Fix post types filters and direction changing #452

Conversation

handicraftsman
Copy link
Contributor

develop

Code reviewers

Summary of issue

  • By-author post types do not get updated when the author no longer has posts of such type
  • When changing post directions, removed directions actually did not get removed.

Summary of change

  • Updated PostTypeRepository#findAllPostTypesByUserId method to make sure we only return types with published posts
  • Fixed one of my triggers which caused bad behavior with post directions.

Notes

Yes, sadly thanks to how Flyway and similar tools work, we have to redefine the whole trigger function, and ignore its implementations in the previous migrations.

@handicraftsman handicraftsman added backend Tasks for Java team SQL SQL issues labels Aug 18, 2021
@handicraftsman handicraftsman added this to the Sprint 19 milestone Aug 18, 2021
@handicraftsman handicraftsman self-assigned this Aug 18, 2021
@handicraftsman handicraftsman marked this pull request as draft August 18, 2021 12:01
@handicraftsman handicraftsman marked this pull request as ready for review August 18, 2021 12:06
@handicraftsman handicraftsman marked this pull request as draft August 19, 2021 09:26
@handicraftsman
Copy link
Contributor Author

Converted this to a draft temporarily, to move the changed trigger into a repeatable migration so that we do not have to create a migration every time we change something.

@handicraftsman handicraftsman marked this pull request as ready for review August 19, 2021 09:58
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@handicraftsman handicraftsman merged commit 56a2a78 into develop Aug 19, 2021
@handicraftsman handicraftsman deleted the handicraftsman/fix-post-types-filters-and-direction-changing branch August 19, 2021 14:10
KuzmaJava pushed a commit that referenced this pull request Sep 6, 2021
* Fixed post types filters and direction changing
* "Moved" existing triggers to a repeatable migration, so it is easier to edit them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Tasks for Java team SQL SQL issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants